diy solar

diy solar

Off-grid Solar / Battery monitoring and control freeware

There is python code on my GitHub site (read this thread) to read from the Renogy via a PI.

It's so easy to make a new Grafana dashboard, just make your own to view on a phone with browser
I saw the code for a Wanderer. I'll go back and look again. Maybe the Wanderer and Rover use the same register format
 
Hallo can anyone explain how to getMPPSolar.sh

I installed mpp solar python with:
sudo pip install mpp-solar
What output / settings I have too use to get it working with node_exporter.
 
Ok, I got it...

This is the line i was looking for:
/home/joe/mpp-solar -c QPGS0 > ${dataDir}${dataFileP1}.$$

I'm using a different inverter... therefore I have to do some ajustments.
 
Let me know when you get it all working!
The script simply puts the data in the /ramdisk folder in the correct format so Prometheus/Grafana can use it.
 
I'm going to go out on a limb here because I'm pretty desperate. I had a similar setup with a different "SolarShed" (corbinbs/solarshed), connected to a Renogy Rover charge controller. Everything was feeding nicely into Prometheus and I had a sweet dashboard setup in Grafana. I was connecting from Raspberry Pi 3 USB to RJ-11 port with this combo:

USB to Serial Adapter (https://www.amazon.com/dp/B00425S1H8?psc=1&ref=ppx_yo2_dt_b_product_details)
Female DB9 Pin (https://www.amazon.com/dp/B074Z3PWNY?psc=1&ref=ppx_yo2_dt_b_product_details)
And RJ-11 cable with wires:
1 TX (White) to DB9 box wire 2
2 RX (Black) to DB9 box wire 3
3 GND (Red) to DB9 box wire 5

Everything was working great until I tried two bonehead things.
  1. I tried to have both the Renogy BT-1 bluetooth adapter and the serial to USB plugged in at the same time using a generic phone splitter, which obviously didn't work
  2. I downloaded the newer Renogy DC Home app to see what it would offer monitoring-wise
After I connected to my charge controller with the Renogy app and decided it was crap compared to what I had, I plugged my Raspberry Pi back in and tried to resume monitoring with Grafana. And now I'm getting the following errors from minimalmodbus:
Bash:
some problem occurred: No communication with the instrument (no answer)
Traceback (most recent call last):
  File "server.py", line 43, in <module>
    print('Model: ', controller.model())
  File "/home/pi/.local/lib/python2.7/site-packages/solarshed/controllers/renogy_rover.py", line 41, in model
    return self.read_string(12, numberOfRegisters=8)
  File "/home/pi/.local/lib/python2.7/site-packages/minimalmodbus.py", line 443, in read_string
    numberOfRegisters=numberOfRegisters, payloadformat='string')
  File "/home/pi/.local/lib/python2.7/site-packages/minimalmodbus.py", line 697, in _genericCommand
    payloadFromSlave = self._performCommand(functioncode, payloadToSlave)
  File "/home/pi/.local/lib/python2.7/site-packages/minimalmodbus.py", line 795, in _performCommand
    response = self._communicate(request, number_of_bytes_to_read)
  File "/home/pi/.local/lib/python2.7/site-packages/minimalmodbus.py", line 930, in _communicate
    raise IOError('No communication with the instrument (no answer)')
I've checked and double checked my cable pin-outs with a multimeter. I'm not sure if one of two things happened.
  1. The USB to serial adapter got fried when I plugged both it and the bluetooth adapter into the RJ-11 port
  2. Connecting with he Renogy DC Home app installed new firmware that prevents rogue agents from talking to the serial port
I know this isn't your software, but just curious if you've ever seen something like this happen (firmware updates or fried USB adapters).

I'd really like to get it working again. I'd consider trying your software, but I didn't see explicit support for my charge controller. It might be easy enough to create a Renogy Rover module given that the existing software makes it pretty easy to understand which registers it's reading (I'm a software engineer by trade, so creating something like this is within my wheelhouse).

Again, thanks for reading if you got this far. Any thoughts you might have are really appreciated!

thanks
scott nichol
 
Hey everyone!
I am stuck on installing this on a pi4 cannot seem to get through Prometheus setup. is the "cheat sheet" the latest guide? I am usually very good at this type of stuff but man i am really not having a good start here. ha ha i feel like an idiot but need help here
 
There seems to be some commands missing where the cheat sheet assumes I know commands I’ve crossed referenced most to get to this point like creating the ram disk and mounting it but stuck at configure Prometheus… steps right after setting up disk and mounting it…step is: cat > prometheus.yml
 
Last edited:
I have the same issue where devname, 1 is not how my controller is setup and i cant change in controller. how would i edit your code to change it to 255? cannot find file but i know where to change it in file.
 
Looks like you're making progress, the cheat sheet assumes you're familiar with basic Unix commands. You can find plenty of tutorials online if you need help.
 
I have the same issue where devname, 1 is not how my controller is setup and i cant change in controller. how would i edit your code to change it to 255? cannot find file but i know where to change it in file.
Use any Unix text editor to change the files. I use vi, but there are easier editors to use for beginners. Look online for options
 
I have everything working except the "Add prometheus to systemctl so they start automatically at boottime" I can manually run it (./prometheus)but none of the settings are in when i run it locally but it does work. Any hint on how to add prometheus as a startup service? totally stuck on that part as to where to add global config.
 
Use any Unix text editor to change the files. I use vi, but there are easier editors to use for beginners. Look online for options
Freaking vi is the reason I became a Windows admin vs a Unix admin. ?
Whoever thought up the key combinations was high at the time.
 
Back
Top