jmccrohan / pysolarmanv5

A python module to interact with Solarman Data Logging Sticks
MIT License
116 stars 25 forks source link

v5_error_correction #43

Closed kellerza closed 10 months ago

kellerza commented 10 months ago

From the docs it seems this parameter should be v5_error_correction and not error_correction?

kellerza commented 10 months ago

Related, what is the best way to ensure a reliable conneciton for constant monitoring?

Is auto_reconnect=True enough? Or would you recommend to disconnect & reconnect on a V5FrameError?

githubDante commented 10 months ago

Most of the time auto_reconnect is OK. I ended up with handling (NoSocketAvailable, struct.error) in a try/except block, read retry after a second and reconnecting if it fails again. This is the result

Edit: Thanks for your work on sunsynk. I learned a lot from there during my DEYE research.

kellerza commented 10 months ago

Thanks @githubDante !

Are you using this to read,- would you recommend re-creating the driver on each read as well?

githubDante commented 10 months ago

No. I use a data collect daemon/service built around the library and pysolarman. It is connected to the datalogger 24/7.

I think this is already way beyond the scope of this pull request, so let's move the conversation to an issue if necessary.

jmccrohan commented 10 months ago

Well spotted @kellerza. Thanks for your contribution.