jeanmarc77 / 123solar

123Solar is a lightweight set of PHP/JS files that makes a web logger to monitor your photovoltaic inverter(s). It just need a web server and PHP, no databases are even needed. The philosophy is: To keep it simple, fast, with a low foot print to run on cheap and low powered devices.
GNU General Public License v3.0
36 stars 12 forks source link

Fronius data receive problem #34

Closed riogrande75 closed 1 year ago

riogrande75 commented 1 year ago

I noticed that fronius inverters sporadically do not deliver correct data (empty JSON datasctructure). This leads to strange spikes in 123solar logging.

Therefor I updated fronius script (fronius.php) at line 25: if ((json_last_error() == JSON_ERROR_NONE) and ($dataarray['Body']['Data']['TOTAL_ENERGY'])) { This validates, if structure ist not empty (existence of Body/Data/TOTAL_ENERGY) and solved my problem.

Could you pls. add this to actual codebase?

jeanmarc77 commented 1 year ago

updated in GIT https://github.com/jeanmarc77/123solar/blob/main/scripts/protocols/fronius.php