meltaxa / solariot

Leverage your IoT enabled Solar PV Inverter to stream your solar energy usage data to a real time dashboard.
https://solariot.live
MIT License
210 stars 72 forks source link

Support for some new options #78

Closed deanpemberton closed 2 years ago

deanpemberton commented 2 years ago

Hi there, I've got a new SG5K-D and I was using Solariot to update PVOutput. I was getting some strange behavior after the first day as PVOutput was expecting lifetime energy values in v1 and v3 when the c1=1 parameter was used. This resulted in PVOutput rejecting the Energy values when they reset at midnight.

Removing the c1 parameter from updates seems to have solved my problem, but my next idea was to just send the v2 and v4 values and let PVOnline work out the Energy from the intergral.

For more information about the c1 parameter see here for details https://pvoutput.org/help/api_specification.html#cumulative-energy For more information about v2/v4 only see here for details https://pvoutput.org/help/api_specification.html#power-and-energy-calculation

In short, I've added some new config parameters to enable both of these options. People can use them if they are useful for them too.

The other addition here was an "append_log" function so that you can choose to have all the log lines saved. This was useful while I was trying to debug things.

Any other changes are just autopep8 being over enthusiastic.

Ngā mihi, Dean

shannonpasto commented 2 years ago

This sounds like an issue I reported over a year a go https://github.com/meltaxa/solariot/issues/47 I just commented out line 229