diy solar

diy solar

Monitoring MPP/Clone systems with freeware Pi/Grafana

try running mpp-solar from its installation bin directory, that may work if all else fails
Your path with '.local' is not good, something went wrong there. Change '.local' to 'local'
The directories contain the modules mppsolar are not found.
 
okay, first time I installed it with pip3. So I uninstalled it.
When I tried to run the -m venv I completely missed the dot at the end. Before realizing it I looked at Jblance notes about venv and went with something different.
I created /venv/mppsolar located at /home/solar/ and downloaded mpp-solar with pip3 install -e "git+https://github.com/jblance/mpp-solar.git#egg=mpp-solar"

screenshot.4509.jpg

I uninstalled it once more, and deleted the venv folder.
Then proceeded with your last post instructions with venv and the dot.

screenshot.4510.jpg

I don't seem to have luck.
mpp-solar seems to run with user solar, it just does not detect anything. But it is not even found if run with root


EDIT: Tried the same route but connecting direct USB port (hidraw0, instead of using the prolific adapter as ttyUSB0).

screenshot.4513.jpg
 
Last edited:
So, is everything running ok now? Did you get the Grafana reports working ok?
Some of my graphs expect a chargery BMS for cell level info, you need to delete those.
 
So, is everything running ok now? Did you get the Grafana reports working ok?
Some of my graphs expect a chargery BMS for cell level info, you need to delete those.

I had a hard time understanding how node exporter handles strings. Until I noticed some of your values and used that as a reference.
I'm not used to grafana's interface. I'm very fond to paesler's PRTG MAP making interface and this is quite different.

I tried to edit your dashboard but I'm not able to select single metrics.
I tried to edit one of your graphs. I can select my inverter (just as I named it):
screenshot.4522.jpg

screenshot.4523.jpg

screenshot.4524.jpg

screenshot.4525.jpg



...But if I want to add
Code:
{mode="pvWatts"}
once my inverter is selected, I get an error:
1611192364720.png


So, more or less, this is a success! Now I need to understand grafana and tame its dashboards.
Thanks a lot for your help
 
I had a hard time understanding how node exporter handles strings. Until I noticed some of your values and used that as a reference.
I'm not used to grafana's interface. I'm very fond to paesler's PRTG MAP making interface and this is quite different.

I tried to edit your dashboard but I'm not able to select single metrics.
I tried to edit one of your graphs. I can select my inverter (just as I named it):
View attachment 33943

View attachment 33944

View attachment 33945

View attachment 33946



...But if I want to add
Code:
{mode="pvWatts"}
once my inverter is selected, I get an error:
View attachment 33942


So, more or less, this is a success! Now I need to understand grafana and tame its dashboards.
Thanks a lot for your help


FINAL EDIT (I think!):
screenshot.4527.jpg
 
Looking good. Glad i could help out.

Learning Grafana just takes time, it's a really great investment, it has so many applications.

And its much better than anything available before.
 
After several months I'm quite pleased with the monitoring solution.
I wanted to ask how to expand the data retention. I was surprised that prometheus only retains 15 days of data.

I found a parameter that could be configured in the service file
Code:
'--storage.tsdb.retention.time'

Yet, it won't work:
Code:
systemd[1]: /etc/systemd/system/prometheus.service:11: Unknown lvalue '--storage.tsdb.retention.time' in section 'Service', ignoring

I would like to save at least one whole year. Is this achievable?
 
After several months I'm quite pleased with the monitoring solution.
I wanted to ask how to expand the data retention. I was surprised that prometheus only retains 15 days of data.

I found a parameter that could be configured in the service file
Code:
'--storage.tsdb.retention.time'

Yet, it won't work:
Code:
systemd[1]: /etc/systemd/system/prometheus.service:11: Unknown lvalue '--storage.tsdb.retention.time' in section 'Service', ignoring

I would like to save at least one whole year. Is this achievable?


I'll reply to myself in case any other newbie with systemd like me is struggling with this:
The parameter '--storage.tsdb.retention.time=xxx' is part of the ExecStart= line. This line is truncated by a backslash at the end of every line (except the last one).
If you were to add the storage lines at the bottom, remember to add the backlashes at the last lines. I think I got it working.

screenshot.7432.jpg


Maybe this is extra silly but I'm posting it anyways just in case.
Regards!
 
I'll reply to myself in case any other newbie with systemd like me is struggling with this:
The parameter '--storage.tsdb.retention.time=xxx' is part of the ExecStart= line. This line is truncated by a backslash at the end of every line (except the last one).
If you were to add the storage lines at the bottom, remember to add the backlashes at the last lines. I think I got it working.

View attachment 45939


Maybe this is extra silly but I'm posting it anyways just in case.
Regards!
Thanks for doing all the ground work. What time period does you end up using in the end? Be interesting to see how it impacts query time performance.
 
Thanks for doing all the ground work. What time period does you end up using in the end? Be interesting to see how it impacts query time performance.

Based on absolute ignorance I set 1 year and 1 gigabyte (whatever comes first) as a limit. I just did this so I'll tell you as time passes ?
I'm very used to PRTG historic reports so much that I was about to export the .prom file via SNMP to my home PRTG server. But If the grafana approach can handle 1 or two years to compare summer vs winter, etc. that will probably suffice

cheers!
 
Great thread. Thank you. Wanted to record my experience with an LV2424 hybrid:

These units work with the SolarPower software not the WatchPower software.

I had to manually set the protocol to PI18 to get it to work and the number of commands is much more limited but you can fetch the current status of everything. So for example I would command something like

Code:
mpp-solar --port /dev/hidraw1 --protocol PI18 -c GS

My advice if you have an MPP unit not explicitly supported or tested is to just try all 6 or 7 protocols (outlined in the help output) and hope one of them works.

Hopefully that saves someone else a bit of time.
 
Ok, my plan is to branch your githup. I'll also updated the Chagery Protocol too the latest version. It also reads impedance values of the battery.

my inveter response to the query looks like this:
$ sudo mpp-solar -p /dev/hidraw0 -c QPIGS
Command: QPIGS - General Status Parameters inquiry
------------------------------------------------------------
Parameter Value Unit
ac_input_voltage 233.8 V
ac_input_frequency 49.9 Hz
ac_output_voltage 0.0 V
ac_output_frequency 0.0 Hz
ac_output_apparent_power 0 VA
ac_output_active_power 0 W
ac_output_load 0 %
bus_voltage 327 V
battery_voltage 51.7 V
battery_charging_current 0 A
battery_capacity 67 %
inverter_heat_sink_temperature 30 °C
pv_input_current_for_battery 0.0 A
pv_input_voltage 96.6 V
battery_voltage_from_scc 0.0 V
battery_discharge_current 0 A
is_sbu_priority_version_added 0 bool
is_configuration_changed 0 bool
is_scc_firmware_updated 0 bool
is_load_on 0 bool
is_battery_voltage_to_steady_while_charging 0 bool
is_charging_on 0 bool
is_scc_charging_on 0 bool
is_ac_charging_on 0 bool
rsv1 0 A
rsv2 0 A
pv_input_power 0 W
is_charging_to_float 0 bool
is_switched_on 0 bool
is_reserved 0 bool

So I have to grep for "ac_input_voltage" instead of "grid_voltage" right?

Well inveter is swichted of and it's dark outside so not that input data :D
 
Yes, that looks right, please post a link to your branch and a description of what is for when it's complete and I'll add a link to my repository.

What model inverter is it for exactly?
 
Last edited:
Back
Top