solmoller / eversolar-monitor

Script to capture data and create statistics from Eversolar/zeversolar Solar Inverters. Includes easy install image files for Raspberry Pi. Working edition since 2012 :-)
https://github.com/solmoller/eversolar-monitor/blob/wiki/Introduction.md
MIT License
30 stars 20 forks source link

Fixes and added functionality #49

Closed kiekerjan closed 4 years ago

kiekerjan commented 4 years ago

First of all, I think I messed up and now have one giant diff instead of nice little changes. Sorry for that :( I started out with the code of solmoller, and encountered some issues (notably #43, #47 and #48). While fixing those, I added some other stuff that I found convenient (your mileage may vary ;) ) The content: the summary can be found in the commit log. The most important change I made was to use the daily table in the local sqlite database.

kiekerjan commented 4 years ago

I tested most of this for the past 10 days and seems to be working fine. Only the error catching code in the send_packets sub is more recent, but it does what I intended it to do. In my situation, my serial to tcp converter shuts down when there is no more sun, so I could not test the behaviour around midnight. It should store a daily entry for each inverter a little before twelve and then reset the daily read status somewhat after 12.