panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

Update of climate.panasonic_ac is taking over 10 seconds

Open codyc1515 opened this issue 2 years ago • 4 comments

Integration should not be blocking start-up on HASS.

Receiving below error message in logs:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:961
First occurred: 10:24:07 (1 occurrences)
Last logged: 10:24:07

Update of climate.panasonic_ac is taking over 10 seconds

codyc1515 avatar Oct 04 '23 21:10 codyc1515

Hi @codyc1515 The problem is that we are at the mercy of the Panasonic API and especially if you have the energy/power sensor active. That call can be extremely slow, sometimes it can take way over 30s, I'm currently working on a version where the update calls are moved to a separate update thread. Unfortunately, my Panasonic HVAC is currently broken, and I'm waiting for the technicians to come and fix it.

sockless-coding avatar Oct 29 '23 08:10 sockless-coding

Interesting. I don't recall this being an issue in the past with our Homebridge plug-in but wouldn't surprise me at all today given how notoriously unreliable the API is. I can take a look at this over the next week or two if you like. A quick workaround may be to simply introduce some simple timeouts for API requests. If it's going to respond I'd imagine that would typically happen in under 4 seconds, for sure.

codyc1515 avatar Oct 29 '23 19:10 codyc1515

The best workaround to increase the responsiveness is locking the API IP to a single IP so the HVAC and HA are connected to the same server. This did not get better when they switched to AWS hosting, when I resolve accsmart.panasonic.com I get at least 4 different IPs. Seems like not all data, especially not the deviceHistoryData is automatically synced across all servers. So when you do a request for the history, it needs to propagate around their servers.

sockless-coding avatar Oct 29 '23 19:10 sockless-coding

Possible duplicate of #47

codyc1515 avatar Jan 09 '24 21:01 codyc1515