nmakel / solaredge_modbus

SolarEdge Modbus data collection library
MIT License
147 stars 36 forks source link

Grid Status, off/on grid - Found #92

Closed herbi3 closed 5 months ago

herbi3 commented 11 months ago

After some testing, instead of trying to support the Backup Interface, which is likely to never happen. I found some existing values that represent off-grid mode and would be ideal to add this in.

basically, if you have a BUI and are in off-grid mode, the voltage_ln goes to a negative value of -32768

during this time, the meter data itself report power, l1_power, l2_power, l3_power, l1_power_factor, l3_power_factor, l3_power_factor all report the same -32768 value. in my code that processes the data, it reverses the values for power, l1_power, l2_power, l3_power (i.e positive means importing and exporting is negative)

power_factor during this time just reports 0

what this means is, during an off-grid event based on the values above, if you're using the meter data to calculate consumption, then it will add in 32768watts to your consumption, which is incorrect. so during off-grid events, the meter power values need to be hard set to 0 if the voltage_ln is below 0. I've attached images of my consumption before I realised this (I am on three phase, Australia)

hopefully this helps out someone else in the future.

IMG_0992

Screenshot 2023-12-10 at 7 18 51 am