Switching heat for Netatmo climate device is not reflected in UI

Hello,
I have a problem with the Netatmo thermostat. Basically by clicking / using the various buttons on the card, the changes are sent correctly to the Netatmo server, but the card interface in dashboard is not updated, it only changes after 5 minutes instead of changing in real time.
This didn’t happen until last winter, that is when I used this integration often, but a few days ago I tried to start from scratch with HA by cleaning the config (flush the content) folder and I noticed these problems with this integration. I tried to activate remote access using Duckdns and port forwarding, or using the dns of the fritzbox, I also installed this custom integration in HACS, tried different browsers, but nothing to do unfortunately. I tried few minutes ago with NABU CASA trial, same behaviour, data sent correctly but interface not updated.
In this short video I show what I mean.
Thanks

Registrazione schermo 2020-08-15 alle 16.45.08

ps in log i see only this when adding the integration:
“Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 443 and 80. (21) when accessing ‘https://api.netatmo.com/api/addwebhook’”
but not happened using nabu cloud integration.

pps all is updated, tried beta channel also without luck.

Thanks for reporting this issue.

Since this is not related to the pre-beta test I moved this to it’s own thread.

I pushed a fix for this. (https://github.com/home-assistant/core/pull/38923)

1 Like

Super quick response, thank you cgtobi!

1 Like

It just got merged and should be distributed with 0.114.2.

1 Like

I will wait patiently :cowboy_hat_face:

1 Like

Hello again, I just downloaded the new 0.114.2 version but I don’t understand if the fix is here or not. The integration still not reflect the ui, maybe I need to delete the integration and reinstall it?
Thank you

No need to reinstall the integration. Are you using the HACS version or normal release? You gotta remove the HACS version as it has served it’s purpose and wont be updated until the next test cycle.

This is how quick the current release (0.114.2) reacts.

2020-08-18 14.53.55

I have installed all HassOS from scratch so no HACS installed. However i have the same issue, i tried reinstall the integration but nothing changes, tried firefox/chrome/safari, same issue with all ad blockers disabled, cookie accepted ecc ecc. The rest api that i use with ios shortcuts works well so the problem is the same, only the ui not reflected but backend working well.

Do you have a thermostat or valve?
Could you rephrase your problem? My impression was that the “heating” button was not working correctly.

I have the thermostat.

My impression was that the “heating” button was not working correctly.

All The buttons and switches works, pressing the “heating” button activate correctly the boiler and the netatmo site show it’s heating too. i have also created a siri shortcut to toggle the thermostat using HA rest api and it’s working here too. Only the lovelace ui card is not updated.

That is strange. That screen cap above was made just minutes ago on 0.114.2 right after the update.

Can you check in the deveoper tools -> states if the state of the thermostat changes from auto to heating when you click the button?

I don’t know if i checked correctly in developer tools, but i think it not switch. however the commands are sent to netatmo server because my boiler starts heating when i press “heating” button. It’s like the response not returns to my HA server. I enabled logging for the component and i see only this:

2020-08-18 15:29:22 ERROR (MainThread) [homeassistant.components.netatmo] Error during webhook registration - 400 - Bad request - Allowed ports for webhooks are 443 and 80. (21) when accessing ‘https://api.netatmo.com/api/addwebhook
2020-08-18 15:35:13 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-08-18 15:36:13 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available

Registrazione schermo 2020-08-18 alle 15.37.22

I try to explain better:

  • Click “heating” button: the card ui not change, in developers tools the state is not changed, the Netatmo server received the command and my boiler starts heating correctly.

  • Click “auto” button: the card ui not change, in developers tools the state is not changed, the Netatmo server received the command and stop heating, my boiler stops heating too, all works correctly.

  • Changing state from developer tools change the card ui correctly.

Ah, there is the problem. Webhook is not registered. To get the level of responsiveness shown above you either need to expose your instance on port 443 (via a reverse proxy for example) or have an active Nabu Casa subscription. Otherwise you have to wait until the backend is called again which might take up to 5 minutes.

1 Like

Ok i understnd, but why the integrations was working fine without exposing to the internet in the previous versions? I access my HA instance through my VPN server and the thermostat was working correctly :frowning:

It is still working correctly. If you’ve felt that the integration was more responsive it may be because it was polling too often. The polling was reduced to work within the limits of the Netatmo API.

1 Like

Ah ok, makes sense, but like i said in the first post i have this problem with Nabu Casa too, the ui not update.

Well, in that case, do you use your dev credentials (required if you have a camera) or the HA Cloud link?

Also, please raise the log level to INFO for the netatmo integration and restart to see whether the webhook is registered successfully.

In Netatmo dev page, i need to fill “redirect uri” and “webhook uri”?