pbix / HA-solark-PV

Home Assistant integration for the SolArk PV Inverter
Apache License 2.0
37 stars 9 forks source link

Add information on mbusd timeout #10

Closed EiNSTeiN- closed 2 years ago

EiNSTeiN- commented 2 years ago

I'm running this integration using mbusd setup as a TCP/IP gateway, which is running on a different raspberry pi than my home assistant.

After adding this integration the entities kept flipping to Unknown status back and forth fairly consistently. I figured out that increasing the timeout value for mbusd was the solution.

My educated guess is that since the update rate is 60 seconds and the default timeout is also 60 seconds, the timeout on mbusd side would disconnect the client whenever the update process didn't kick in at exactly 60 seconds on HA's side. It creates a racy situation where every few updates would trigger the Inverter is unreachable state until the next update 60 seconds later would reconnect to mbusd and read all values successfully.

I added a note in the readme in case this trips up other people as well.

audreez commented 2 years ago

would be great to add an option to change these values on the fly

pbix commented 2 years ago

Some great thoughts. In my setup I am using a 10 second poll rate and it works good for me. So I think a combination of a reduction in the default poll value to 20 seconds and then the addition of your comment would be best. That way people can just use the default values without any additional study. Could you resubmit your pull with these two changes?

EiNSTeiN- commented 2 years ago

@pbix I updated the value & the mention in the README for the new default.