diy solar

diy solar

Off-grid Solar / Battery monitoring and control freeware

When you say "scp the data from the pi", can you point me in the direction of how to do that?
 
And along that vein, does anyone have any stats on how much data this pushes? I'm setting this up to run through a cellular modem out at a remote site and looking to figure out what size data plan I might need. If no one knows it, I'll have an answer in about a month. ;)
 
First you need to make a virtual centos machine in the Google cloud, install grafana on it, then you can scp your data and view it in the cloud.
That's a whole new system to learn!
 
Oh boy! Before I get there...now that I've got it spitting out the raw text, how do I get that to display on a Grafana dashboard? The end of the cheatsheet just says, "Now we can start to add our own Solar monitoring metrics and graph them" but I don't understand how to do that.
 
On my github page, look at the steps for setting up a Pi, you have the majority of steps done, you just need the Grafana/Prometheus/node__exporter part. Make sure you configure the ramdisk.
To test Grafana, ensure you can see all the machine metrics before you add the solar data.
 
I think I've got all that done. I can see the machine metrics on Grafana. I'm just not sure how to add the solar data. Is that done in Grafana, or do I push that somehow on the Pi side through Prometheus or NodeExporter?
 

Attachments

  • grafana.png
    grafana.png
    61.2 KB · Views: 35
Whoops, found a problem:
Code:
level=info ts=2021-01-16T23:31:22.393Z caller=node_exporter.go:112 collector=zfs
level=info ts=2021-01-16T23:31:22.394Z caller=node_exporter.go:191 msg="Listening on" address=:9100
level=info ts=2021-01-16T23:31:22.394Z caller=tls_config.go:170 msg="TLS is disabled and it cannot be enabled on the fly." http2=false
level=error ts=2021-01-16T23:31:29.487Z caller=collector.go:161 msg="collector failed" name=mdadm duration_seconds=0.000156741 err="error parsing mdstatus: error parsing mdstat /proc/mdstat: open /proc/mdstat: no such file or directory"
level=error ts=2021-01-16T23:31:39.481Z caller=collector.go:161 msg="collector failed" name=mdadm duration_seconds=0.000160722 err="error parsing mdstatus: error parsing mdstat /proc/mdstat: open /proc/mdstat: no such file or directory"
 
Ok, your very close, to get the data in grafana, the script must write the xx.prom file in the /ramdisk directory

So start the script and check that the file is written every 10 seconds

If you have configured node_exporter correctly it will load the data into the prometheus database.

Then you need the jason file in grafana to show the report or you can create one.

Does the df command show the ramdisk folder?
 
Check you are getting correct data in the /ramdisk folder like this.

[joe@pi4]~) > ls -l /ramdisk
total 0
-rw-r--r-- 1 root root 444 Jan 3 22:10 Renogy.prom
-rw-r--r-- 1 root root 376 Jan 3 22:10 Renogy.prom.tmp

Send me the output of this command
# cat /ramdisk/Renogy.prom
 
Last edited:
Awesome work! @BarkingSpider

I don't own a RPi but have an Amlogic S905X TV box that will run Armbian
Install script attached (mostly taken from BarkingSpider's Pi's Setup Cheat Sheet) adapted for Armbian installation

Still exploring Grafana as I haven't used it before
 

Attachments

  • armbian-solar-setup.sh.zip
    2.7 KB · Views: 13
Thanks for all this great work. I'm building a "smart garden" and the plan is to run OpenSprinkler on my Pi3B+to manage irrigation, while also running a garden cam with MotionEye on the same. Irrigation will be 4x 55gal rain barrels and powered by a 12V on-demand pump from the battery. Plan is to power the pi, OpenSprinkler control board, 12V pump and sprinkler valves by solar using a 100W panel, Wanderer, and 12V Battery. I've got everything together but testing out whether I have enough solar input to keep to going 24/7 (with reserve for cloudy days). This project will go a long way to fine tuning my system. I tried reading from my Renogy Wanderer with an off the shelf 232-usb adapter, but that didn't work, so I'm gonna try your wiring solution. Would this combo work getting data from the Wanderer to Pi?:

RJ12 running through CAT-6 to: Sysly DB9 RS232 Serial to Terminal
then: USB to RS232 Adapter with PL2303 Chipset into the USB port of Pi

I already have a Grafana server up and running for my homelab, so I can't wait to see my solar set up pipe into it! Data and stats galore!
 
Cool project!
Yep, that's the same breakout connector I use. Then make up a custom (3 wires only) cat5 cable with the RJ plug to fit into the RS232 port on the Renogy. Then use my code on GitHub to get all the data. Post here if you need any help.
 
Back
Top