openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[netatmo] Add a buffer to lower Home API requests #16561

Closed clinique closed 6 months ago

clinique commented 6 months ago

I think that like it has been done for weather requests ( PR #15590 ) it makes senses to do the same with Home API related requests. I observe this when home is refreshed:

11:27:39.982 [DEBUG] [er.capability.ParentUpdateCapability] - Requesting parents data update for Thing 04:00:00:0a:17:b4
11:27:39.982 [DEBUG] [er.capability.ParentUpdateCapability] - Requesting parents data update for Thing 09:00:00:06:3c:74
11:27:39.983 [DEBUG] [er.capability.ParentUpdateCapability] - Requesting parents data update for Thing 09:00:00:06:7f:8e
11:27:39.982 [DEBUG] [er.capability.ParentUpdateCapability] - Requesting parents data update for Thing 09:00:00:03:fa:20
11:27:39.984 [DEBUG] [er.capability.ParentUpdateCapability] - Requesting parents data update for Thing 09:00:00:00:f3:a6
11:27:40.984 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - executeUri GET  https://api.netatmo.com/api/homesdata?home_id=59959297b4809d1aff8b4726 
11:27:41.070 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - executeUri GET  https://api.netatmo.com/api/homesdata?home_id=59959297b4809d1aff8b4726 
11:27:41.282 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - executeUri GET  https://api.netatmo.com/api/homestatus?home_id=59959297b4809d1aff8b4726 
11:27:41.376 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - executeUri GET  https://api.netatmo.com/api/homestatus?home_id=59959297b4809d1aff8b4726 

The difference between Weather API and Home API is that a single refresh of Weather data is done with a single request, while Home API refresh requires homeData, homeStatus and getEvent requests.

clinique commented 6 months ago

This community post : https://community.openhab.org/t/netatmo-bridge-offline-99-of-time/149168/14?u=glhopital can be related.

openhab-bot commented 6 months ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/netatmo-bridge-offline-99-of-time/149168/15