Solar Inverter Fun
As per the previous posts on this solar project, I had managed to identify that It was possible to talk to the data loggers connected to my inverters from my local network. Reading up further on this I found that loggers use a proprietary protocol (Solarman v5 protocol). Several fantastic folks have done the leg work on and built libraries that use Modbus type calls to pull the data.
The project that I had the best initial experience with was solismon3. This one was able to collect data from one of the sticks I used straight away.
However, when I pointed the same software at the second inverter it didn’t get anything meaningful back at all. After reading some more, it seems that even inverters in the same family expose the data on different ports. I ended up having to scan huge numbers of registers and attempt to map them back to known values. (Fixed things like ‘yesterdays total generation’ are easiest to find). Once I found a few fixed values in the data, it was then possible to reverse search for values. This post matched the registers I had and allowed retrieving a richer set of data.
For the record, my smaller inverter exposes data as follows :
# Thanks to acmorfe in thread https://github.com/graham0/ginlong-wifi/issues/5 for register information this
all_regs = (
(3005, (
('ac_power', 'Current AC Power*10'),
('*not_known', 'Unknown'),
('pv_power', 'Current PV Power*10'),
('*not_known', 'Unknown'),
('total_energy', 'Total Energy'),
('*not_known', 'Unknown'),
('month_energy', 'Months Energy'),
('*not_known', 'Unknown'),
('last_month_energy', 'Months Energy'),
('todays_energy', 'Todays Energy*10'),
('yesterdays_energy', 'Yesterdays Energy*10'),
('*not_known', 'Unknown'),
('years_energy', 'Years Energy'),
('*not_known', 'Unknown'),
('last_years_energy', 'Last Years Energy'),
('*not_known', 'Unknown'),
('dc1_voltage', 'dc1 voltage*10'),
('dc1_current', 'dc1 current*10'),
('dc2_voltage', 'dc2 voltage*10'),
('dc2_current', 'dc2 current*10'),
)),
(3035, (
('ac_voltage', 'ac voltage*10'),
('ac_current', 'ac current*10'),
)),
(3041, (
('temperature', 'temperature*10'),
('frequency', 'frequency*100'),
('status', 'status 0-2 init, 3 ready, error')
)),
(3072, (
('system_year', 'System Year(0-99)'),
('system_month', 'System Month'),
('system_day', 'System Day'),
('system_hour', 'System Hour'),
('system_minute', 'System Minute'),
('system_second', 'System Second')
))