jhschuster / homebridge-intesisweb

Homebridge plugin for IntesisHome devices
Other
1 stars 1 forks source link

status update lag #3

Open Red1994 opened 3 years ago

Red1994 commented 3 years ago

When I open the home app, it seems to take some time for the thermostat status to update. I was wondering if the homebridge plugin only scrapes the website in response to the home app updating (and if the cache time has elapsed)? If so, is there a way to make the homebridge plugin scrape the website periodically in the background (at a set interval) so the cache remains current?

jhschuster commented 3 years ago

You're correct. It only grabs the data when it's requested, and then caches it for configCacheSeconds seconds. As you noticed, you can see the delay in the Home app while it's updating. I'm not sure how you'd change it to poll, although there are plenty of other homebridge projects that do poll that could act as a template.

Red1994 commented 3 years ago

thanks. I figured out a work around using hombridge webhooks. I added a dummy sensor with an automation in the home app (using shortcuts) to get the status of the thermostat when the sensor triggers which forces the polling of the intesishome web site. I can then just ping the dummy sensor at set intervals using a simple script to keep the thermostat cache in your plugin refreshed.

On 25 Nov 2020, at 1:23 am, Jay Schuster notifications@github.com wrote:

 You're correct. It only grabs the data when it's requested, and then caches it for configCacheSeconds seconds. As you noticed, you can see the delay in the Home app while it's updating. I'm not sure how you'd change it to poll, although there are plenty of other homebridge projects that do poll that could act as a template.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.