Raspberry Pi Solar Serial REST API Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มิ.ย. 2024
  • This tutorial demonstrates how to use serial communication on a Raspberry Pi to connect to a solar charge controller and transmit the data using a python web server REST API to web enabled devices.
    Notes, schematics, code and updates are available on my website: www.rototron.info/raspberry-pi...
    The mobile app code is available on GitHub: github.com/rdagger/Expo-Solar...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 167

  • @barrybowden5778
    @barrybowden5778 7 ปีที่แล้ว +8

    Wow ... between your temperature sensor tutorial and this one to setup remote monitoring this is what I have been looking for to help start my project.

  • @cockerspanielhome
    @cockerspanielhome 6 ปีที่แล้ว

    Your videos are awesome, I will be getting my Raspberry pi 3 in a few days and it sounds like I have a lot to learn. Thanks.

  •  4 ปีที่แล้ว +3

    OMG! This is what I was looking for! Man, you are great!

  • @0ffGridTechClub
    @0ffGridTechClub ปีที่แล้ว +1

    Awesome ! I'm just starting my python coding journey and this is exactly what I want to do ! Thank you

  • @jonathanallen30
    @jonathanallen30 5 ปีที่แล้ว +1

    Excellent video, loads of infomation

  • @WayneRigley
    @WayneRigley 5 ปีที่แล้ว

    Big project for me but worth a shot.. will beat heading to the coop to check the remote screen on status

  • @Jmaturner
    @Jmaturner 7 ปีที่แล้ว

    very nice. I need to get solar set up with my Pi Car Alarm!

  • @mRendyIrawan
    @mRendyIrawan 4 ปีที่แล้ว

    This is awesome! I wonder if it’s possible to make all that information from the MPPT controller viewable from apple’s HomeKit interface?

  • @vinaobraga
    @vinaobraga 2 ปีที่แล้ว +1

    Many thanks for this tutorial....

  • @RND-USA
    @RND-USA 2 หลายเดือนก่อน +1

    This is so cool and helpful!

  • @scolic03
    @scolic03 7 ปีที่แล้ว +4

    *slow clap*
    you outdo yourself sometimes
    great video!!!

  • @g.s.3389
    @g.s.3389 7 ปีที่แล้ว

    wow, great video, I have learnt a lot!!

  • @ERVE74
    @ERVE74 4 ปีที่แล้ว

    Thank you! great video!

  • @jonathanflores3748
    @jonathanflores3748 5 ปีที่แล้ว

    Hi great video! And what do you think about using a current sensor and an ADC to read the value from the battery/controller? Thanks!

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      I have a tutorial on using the INA219 sensor which can accurately measure both voltage (max. 26V) and current (default max. 3.2A).
      th-cam.com/video/BgShCD7xT_A/w-d-xo.html
      The battery voltage readings could be inaccurate if you try to measure while the battery is charging or under load.

  • @pinmonnyka3093
    @pinmonnyka3093 4 ปีที่แล้ว

    this is a nice video, thank you so much

  • @911aDay
    @911aDay 5 ปีที่แล้ว

    Great video thank you for this, have you tried this on a newer model, looks like that ^ MPPT is discontinued, I wonder if the new models have encrypted output for the serial port?

    • @rdagger
      @rdagger  5 ปีที่แล้ว +1

      I have not tried any but there is a Python repo for the newer generations that use an RS485 interface which I doubt is encrypted.
      github.com/kasbert/epsolar-tracer

  • @dgb5820
    @dgb5820 6 ปีที่แล้ว

    Great video

  • @andrewd.harris656
    @andrewd.harris656 7 ปีที่แล้ว

    Very helpful, but I found that using batteries is a bit too dangerous in my situation compared to using enphase grid tie inverters. I'm curious about replacing the envoy with a Raspberry Pi. I'm a noob to this side of things compared to the software on the Pi. I've used Linux, exclusively for over ten years, but in total, I've used it for seventeen or more years. I've lost count. If you have any ideas about wiring an enphase inverter to it using a relay, this would be very helpful.

    • @rdagger
      @rdagger  7 ปีที่แล้ว +1

      Sorry I don’t have any experience with Enphase products. A quick GitHub search showed a couple of possible projects:
      github.com/openhab/openhab1-addons/wiki/enphase-energy-binding
      github.com/EdwinBontenbal/Envoy2Emoncms

  • @lpdescamps
    @lpdescamps 5 ปีที่แล้ว

    nice video! Aren't you worried to connect the serial directly to rx on pi? if you get a spike, wouldnt you burn the pi? would it a good excuse to use an optocoupler? thanks

    • @rdagger
      @rdagger  5 ปีที่แล้ว +1

      That’s a great question! An opto-isolator (preferably high speed, low current) would afford some protection against voltage spikes and ground loops. They’re a prudent precaution when working with devices that use different voltages. They can also help mitigate noise issues. Keeping the wire length short is also a good idea.

  • @bstory3568
    @bstory3568 4 ปีที่แล้ว

    Cool man. Update some more.😍

  • @NabiehSalim
    @NabiehSalim 6 ปีที่แล้ว

    Nice work

  • @parththaker5332
    @parththaker5332 6 ปีที่แล้ว

    thanks bro

  • @PaulPhillipsIndy
    @PaulPhillipsIndy 5 ปีที่แล้ว

    Love this project! Looking to do something quite like this. I want to setup a an outdoor wifi camera to do a live stream from my beehive and am hoping to power it via solar+battery. Poked around on amazon and googled a bit and was not having a lot of luck finding low'ish power charge controllers that matched your criteria. As I'm only powering a wifi cam and an RPI I don't need a humongous solar panel / charge controller... any suggestions greatly appreciated!

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      You can get the newer version of mine on Amazon for $56 (Epever Tracer1210A). It uses a different protocol so you would have to use a different library. Most of the newer ones use RS485 instead of TTL. The beehive sounds like a great project. I'd add inside/outside temperature sensors and a weight sensor to measure the amount honey.

    • @PaulPhillipsIndy
      @PaulPhillipsIndy 5 ปีที่แล้ว

      Are there other libraries already made that would work that you are aware of? I don’t have the skill to make something like that on my own!

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      I don't have a newer controller, but a quick search of GitHub returned this one: github.com/kasbert/epsolar-tracer
      Before purchasing a controller, I would search GitHub to ensure a library exists (preferably Python)

    • @PaulPhillipsIndy
      @PaulPhillipsIndy 5 ปีที่แล้ว

      @@rdagger Thanks! I wasn't sure how to go about searching for that.

  • @rdagger
    @rdagger  7 ปีที่แล้ว +1

    @Chris Borrill Try the link now. Thanks for the feedback.
    www.rototron.info/raspberry-pi-solar-serial-rest-api-tutorial

  • @OntarioMiner
    @OntarioMiner 6 ปีที่แล้ว

    Thank you very much. Great Video with lots of step by step setup information. Wish you could go into detail on the mobile side of things. All went well upto my own ngrok url. I tried cloning the project over to my expo account to run it on my android phone but ran into dependency errors (mobx). Did you manage to get it going in the android environment or only the apple ios environment?

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      The great thing about Expo is that it will work with both. In the video I use an Android phone and an iPad. Try running _npm install_ in the project folder.
      React Native and Expo would be a lot of information to cover in a single video. My next video will have a little more on using React and MobX State Tree.

    • @OntarioMiner
      @OntarioMiner 6 ปีที่แล้ว

      Not to easy working with updating dependencies in a windows environment. Quick google search says to run it in powershell on win10. I will be looking forward to your next video. Great work and thanks for the quick reply. Cheers

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      I use Win10 for my React and Expo coding. Make sure you install the latest version of Node and NPM: nodejs.org/en/download/
      From PowerShell type:
      git clone github.com/rdagger/Expo-Solar-Tracker.git
      cd Expo-Solar-Tracker
      npm install
      Then run Expo XDE and open the above folder. Set the host to LAN and you should be able to connect with the Expo app on either Android or IOS.

    • @OntarioMiner
      @OntarioMiner 6 ปีที่แล้ว

      Got it all working. Thanks a bunch. Did you publish the app on the playstore? I would like to have an apk file that I can install on other android devices?

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      I did not, but it's open source so feel free to publish it to the app store.

  • @SaeedAhmed-ix8nm
    @SaeedAhmed-ix8nm 6 ปีที่แล้ว

    Thanks a nice video. I have a query I am building the same system but I want to save the values in .CSV can you please tell me how to do that? Or code will be helpful for me.

    • @rdagger
      @rdagger  6 ปีที่แล้ว +2

      import csv
      values = [batt_voltage, pv_voltage, charge_current, load_amps]
      with open(r'log.csv', 'a') as f:
      writer = csv.writer(f, lineterminator='
      ')
      writer.writerow(values)

  • @timerskine249
    @timerskine249 2 หลายเดือนก่อน

    Just found this video, great tutorial. As a newbie, I have to wonder how using the non-wireless pi did you get the updates/upgrades and code from git hub to your pi?

    • @rdagger
      @rdagger  2 หลายเดือนก่อน +1

      There's a USB Wi-Fi dongle plugged into the Pi. You can see the dongle at 3:53 in the video.

    • @timerskine249
      @timerskine249 2 หลายเดือนก่อน

      @@rdagger Thanks for the super quick reply!

  • @SimonVega318
    @SimonVega318 4 ปีที่แล้ว

    Great tutorial. Question: is there a way to connect the MPPT Controller directly to the Ethernet port on a Raspberry Pi 3 B+? In other words, use a standard RJ-45 Ethernet cable and connect that to the MPPT on one side, and connect to the RPi Ethernet port on the other side. Would it be a problem on the hardware side (dangerous voltages on certain pins) or on the software side (being able to read the data on the Ethernet port)? Thanks

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      That would not be possible unless your MPPT controller has Ethernet capability and even then you would probably need to use a network switch instead of a direct connection. Most of the MPPT controllers that I have worked with have been either TTL or RS485 protocol which is not compatible with Ethernet. Although I'm sure you could find an MPPT controller with Ethernet or WiFi capability.

    • @SimonVega318
      @SimonVega318 4 ปีที่แล้ว

      @@rdagger I totally understand, but I didn't mean talking with the MPPT with any network or ethernet protocol, I meant "hacking" the RPi Ethernet port to simply read its 8 pins as you would the normal I/O pins. Therefore making an "easier connection" with the MPPT controller, without having to cut or crimp anything lol. I don't know enough about hardware to tell if it would be possible, or if it would require so much coding that it would be easier to simply connect to the I/O pins as you originally did.

    • @rdagger
      @rdagger  4 ปีที่แล้ว +2

      Sorry I don’t know. I’m guessing that would be extremely challenging. It would probably require replacing the Pi's USB/Ethernet chip. Then you’d theoretically have to modify the bios, the kernel and the network drivers. If anyone has any firsthand experience modifying the Pi’s Ethernet port please let me know in the comments.

    • @SimonVega318
      @SimonVega318 4 ปีที่แล้ว

      @@rdagger wow yeah lol, if it's that complicated then it's obviously not worth it. Thanks for the response!

  • @ariel_monaco
    @ariel_monaco 8 หลายเดือนก่อน

    Awesome stuff! My solar controller has an RJ12 jack (which also uses serial RS232) instead of RJ45 jack. Do you think I can adapt your tutorial to the RJ12 pin-out!? Many thanks in advance from Uruguay!

    • @rdagger
      @rdagger  8 หลายเดือนก่อน

      You should be able to establish a serial connection but you need to verify the voltages do not exceed 3.3 V. However, it is unlikely the software will be compatible. You will need to find or create a library specific to your solar controller.

  • @TheJanuszd
    @TheJanuszd 3 ปีที่แล้ว

    Hello. Great design. Will it work with other MPPT chargers? obviously having rj45?

    • @rdagger
      @rdagger  3 ปีที่แล้ว

      I have not tried any but there is a Python repo for the newer generations that use an RS485 interface:
      github.com/kasbert/epsolar-tracer

  • @perfecillc6005
    @perfecillc6005 4 ปีที่แล้ว

    Would multiplying the "Solar Panel Voltage" and "Charging Current" on 10:31 give the panels output at that point in time (8.2 watts)?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      No, the battery is not being charged at 20.5V.

    • @perfecillc6005
      @perfecillc6005 4 ปีที่แล้ว

      @@rdagger thank you for the reply. Could I use any of the values in this setup to determine what the solar panel output is in watts?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      No, you would need to measure the current from the panel to the controller and multiply it by the panel voltage.

  • @mukhammedaskhatov2352
    @mukhammedaskhatov2352 4 ปีที่แล้ว

    Hello, which raspberry pi should I use cause I see you are using model A, should I use the same one for similar application

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      Any Raspberry Pi will work. The one’s without BlueTooth are slightly easier to set up for serial communication. A Raspberry Pi Zero (non-wireless version), Raspberry Pi Model A+ or Raspberry Pi 2 would work well.

  • @SoilHealthpk
    @SoilHealthpk 3 ปีที่แล้ว

    Hello
    I am looking for a DIY solution to connect my Voltonics MKS Solar Inverter to WiFi for remote monitoring
    I understand its easy to use 8266 or esp32 but need a little information related to RS233 Data Stream from the
    Solar Inverter

    • @rdagger
      @rdagger  3 ปีที่แล้ว

      I suggest you check out GitHub. A quick search returns 2 relevant repos:
      github.com/jblance/mpp-solar
      github.com/scottwday/InverterOfThings
      You can ask the authors for info on the data streams if they are not already documented.

  • @Eyezzzonly
    @Eyezzzonly ปีที่แล้ว

    very cool - do you even try to hook up 2 Solar Charge controllers to one Pi? I have two Tracers and wanna write the Datas to an Excel Table for Analyzing the Datas of the Panels.

    • @rdagger
      @rdagger  ปีที่แล้ว +1

      No, I haven't tried. I don't think it would work well with the controller in the video because you would probably need separate serial ports. However, many of the newer controllers are RS-485 so in theory you could daisy chain them. Another option is to hook your controller to an ESP32 and then transmit the data using MQTT to a Pi. That's the approach I used in my vegetable garden automation video: www.rototron.info/projects/micropython-vegetable-garden-automation-tutorial/

    • @Eyezzzonly
      @Eyezzzonly ปีที่แล้ว

      @@rdagger I will make a test, i have two epever Tracer and on each an MT50. maybe theres a way to grab the signals from the SCC to the MT50 for example (if you strip the cable to the displays you know)hehe.....i will try it

  • @rancillinmontgomery2480
    @rancillinmontgomery2480 3 ปีที่แล้ว

    A5 5A 05 82 02 5F 00 AF, MCU to Stone HMI Display. Solar Voltages, Temps and Alarms updated constantly. My Nemesis! Just can't find how to put down in python that address. 1st 2 are the "display", 3rd is "5 Bytes", 4th is "write variable register" next 2 "variable register address" last 2 ""written value" Any tidbits are appreciated. Enjoyed the video and will watch again and again to absorb what I can.

  • @parththaker5332
    @parththaker5332 6 ปีที่แล้ว

    please tell me how i do same work on c

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      You could search GitHub for C libraries for a REST API and an MPPT tracker. You could write an iPhone app in objective C.

  • @manojanushka2881
    @manojanushka2881 2 ปีที่แล้ว

    Hello. My inverter is Easun sps 3K. Is it working to my inverter serial port?

    • @rdagger
      @rdagger  2 ปีที่แล้ว

      That would not be compatible with the drivers used in this video. Check out Github for a compatible library.

  • @markjeffreyhernandez5921
    @markjeffreyhernandez5921 2 ปีที่แล้ว

    Hello Sir, it will work on MPPT Solar charger AN instead of RN ?

    • @rdagger
      @rdagger  2 ปีที่แล้ว

      The AN series uses RS-485 which is not compatible with the software library used in the video. However, there are Python libraries available on GitHub for the newer RS-485 charge controllers. I haven't tried any but the following one might work: github.com/kasbert/epsolar-tracer

  • @notyoung
    @notyoung 6 ปีที่แล้ว +1

    Before saying that ALL EPSolar MPPT controllers use the pinout you show, you might want to check for the ones that work with the MT-50 meter, the eLog01 data logger, the RS-485 to USB adapter and the RS-485-Wifi box. That pinout is NOT what you have listed.
    From
    Tracer A Series Manual, Version 1.1, Page 19
    1 - controller +5 volt output
    2 - controller +5 volt output
    3 - RS-486-B
    4 - RS-485-B
    5 - RS-485-A
    6 - RS-485-A
    7 - Ground
    8 - Ground
    Same pinout in manual Version 1.4 which is available here:
    www.epsolarpv.com/en/uploads/news/201710/1508812885787574.pdf
    I have two 3210A 30 amp MPPT controllers (handling 900 total solar watts and charging 540AH of AGM batteries) and each of the accessory devices listed. They all specify RS-485 signals on pins 3/4 and 5/6. RS-232 is NOT mentioned. 12 volts is NOT present on the RJ45 connector.

    • @rdagger
      @rdagger  6 ปีที่แล้ว +1

      You have a very good point. I do mention in the video at 1:40 that many charge controllers use RS-485, but the ones that support the MT5 display are serial TTL 3.3V. Sorry that it was not clear that only controllers with MT5 support are compatible with the XXV tracer library and guaranteed to be TTL 3.3V . Thanks for the constructive feedback.

  • @mukhammedaskhatov2352
    @mukhammedaskhatov2352 4 ปีที่แล้ว

    We do not have to use voltage from the charge controller right? Can I just connect my Pi to power socket with the power cable?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      Yes to both.

    • @mukhammedaskhatov2352
      @mukhammedaskhatov2352 4 ปีที่แล้ว

      @@rdagger One more question. What does send data to raspberry PI on how much power is generated? Does 3.3 TTL controller provide that information to PI?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      The solar charge controller sends data to the Pi via serial protocol. The data is transmitted on the RX and TX lines.

  • @masbro-jk5bg
    @masbro-jk5bg 4 ปีที่แล้ว

    nice video

  • @mindfucked7637
    @mindfucked7637 5 ปีที่แล้ว

    can app do the realtime monitoring ?

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Currently the app is using a timer to poll the REST API for new readings at a specified interval. Another approach would be to use WebSockets which would afford bi-directional real-time communication.

  • @danfitzpatrick4112
    @danfitzpatrick4112 2 ปีที่แล้ว

    Will this work for mppsolar inverters?
    Thanks!

    • @rdagger
      @rdagger  2 ปีที่แล้ว +1

      You could implement a similar system but you would probably have to locate a different library to communicate with your inverter. The TLL protocol used in by my charge controller is no longer very common. Most new solar devices use RS-485 or Wi-Fi. GitHub has libraries for many solar products such as this Python one for MPP Solar inverters: github.com/jblance/mpp-solar

  • @ferdm9646
    @ferdm9646 5 ปีที่แล้ว +1

    Is it possible to use ESP32 instead of raspberry pi?

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Yes but the Tracer library would need to be rewritten for MicroPython. My code would need to be rewritten too, specifically the web and serial code. Also Ngrok is not going to work.

  • @rdaguerre
    @rdaguerre 5 ปีที่แล้ว

    Hi. Can i log a mpp solar inverter 5048gk?

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Yes, it looks like it has lots of monitoring options. You'll have to find a compatible library and the wiring will be different.

  • @stevenpalermo7549
    @stevenpalermo7549 5 ปีที่แล้ว

    Can you recommend a video on figuring out the pin out for the Ethernet cable. My charge controller is a magnum and uses standard phone cable. If I can't find a pin out schematic, what is the best way to move forward?

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Google magnum energy rs485. If it's a popular charge controller then someone has probably already figured it out.

  • @oguzhanacar8158
    @oguzhanacar8158 6 ปีที่แล้ว

    hi can i use c language for manage the rasberry pi ( other things same. rest api or ui framework) ?

    • @rdagger
      @rdagger  6 ปีที่แล้ว +1

      Yes there are REST API frameworks written in C. I don't have any experiencing using them. In my opinion, Node.js, Ruby, Java, PHP and Python are more popular choices. For a Raspberry Pi, I would stick with Node.js or Python.

    • @oguzhanacar8158
      @oguzhanacar8158 6 ปีที่แล้ว

      thank you so much. i have another question. i have experience with react native. i dont have knowledge about back-end ,api and embedded system. just little bit familiar node js. I have a project.. I will do it with raspberry. the user will connect (wifi) to rasp with the mobile app. There will be 4 boxes. Inside the boxes will be the LED on / off button. If a user opens a led in the box, it will just hang itself. How did you follow a path?

    • @oguzhanacar8158
      @oguzhanacar8158 6 ปีที่แล้ว

      What would you recommend for architecture? Do you have any tutorial you can recommend?

    • @rdagger
      @rdagger  6 ปีที่แล้ว +1

      My next video will demonstrate running a MicroPython WebSocket server on an ESP32 and then connecting with a client built with React and MobX State Tree. This is an excellent solution for 2-way real time communication between a web client and a microcontroller.

    • @oguzhanacar8158
      @oguzhanacar8158 6 ปีที่แล้ว

      thank you

  • @henrybausa2435
    @henrybausa2435 6 ปีที่แล้ว

    Hi, sir.. i just want to us if i can modify this project using node red?

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      I don't know. I haven't worked with node-red.

    • @henrybausa2435
      @henrybausa2435 6 ปีที่แล้ว

      ok, thank you sir.

  • @saifuddinlee2395
    @saifuddinlee2395 2 ปีที่แล้ว

    Hello sir. Can i know how to start the react native program ? Is there any difference between the react native cli and the expo cli ? How can i proceed your project at the react native part ?

    • @rdagger
      @rdagger  2 ปีที่แล้ว

      Here’s a good article: medium.com/nerd-for-tech/expo-v-s-react-native-cli-what-to-choose-and-what-to-stay-away-from-85afc81597bc

    • @saifuddinlee2395
      @saifuddinlee2395 2 ปีที่แล้ว

      @@rdagger tq sir. Btw do we need to install node js on rpi for this project?

  • @switch3891
    @switch3891 5 ปีที่แล้ว

    How to make a database for this project? or a source code? Thanks

    • @rdagger
      @rdagger  5 ปีที่แล้ว +1

      The answer would require another tutorial. The easiest approach would be to leverage an existing platform such as ThingSpeak or Adafruit IO.

  • @mdsaifulislam5891
    @mdsaifulislam5891 4 ปีที่แล้ว

    Hello Sir, I am unable to find the SainSonic MPPT 10A Tracer-1210RN charge controller. Can you suggest me a charge controller which support TTL logic 3.3 V protocol. Excellent tutorial.

    • @rdagger
      @rdagger  4 ปีที่แล้ว +1

      The TTL versions have been discontinued, but you can still find them. A quick search of AliExpress for 1210RN returned a few. I saw a few 3215RN and 4210RN too. They should work as long as they are compatible with the MT5 display (NOT the MT50 which is RS485 instead of TTL).

    • @mdsaifulislam5891
      @mdsaifulislam5891 4 ปีที่แล้ว

      rdagger68 Thank you for the reply. That means those are also build with TTL logic. am i right ?

    • @rdagger
      @rdagger  4 ปีที่แล้ว +1

      Their description stated “TTL232”, but please verify with the seller before buying.

    • @mdsaifulislam5891
      @mdsaifulislam5891 4 ปีที่แล้ว

      rdagger68 Thank you again.

    • @mdsaifulislam5891
      @mdsaifulislam5891 4 ปีที่แล้ว

      rdagger68 Dear Sir, Last few weeks i was trying to find this RN series but in the internet though they are showing RN but absolutely not available anymore. It seems RN is replaced by AN. So we should not believe on website even though Ali Express. In that case can we use AN and what should we have to change?

  • @addamsapple4925
    @addamsapple4925 11 หลายเดือนก่อน

    Is this applicable to any brand of solar charge controller?

    • @rdagger
      @rdagger  11 หลายเดือนก่อน +1

      No, the software featured in the video is designed specifically for the TTL MPPT controller that is displayed. Unfortunately, these controllers have been discontinued. However, the method demonstrated in the video can be applied to other serial MPPT controllers. In order to do so, you will need to locate suitable drivers and make any necessary modifications to the software.

  • @florentingavrila2782
    @florentingavrila2782 3 ปีที่แล้ว

    does it work on any type of controller?

    • @rdagger
      @rdagger  3 ปีที่แล้ว +1

      No. Most new controllers use RS-485 which is not compatible.

  • @SaeedAhmed-ix8nm
    @SaeedAhmed-ix8nm 6 ปีที่แล้ว

    Nice Video. I am Solar Engineering Student and I want to do project and it will be really nice if you can do that project. It is easy from solar side but i dont know programming that good.
    I want to measure the power that my load will consume. please can you tell me how i can also add in your project 8 channel relay to turn on and off different equipments?
    please help me !!

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      The easiest way would be to purchase an inexpensive 8 channel relay board for the Pi. They have opto-isolation and each relay can be mapped to a GPIO pin. I think SainSmart makes a solid state 8 channel relay board that would probably be more energy efficient compared to mechanical relays assuming AC loads. In terms of code you can add a route to control the relays. It could accept a byte parameter that designates the state of the 8 relays.

    • @SaeedAhmed-ix8nm
      @SaeedAhmed-ix8nm 6 ปีที่แล้ว

      Thanks alot for your valuable answer. I will connect 8 channel ralay in between Load and MPPT Load output. can I use this relay on the load cable? and then turn on and off the load with Relay? I will be using raspberry pi 3 model b.

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      Many controllers such as the 1210RN have a built-in relay that lets you switch the load terminals on and off via serial commands. However, this would not work if you are using the load terminals to power the Pi. In this case you would run 1 set of wires from the load to the Pi and another to the relays. Since you are switching DC, you would need to use a relay board that supports DC (probably mechanical relays). The solid-state version I mentioned above is AC only.

    • @SaeedAhmed-ix8nm
      @SaeedAhmed-ix8nm 6 ปีที่แล้ว

      rdagger68 thank you. I want to use 8 channel relay to turn on and turn off my load and raspberry pi will get power from the mains (house electricity). So I will not have raspberry connected to solar panel. If you like I will be happy to send you the single line diagram of my project and will be happy if you gave me some tips

    • @rdagger
      @rdagger  6 ปีที่แล้ว

      You don't need an 8 channel board if you just want to control 1 channel. You may not even need a relay board. I'd check to see if you MPPT controller has a built-in relay for the load output which often can be controlled via serial communication. The MPPT controller in the video allows you to turn the load on and off via serial commands.

  • @cam_DA_Hawkdriver
    @cam_DA_Hawkdriver 4 ปีที่แล้ว

    Have you ever thought about doing this using a NodeMCU ESP32?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      I have been looking at solar ESP32 solutions. There are ESP32 boards with built-in GSM that are specifically targeted for off-grid solar projects. I have not looked at NodeMCU.

  • @jmr
    @jmr 4 ปีที่แล้ว

    Anyone know if this code will work with the Renogy Rover MPPT controller?

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      I am going to guess no. It probably is modbus. Try searching GitHub for Renogy Rover.

    • @jmr
      @jmr 4 ปีที่แล้ว

      @@rdagger I found some documentation after I asked which makes me pretty sure it won't work but someone else has some code that I think should. Thanks for the help!

  • @timerskine249
    @timerskine249 2 หลายเดือนก่อน

    I hate to keep asking newbie questions, but any tricks to getting the VNC viewer up and running on your system? I have the wifi dongle up and running but can't get into the pi desktop from my mac nor my pc.

    • @rdagger
      @rdagger  2 หลายเดือนก่อน

      Make sure you enable VNC on the Pi using raspi-config. Make sure the Pi has obtained a valid IP address and can ping your router. There isn't really anything else you need to do. I use the free version of RealVNC.

    • @timerskine249
      @timerskine249 2 หลายเดือนก่อน

      @@rdagger Managed to get the VNC server running, loaded an older version of Pi os. Thanks again for your videos.

    • @timerskine249
      @timerskine249 หลายเดือนก่อน

      I've got the pi up and running but do not have a solar controller hooked up yet. I get an error message when I try and use the curl command. Would the lack of data cause an error you think?

    • @rdagger
      @rdagger  หลายเดือนก่อน

      @@timerskine249 what is the error message?

    • @timerskine249
      @timerskine249 หลายเดือนก่อน

      @@rdagger I actually had to go in and correct a few commands in the tracer __init__.py file as some of the print commands were not recognized and a few tabs were not recognized either. Now when I run the curl function after I getting the "Running on 127.0.0.2:5000/ message, I get an error from the __init__.py file as the solar_test file calls it. The error is:
      File "/home/pi/tracer/python/tracer/__init__.py", line 131, in receive_result
      if not b >= 0:
      TypeError: '>=' not supported between instances of 'bytearray' and 'int'.
      When I did a print(b) just before the comparison it comes back as " bytearray(b ' ')"
      Appreciate you dragging this newbie along. I sure have learned a lot trying out this project.

  • @ZephodBeeblebrox
    @ZephodBeeblebrox 3 ปีที่แล้ว

    I've got a bluetooth dongle for a charge controller but it has a different connector. It's a nightmare trying to work it all out.

    • @rdagger
      @rdagger  3 ปีที่แล้ว

      Try searching Github. You might get lucky and someone else has already done the work.

    • @ZephodBeeblebrox
      @ZephodBeeblebrox 3 ปีที่แล้ว

      @@rdagger It was more working out how to rewire the connector which is a jsp ph 2.0. Its 4 wire connector and it needs to be an RJ45

  • @TheFoxstory
    @TheFoxstory ปีที่แล้ว

    hello any ideas why mine says bytearray index out of range

    • @rdagger
      @rdagger  ปีที่แล้ว

      what was the line that threw the error?

    • @TheFoxstory
      @TheFoxstory ปีที่แล้ว

      @@rdagger I'd say t_ser.send_command(query)

    • @rdagger
      @rdagger  ปีที่แล้ว

      @@TheFoxstory Please remove the try statements so you can get the full error message in the repl. What model solar charge controller are you using?

  • @infercom
    @infercom 5 ปีที่แล้ว

    hello, I get this error: bytearray index out of range

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      which line?

    • @infercom
      @infercom 5 ปีที่แล้ว

      The error is given when executing the code
      pi@raspberrypi:~ $ python solar_test.py
      bytearray index out of range
      bytearray index out of range
      apparently it is when printing the data
      print('Battery voltage: {0:0.1f}V'.format(data.batt_voltage))
      my port is: /dev/ttyusb0 I'm using a usb to serial adapter and tristar ts-45 controller

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Sounds like the data variable is not being populated correctly. Did you add error checking? I uploaded the solar_test.py code to my GitHub repo so you can compare.

    • @robertwernthaler695
      @robertwernthaler695 5 ปีที่แล้ว

      Hallo,
      i have the same problem.
      Wenn i start the Programm then coms this:
      Python 2.7.13 (default, Nov 24 2017, 17:33:09)
      [GCC 6.3.0 20170516] on linux2
      Type "copyright", "credits" or "license()" for more information.
      >>>
      ================ RESTART: /home/pi/Dokumente/solar-testII.py ================
      bytearray index out of range
      bytearray index out of range
      bytearray index out of range
      Ctrl-C pressed. Closing serial port and exiting...
      >>>
      I Take the code from your GitHub.

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      Comment out the existing print statements and just try:
      _print(data)_

  • @mohamedbalah7216
    @mohamedbalah7216 5 ปีที่แล้ว

    can we communicate in your mail

    • @rdagger
      @rdagger  5 ปีที่แล้ว

      There is a contact page on my website.

  • @worknuri9233
    @worknuri9233 ปีที่แล้ว

    Nothing matches the given URI pls

    • @rdagger
      @rdagger  ปีที่แล้ว

      Are you reporting a bad link?

  • @krimplaykrimplay2382
    @krimplaykrimplay2382 4 ปีที่แล้ว

    Hi, sorry but i am totally lost, i am a newby ; i bought a EPever contrôleur de chargeur solaire MPPT | LCD 30A régulateur solaire 12V 24V (fr.aliexpress.com/item/32973117264.html?spm=a2g0s.9042311.0.0.7cde6c375GYmte), i used you wire mn 3 of the video and the code mn 9 and after, but get no answer from the regulator. the tracer library is installed. Can you please tell me what i did wrong ? any help, i just want to see the data like in mn 10.19 of the video ? Thank you so much for the Help. I just need to receive the data. Regard

    • @rdagger
      @rdagger  4 ปีที่แล้ว

      Your controller has an RS-485 interface (not a TTL interface.) There is a different library that might work: github.com/kasbert/epsolar-tracer

  • @wilfredswinkels
    @wilfredswinkels 4 ปีที่แล้ว

    within 15cm.... because the current is different at 50cm.......