core icon indicating copy to clipboard operation
core copied to clipboard

Legrand Netatmo integration doesn't work

Open brantmacga opened this issue 3 years ago • 13 comments

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

brantmacga avatar Oct 25 '22 01:10 brantmacga

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 Change the title of 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)

home-assistant[bot] avatar Oct 25 '22 01:10 home-assistant[bot]

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.

brantmacga avatar Oct 25 '22 02:10 brantmacga

Please provide debug logs and diagnostics to inspect.

cgtobi avatar Oct 25 '22 05:10 cgtobi

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'

Cogision avatar Oct 25 '22 14:10 Cogision

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 module["id"]: getattr(modules, module["type"])( AttributeError: module 'pyatmo.modules' has no attribute 'NLUI'

brantmacga avatar Oct 25 '22 16:10 brantmacga

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

brantmacga avatar Oct 25 '22 16:10 brantmacga

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.

brantmacga avatar Oct 25 '22 16:10 brantmacga

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

brantmacga avatar Oct 25 '22 23:10 brantmacga

Looks like I missed a NLUI device class. I'll implement this ASAP.

cgtobi avatar Oct 26 '22 06:10 cgtobi

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 module["id"]: getattr(modules, module["type"])( AttributeError: module 'pyatmo.modules' has no attribute 'NLD'

mklacan avatar Oct 27 '22 09:10 mklacan

@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.

cgtobi avatar Oct 27 '22 10:10 cgtobi

Thank you for the fast info. I will wait for the next update :)

mklacan avatar Oct 27 '22 10:10 mklacan

Actually, I'd welcome beta testers (usually it is pretty stable) as it is much easier and quicker to fix things.

cgtobi avatar Oct 28 '22 09:10 cgtobi

@cgtobi how can we be beta tester ? I'm very interested ! Thanks !

Vialau avatar Oct 29 '22 14:10 Vialau

@Vialau just the normal HA beta that's currently running. If you're on HA OS just switch to the beta channel.

cgtobi avatar Oct 29 '22 16:10 cgtobi

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 module["id"]: getattr(modules, module["type"])( File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 199, in init super().init(home, module) # type: ignore # mypy issue 4335 File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 61, in init super().init(home, module) # type: ignore # mypy issue 4335 File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 230, in init super().init(home, module) # type: ignore # mypy issue 4335 File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 242, in init super().init(home, module) # type: ignore # mypy issue 4335 File "/usr/local/lib/python3.10/site-packages/pyatmo/modules/module.py", line 508, in init self.device_type = DeviceType(module["type"]) File "/usr/local/lib/python3.10/enum.py", line 385, in call return cls.new(cls, value) File "/usr/local/lib/python3.10/enum.py", line 710, in new raise ve_exc ValueError: 'NLD' is not a valid DeviceType

mklacan avatar Nov 03 '22 14:11 mklacan

Hello @cgtobi same error for me. Impossible to configure de Netatmo Integration (exactly the same log than @mklacan)

Vialau avatar Nov 03 '22 14:11 Vialau

Thanks for reporting this issue. A fix is on the way. Waiting for review and a new pyatmo release.

cgtobi avatar Nov 03 '22 15:11 cgtobi

@cgtobi Thank you for the info and thank you very much for your work.

mklacan avatar Nov 03 '22 16:11 mklacan

Thanks @cgtobi : will you fix has well the "NLunknown" issue ? Please let us known if you need beta testers !

jiquem avatar Nov 05 '22 09:11 jiquem

@jiquem You can test via the custom component.

In order to use the custom component please follow the steps below:

  1. Remove the official integration
  2. Install HACS
  3. Restart HA
  4. Add the custom integration repo https://github.com/cgtobi/netatmo_custom to HACS
  5. Add the Netatmo integration

cgtobi avatar Nov 07 '22 07:11 cgtobi

@cgtobi works perfectly for me using the custom integration. Thanks a lot !

Vialau avatar Nov 07 '22 08:11 Vialau

@Vialau Great, thanks for the feedback. Should be fixed in 2022.11.2.

cgtobi avatar Nov 07 '22 08:11 cgtobi

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 avatar Nov 07 '22 09:11 mklacan

@mklacan if you can provide me with more details about the missing devices I can implement support. Feel free to contact me via Discord.

cgtobi avatar Nov 07 '22 09:11 cgtobi

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

mklacan avatar Nov 07 '22 09:11 mklacan

Please let's discuss this on Discord as this is out of scope for this issue.

cgtobi avatar Nov 07 '22 09:11 cgtobi

How can i write you over Discord?

mklacan avatar Nov 07 '22 10:11 mklacan

You might have to send a friendship request first. cgtobi#7113

cgtobi avatar Nov 07 '22 11:11 cgtobi