diy solar

diy solar

Off-grid Solar / Battery monitoring and control freeware

This is cool. I built something similar using a Raspberry Pi running Android things, reading from my Victron gear via VE Direct and from a chinese bluetooth bms over wire. Nice to be able to pull up a system snapshot from Google Firebase when a cell started to get wonky, or really from whenever - based on whatever. Communicates via Mint Mobile 8gb/mo plan in a GL-iNet MiFi which is way overkill, but I use it for working remotely while camping too. Built an iOS and Android app to read all of it, even an app for my truck's android head unit. Following along, can do some awesome stuff when you have access to all the data!
 
When you are ready to offer this product I'm willing to pay for it! I have the Pi's in hand and the Epever!

Not so sure I'm fit to test anything. Unless you want to see if a total dumba$$ can use it. In that case I'm your man. I will pay for it tho!

Let me join too :)

Have a epever xtra 3210 and an epever ipower 1500 inverter.
at the moment I have them connected with a ESP-01 and the windows tools are working perfect with both devices, but I would like to start collecting data on my raspi

Thanks and keep on the good work, looks amazing!

Willem
 
I have started documenting the process in github. I will add the epever code shortly. For now work on getting Grafana working on a Pi Zero or Pi 4 using the cheat sheet already posted. The rest is very easy to add.
Let me know when your ready.


For the Pi4 I chose this model with 4GB. https://www.amazon.com/gp/product/B07VYC6S56/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Get a 32GB card (2 for $20), this makes for a fast development machine that can do anything.
Storage is so cheap now just a few dollars more than 16GB, allows for future expansion and other projects. https://www.amazon.com/PNY-Elite-mi...refix=32GB+micro,electronics,214&sr=1-12&th=1

For deployment get the Pi Zero, way cheaper .. https://www.amazon.com/gp/product/B0748MPQT4/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

again use the 32GB card, storage is so cheap now just a few dollars more than 16GB, allows for future expansion and other projects.

Use this USB adapter to power your Pi Zero, plugs right into the Epever Triton series... https://www.amazon.com/gp/product/B07NKNBZYG/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Then you run a usb/rs485 cable straight into the Epever data port and your up and running. https://www.amazon.com/gp/product/B081JW5M4L/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Joe.
 
Last edited:
I have started documenting the process in github. I will add the epever code shortly. For now work on getting Grafana working on a Pi Zero or Pi 4 using the cheat sheet already posted. The rest is very easy to add.
Let me know when your ready.
Hi Joe,

System is up and running :)
Your instruction worked like a charm.
using at the moment a Pi 3B, had this one left over with 32 GB SD Card

I'm not an expert in coding,. but try to support in anyway I can

Willem
 
Thats great! For the Epever Triton Inverters, you need to install a special RS485 serial interface. It installs as /dev/ttyXRUSB0
You have the 3210 right? I will work on getting the code up today for you.
Do you have node_exporter giving you all the host metrics?
Joe.
 
Hi Joe,

Thanks, indeed I have the 3210.
Node_exporter is working like a charm
Unbenannt.PNG

Will check for the installation of RS485, that's what I didn"t do yet.
Willem
 
I've uploaded to github a simple script to read data from Epever/Triton charge controllers. If your Epever controller works with the MT-50 display, this script should work for you. It writes simple ASCII to STDOUT at this stage. If the data is to be used by Prometheus / Grafana, the data needs to be formatted differently and placed in the /ramdisk folder . Right now, I do this with a simple BASH script, but I intend to update the Python script to do this in one step, and update the script to Python3 from Python2.

Read this before you do anything: https://github.com/BarkinSpider/SolarShed/blob/master/Readme-Epever-Triton

Here is the python script: Let me know if you get this working as-is and I will upload the missing parts to make it work with Grafana.

 
Last edited:
Hi Joe,

Didn't managed yet to get it working.
in row 201 and 207 it first gave an error, both rows was missing #
Installed the missing modules for Python except one.
Atm stuck on
/usr/bin/python: No module named pyepsolartracer.registers
Looking now how to get that installed in Python2.7

