core
core copied to clipboard
Delay of status detection with BTicino LivingNow (NETATMO Integration)
The problem
HASSIO update the state of the switch after a couple of minutes. it's not instantaneous! This creates problems in automations
What version of Home Assistant Core has the issue?
core-2023.9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Netatmo
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @cgtobi, mind taking a look at this issue as it has been labeled with an integration (netatmo
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of netatmo
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign netatmo
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
netatmo documentation netatmo source (message by IssueLinks)
This is a known limitation. We are working with Netatmo to improve this.
ah ok...I look forward to the update Thanks!
It is very frustrating. I think it must be their system as Google Home has the same problem. Any ETA?
Many thanks Dan
Please understand that I can't and wont give ETAs.
I have the same problem. it looks like the updates are pushed with some scheduled job instead of synchronously
As long as Netatmo does not provide webhook events for those devices we are limited by the polling limits of the API. Not much we can do about. You can watch the webhook events sent by Netatmo and send them my way so I can handle them in the integration. But since I don't have such devices nor access to some I can do much.
I see, netatmo doesn't expose the status/temperature change events in their API. Anything I can do to support? I am a software engineer and I could contribute but I guess you can't do anything your side unless netatmo doesn't add the events to the API
You can monitor the incoming webhook events in HA to see whether Netatmo sends something useful. Usually their documentation is behind.
By looking at the documentation and the logs, I guess the problem might be pointed in this error message: Webhook not registered - https and port 443 is required to register the webhook. It's probably mandatory to access HA via SSL and 443 port, otherwise there's some conflict with the sacurity policies. I'm currently accessing with http and via 8123 port.
That sounds likely. I wouldn't recommend exposing HA (or anything else) without SSL to the WAN anyway.
What I don't understand is: who said it's mandatory to publicly expose the HA to the interenet in order to use Netatmo Cloud integration? Installing the integration in a local instance is allowed anyway. Or did I get it wrong?
For those interested in this topic: solved by increasign the frequence of the update. Create a new automation like the following YAML. Be careful to set the name of your Netatmo Home entity accordingly. and... merry xmas!
alias: Netatmo reload every 1min
description: ""
trigger:
- platform: time_pattern
minutes: "*"
hours: "*"
condition: []
action:
- service: homeassistant.reload_config_entry
target:
entity_id: select.zara_home
data: {}
mode: single
It is not. But webhooks make it mandatory. They are not required but improve responsiveness in some cases.
For those interested in this topic: solved by increasign the frequence of the update.
Create a new automation like the following YAML. Be careful to set the name of your Netatmo Home entity accordingly.
and... merry xmas!
alias: Netatmo reload every 1min
description: ""
trigger:
- platform: time_pattern
minutes: "*"
hours: "*"
condition: []
action:
- service: homeassistant.reload_config_entry
target:
entity_id: select.zara_home
data: {}
mode: single
I strongly advise against doing this. This violates the Netatmo api polling rate limits.
For those interested in this topic: solved by increasign the frequence of the update. Create a new automation like the following YAML. Be careful to set the name of your Netatmo Home entity accordingly. and... merry xmas!
alias: Netatmo reload every 1min
description: ""
trigger:
- platform: time_pattern
minutes: "*"
hours: "*"
condition: []
action:
- service: homeassistant.reload_config_entry
target:
entity_id: select.zara_home
data: {}
mode: single
I strongly advise against doing this. This violates the Netatmo api polling rate limits.
I referred to a comment I found in the community, saying the polling limit has recently been increased to 500reqs/hr. Indeed the workaround provided above is running since 2 days with no errors. Link to the comment: https://community.home-assistant.io/t/netatmo-poll-refresh-time-is-currently-10-minutes-ideally-should-be-5-minutes/44524/18
Yes, I am aware of that but forcefully restarting the integration sounds like a pretty uncommon solution though. I am experimenting to make use of that depending on the signup method.
Hi - Just checking if this is actually fixed and #106742 is deployed, as it still takes c. 3mins for HA to see a change made on a physical switch or the netatmo app. Is there something I need to do to get this increased frequency of polling? I just renovated a house around Legrand, so I hope this can be made more reliable! Many thanks.
Yes, this is released. But to take full advantage you have to use a netatmo dev account. Further improvements on responsiveness can only be achieved when Legrand/Netatmo provide either local access or webhook events for those devices.
Thank you. I have now done all that. Got Nabu Casa. Got my developer account. Set up credentials. Netatmo appears linked and finds devices. However it appears to poll once per minute on the minute and gets a result 4s later - so you can end up waiting for up to 60seconds. Is this normal, or can it be made more frequent? I also found this in debug logging on one of the minutes it did a poll and found a change: 2024-02-11 21:09:00.937 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 74
Many thanks
Yes, this is to be expected. We currently don't poll more frequently than once per minute.
Perfect, thank you for confirming and thank you for doing the fix.