ptarcher / pvstats

PVStats is a tool used to connect to your inverter using Modbus TCP, scan for various power figures, and then upload the data to various report services.
Apache License 2.0
14 stars 11 forks source link

Add default HTTP timeout, and some minor fixes #6

Closed VenKamikaze closed 12 months ago

VenKamikaze commented 4 years ago

I switched to using pvstats today with a solax inverter that is on the edge of my WiFi network and has poor connectivity.

I noticed that pvstats had hung for about an hour without reporting.

I had a check on a hunch and noticed that there were no default HTTP timeouts built in for the solax or fronius inverters, or for POSTing data to PVOutput.

I've added these timeouts as a configurable parameters (http_timeout_sec).

If not specified it will default to 10 seconds for pulling data from the solax or fronius inverters, and 20 seconds for POSTing data to PVOutput.

I've run with the changes and it seems OK, but I have only tested with the solax inverter and pvoutput report.

I also updated the README.md slightly to add build steps that worked for me, and changed the systemd unit to use '--cfg /etc/pvstats.conf'.

Apologies if I'm not following your contribution standards properly.

VenKamikaze commented 12 months ago

Closing, as I've updated my fork with newer code that includes specific changes I required for my environment. This is no longer a PR that can be simply merged without changes.