theneweinstein / somneo

Home Assistant custom component for Philips Someo
32 stars 18 forks source link

Somneo becomes unresponsive with new version #30

Closed Frank071 closed 1 year ago

Frank071 commented 1 year ago

The installation of the new version (post 3.1.3) has triggered twice now that the Somneo becomes unresponsive for both this integration and the native Philips app. Connections to the IP address simply fail. This can only be resolved by disabling and re-enabling the WiFi connectivity on the Somneo itself. It looks as if something introduced in these new versions exhausts the network stack of the device. Not sure how to debug this, as you'd need a look inside the system...

(downgrading to 3.1.3 seems impossible, as the integration complains about the config file - I assume this is due to a migration change)

theneweinstein commented 1 year ago

Hi Frank, I tried to make the change from 3.1.3 optional in a new version. You could try this in the master branch. Under "Configure" you can turn off the reuse of TLS connections (that was the change in 3.1.3). This is again a 'breaking change' that will only allow you to go back to previous versions via a back-up (so make one before testing) or changing the core.config_entries file in .storage manually.

Let met know if this improves the problem, then I will create a new release.

Frank071 commented 1 year ago

I'll try in a few days time. For now I solved it by changing the HA somneo package such that (a) it requires the previoys pysomneo package and (b) does not use any of the powerwake features (that was introduced in the latest pysomneo package as well, so it seems). I am not sure where the problem lies exactly, although I was suspecting it to be the TLS change, now I am less sure. The difficulty is that the Somneo device is not very debuggable... I will keep you posted (though I would expect others to suffer from this non-responsiveness as well sooner or later).

confucius78 commented 1 year ago

Yep +1 🙂

So what do I do if I installed this through HACS..? Re-download and choose 'master'? No backup needed, it disconnects every day, sometimes even twice per day, so it can only get better

theneweinstein commented 1 year ago

I had a look again at the code. By adding the powerwake functionality, it requested a seperate update for all 16 alarms instead of 1 call to update all alarms. I guess this caused the slow response of the component. I rewrote the code so it uses again a single call to update all alarms at once. This is implemented in version 3.1.7. Could you give it a try and see if it solves the slow response problem?

confucius78 commented 1 year ago

I won't celebrate just yet, but this is the first day in a week with zero dropouts 🙂

Keep you posted!

Frank071 commented 1 year ago

Sorry... holidays has severely delayed my response. This new version seems to no longer have the problem of depletion. Great!

theneweinstein commented 1 year ago

Great, then I close this issue.