Legrand Netatmo integration doesn't work
The problem
Installed Legrand installation to allow integration of Legrand with Netatmo devices; integration not working on my system.
I have the application configured at dev.netatmo.com using the same login credentials as my Netatmo Gateway.
What version of Home Assistant Core has the issue?
2022.10.5
What was the last working version of Home Assistant Core?
2022.10.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Legrand
Link to integration documentation on our website
https://www.home-assistant.io/integrations/netatmo
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2022-10-24 21:26:53.942 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 164, in async_setup_entry
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
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 closeCloses the issue. -
@home-assistant rename Awesome new titleChange the title of the issue. -
@home-assistant unassign netatmoRemoves 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)
more details.... when I look at the integrations screen, it has a red outline around the Netatmo integration and says error. The only devices connected to my Netatmo gateway are light switches, receptacles, and philips hue lamps. None of these devices populate within home assistant.
I've tried disabling my app on the Dev page, and then re-enabling. I haven't found any way to get it to work yet.
Please provide debug logs and diagnostics to inspect.
My log with integration (which doesn't work) look quite similar:
2022-10-23 19:24:17.761 INFO (SyncWorker_1) [homeassistant.loader] Loaded netatmo from homeassistant.components.netatmo 2022-10-25 16:10:16.115 INFO (MainThread) [homeassistant.setup] Setting up netatmo 2022-10-25 16:10:16.115 INFO (MainThread) [homeassistant.setup] Setup of domain netatmo took 0.0 seconds 2022-10-25 16:10:17.593 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
Logger: homeassistant.config_entries Source: components/netatmo/data_handler.py:199 First occurred: 16:10:17 (2 occurrences) Last logged: 16:10:23
File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry await data_handler.async_setup() File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup await self.subscribe(ACCOUNT, ACCOUNT, None) File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe await self.async_fetch_data(signal_name) File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data await getattr(self.account, self.publisher[signal_name].method)( AttributeError: module 'pyatmo.modules' has no attribute 'NLunknown'
Logger: homeassistant.config_entries Source: components/netatmo/data_handler.py:199 First occurred: October 24, 2022, 9:38:27 PM (7 occurrences) Last logged: October 24, 2022, 10:13:43 PM
Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry
await data_handler.async_setup()
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup
await self.subscribe(ACCOUNT, ACCOUNT, None)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
await self.async_fetch_data(signal_name)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
await getattr(self.account, self.publisher[signal_name].method)(
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 69, in async_update_topology
self.process_topology()
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 58, in process_topology
self.homes[home_id] = Home(self.auth, raw_data=home)
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 48, in init
self.modules = {
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 49, in
2022-10-24 21:26:53.942 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data 2022-10-24 21:38:27.513 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data 2022-10-24 21:44:13.648 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo
I now have another interesting problem. I power-cycled my Legrand/Netatmo gateway and rebooted HA. The setup error went away, and it would appear the integration is working, but none of my devices appear in Home Assistant. I know the gateway is working because I can control everything locally from the Apple HomeKit app.
However, I can longer access my Legrand/Netatmo gateway through the Netatmo Home + Control app, nor can I access any legrand/netatmo website from my home internet connection. If I turn off wifi on my devices, I can access them, except for the Home + Control app. It is completely inaccessible for now.
I once again have access to dev.netatmo.com, but the Legrand integration is back with the "failed to setup" error, and I don't have an option to download diagnostics.
Here is the log message.
2022-10-25 18:14:29.901 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for netatmo File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
Looks like I missed a NLUI device class. I'll implement this ASAP.
Hi, my log with bug:
Logger: homeassistant.config_entries Source: components/netatmo/data_handler.py:199 First occurred: 11:51:37 (1 occurrences) Last logged: 11:51:37
Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry
await data_handler.async_setup()
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup
await self.subscribe(ACCOUNT, ACCOUNT, None)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
await self.async_fetch_data(signal_name)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
await getattr(self.account, self.publisher[signal_name].method)(
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 69, in async_update_topology
self.process_topology()
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 58, in process_topology
self.homes[home_id] = Home(self.auth, raw_data=home)
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 48, in init
self.modules = {
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 49, in
@mklacan this is a different error and has already been fixed. It should ship with either the next fix or major release, whatever comes first. If you're brave, you can also switch to the current beta, that should already come with the fix applied.
Thank you for the fast info. I will wait for the next update :)
Actually, I'd welcome beta testers (usually it is pretty stable) as it is much easier and quicker to fix things.
@cgtobi how can we be beta tester ? I'm very interested ! Thanks !
@Vialau just the normal HA beta that's currently running. If you're on HA OS just switch to the beta channel.
Hellou, after today update HA: Logger: homeassistant.config_entries Source: components/netatmo/data_handler.py:199 First occurred: 13:46:09 (1 occurrences) Last logged: 13:46:09
Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/netatmo/init.py", line 164, in async_setup_entry
await data_handler.async_setup()
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 151, in async_setup
await self.subscribe(ACCOUNT, ACCOUNT, None)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 243, in subscribe
await self.async_fetch_data(signal_name)
File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 199, in async_fetch_data
await getattr(self.account, self.publisher[signal_name].method)(
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 69, in async_update_topology
self.process_topology()
File "/usr/local/lib/python3.10/site-packages/pyatmo/account.py", line 58, in process_topology
self.homes[home_id] = Home(self.auth, raw_data=home)
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 48, in init
self.modules = {
File "/usr/local/lib/python3.10/site-packages/pyatmo/home.py", line 49, in
Hello @cgtobi same error for me. Impossible to configure de Netatmo Integration (exactly the same log than @mklacan)
Thanks for reporting this issue. A fix is on the way. Waiting for review and a new pyatmo release.
@cgtobi Thank you for the info and thank you very much for your work.
Thanks @cgtobi : will you fix has well the "NLunknown" issue ? Please let us known if you need beta testers !
@jiquem You can test via the custom component.
In order to use the custom component please follow the steps below:
- Remove the official integration
- Install HACS
- Restart HA
- Add the custom integration repo https://github.com/cgtobi/netatmo_custom to HACS
- Add the Netatmo integration
@cgtobi works perfectly for me using the custom integration. Thanks a lot !
@Vialau Great, thanks for the feedback. Should be fixed in 2022.11.2.
Hi guys, I installed Custom component over HACS.
- roller shutters absolutely perfect with stop Button !!! AMAZIMG.
- dimmer lights OK,
- plugs OK,
- missing lights over micromodul (legrand nr. 064888).
- missing scenario switchces.
Do you pland add micromodul and scenario buttons?
I will test Next days.
@cgtobi Thank you very much for integration. Perfect work.
@mklacan if you can provide me with more details about the missing devices I can implement support. Feel free to contact me via Discord.
In my setup is missing devices:
- LEGRAND scenario button - Night/Day nr. 752189
- Legrand scernario button - Leave Home nr. 756386
- Legrand DIN swtich nr. 412171
- Legrand nr. 064888 - Micromodul for lights
- Netamtmo Dorbell
Please let's discuss this on Discord as this is out of scope for this issue.
How can i write you over Discord?
You might have to send a friendship request first. cgtobi#7113