Willem
 
Sorry had to drink a coffee before testing :)

all working fine and getting all the results

{0: 'EPsolar Tech co., Ltd', 1: 'TriRon3210', 2: 'V01.54+V01.22'} 0x3100: pvVoltage: 13.9 v 0x3101: pvCurrent: 0.21 a 0x3102: pvPowerL: 3.01 w 0x3104: batteryChargeV: 12.57 v 0x3105: batteryChargeC: 0.24 a 0x3106: batteryChargePowerL: 3.01 w 0x310C: loadVoltage: 0.0 v 0x310D: loadCurrent: 0.0 a 0x310E: loadPowerL: 0.0 w 0x3110: batteryTemp: 25.45 c 77.81 f 0x3111: deviceTemp: 30.02 c 86.036 f 0x311A: Battery S.O.C: 54.0 % 0x3300: pvMaxInVolts: 21.3 v 0x3301: pvMinInVolts: 0.11 v 0x3302: batMaxVolts: 13.16 v 0x3303: batMinVolts: 12.06 v 0x3304: consumedEnergyTodayL: 0 w/h 0x330C: genEnergyTodayL: 110 w/h 0x3200: batteryStatus: 0000000000000000 bits 0x3201: equipStatus: 0000000000001011 bits runningOk: 1 fault: 1 chargeStatus: 2 Bulk pvError: 0 0x9000: batType: 1 0x9001: batCap: 120 ah 0x9002: batComp: 300 0x9003: hiVDiscon: 16.0 v 0x9004: chargeLimitV: 15.0 v 0x9005: overVRecon: 15.0 v 0x9006: eqVolts: 14.6 v 0x9007: boostV: 14.4 v 0x9008: floatV: 13.8 v 0x9009: boostReconV: 13.2 v 0x900A: loVRecon: 12.6 v 0x900B: underVRecover: 12.2 v 0x900C: underVWarn: 12.0 v 0x90OD: loVDiscon: 11.1 v 0x900E: dischargeLimitV: 10.6 v Battery is Charging in Bulk mode at 3.01 Watts

Using now also the script and have the message: starting Epever LifePO4 serial data collection every 4 seconds, but have to check why no data is shown in Grafana
The Data is written on /ramdisk, but after checking only the txt file and not *prom

Unbenannt.PNG

Willem
 
Last edited:
Fantastic, great to see you have it running, please send me any steps you needed to take that I missed on my cheat-sheet so its easier for others. Your the first! #1 ....

Check node_exporter has the ramdisk set as a flag as in the cheat sheet. Thats key to get the data into prometheus.

Also I loaded at github a JSON page with my Grafana graphs you can use.
Joe
 
Hi Joe, made a small adjustment in the script and it is running now.
You see that the file is create and put in the SolarData.txt.prom
Unbenannt.PNG
What I did with the to make it work was removing /ramdisk/ from line 57 till the end, because it was already stated in line 38

The JSON I already imported in Grafana that is running inlcuding all data what is now collected :)

many many thanks for this.

willem
 
Okay, you talked me into taking the plunge. Pi 4 8gb on the way. New to linux, so this should be fun. Currently poll Chargery and Tracer data using a Teensy 3.2 and Nextion displays, but this looks much easier to manage.
 
Assuming this is all set up and good to go, how would you incorporate jblance's mpp-solar script into grapha?
Grafana is the easy part . John Blances Python allows you to pull data from the inverter, you then take that data and put it in a time series DB. He uses influx rather than prometheus. Once in the data base you can use that data base as a data source for grafana. It's very simple to draw pretty graphs once you have the data source configured in grafana. Grafana has nice drop downs and builtin graph types to help you graph whatever is in the database. I have been impressed how good grafana is and also switched my work project to use grafana now
 
Hi,

It's really worth it to give it a try. if you need support just give a shout.
but if you follow the instructions Joe wrote, you don't need much Linux knowledge

Willem
 
Back
Top