Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netatmo integration failing to set up - NLunknown #81411

Closed
stevenwfoley opened this issue Nov 2, 2022 · 27 comments · Fixed by #81636
Closed

Netatmo integration failing to set up - NLunknown #81411

stevenwfoley opened this issue Nov 2, 2022 · 27 comments · Fixed by #81636
Assignees

Comments

@stevenwfoley
Copy link

The problem

Netatmo integration fails to setup. Installing the integration is successful, authentication is successful, but on the HA Integrations page the Netatmo item is highlighted in red and the text "Failed to set up" exists. I tried uninstalling and reinstalling the integration but its always the same result.

What version of Home Assistant Core has the issue?

2022.10.5

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

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?

Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:199
First occurred: November 1, 2022 at 7:45:19 PM (3 occurrences)
Last logged: 8:31:15 AM

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

Additional information

I've seen other similar issues reported where the solution was to reboot cameras, or replace the SD card, but I do not have any cameras. I have three lights, one wireless dimmer switch, and one plug in my Legrand Home+ Control app.

@home-assistant
Copy link

home-assistant bot commented Nov 2, 2022

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 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)

@cgtobi
Copy link
Contributor

cgtobi commented Nov 2, 2022

NLunknown is an interesting one. Thanks for raising this issue. I'll put together a fix ASAP.

@stevenwfoley
Copy link
Author

Thanks for the quick response! Please let me know if you need any additional info from my setup, or want me to test something.

@cgtobi cgtobi changed the title Netatmo integration failing to set up Netatmo integration failing to set up - NLunknown Nov 2, 2022
@Docteur-ito
Copy link

Hello.

I have the same issue but with a different missing atribute : 'EBU'
Integration and authentication are successful, but the integration "Failed to set up"
Should i open a new issue?

Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:199
First occurred: 9:45:42 PM (3 occurrences)
Last logged: 9:48:09 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 'EBU'

@jiquem
Copy link

jiquem commented Nov 2, 2022

Hello,

I've got the same issue

Logger: homeassistant.config_entries
Source: components/netatmo/data_handler.py:199 
First occurred: 22:22:57 (1 occurrences) 
Last logged: 22:22:57

Error setting up entry Netatmo HA 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 <dictcomp>
    module["id"]: getattr(modules, module["type"])(
AttributeError: module 'pyatmo.modules' has no attribute 'NLunknown'

@cgtobi
Copy link
Contributor

cgtobi commented Nov 2, 2022

I have the same issue but with a different missing atribute : 'EBU' Integration and authentication are successful, but the integration "Failed to set up" Should i open a new issue?

No need to open a separate issue. I'll add this to the list. Do you have an idea what EBU might be? Can you provide information on that device?

@Docteur-ito
Copy link

I have the same issue but with a different missing atribute : 'EBU' Integration and authentication are successful, but the integration "Failed to set up" Should i open a new issue?

No need to open a separate issue. I'll add this to the list. Do you have an idea what EBU might be? Can you provide information on that device?

No clue, but the only device i have is the Netatmo Smart Thermostat.

@jiquem
Copy link

jiquem commented Nov 2, 2022

I only have a 067774 on top of the "starter kit"

@cgtobi
Copy link
Contributor

cgtobi commented Nov 2, 2022

@Docteur-ito please share the diagnostics for inspection.

@cgtobi
Copy link
Contributor

cgtobi commented Nov 2, 2022

I only have a 067774 on top of the "starter kit"

@jiquem Is that a BTicino device? Please also share your diagnostics data.

@jiquem
Copy link

jiquem commented Nov 2, 2022

How can I share the diagnostic data ?
It's a Legrand device

@Docteur-ito
Copy link

share the diagnostics

As no devices or entites are created, i don't find any diagnostics to download.
And there is no "Download diagnostics" on the 3 dots menu of the integration.

@cgtobi
Copy link
Contributor

cgtobi commented Nov 3, 2022

@Docteur-ito ah, you are right of course. Sorry

@cgtobi
Copy link
Contributor

cgtobi commented Nov 3, 2022

@jiquem you can't actually. What kind of device is this?

@Docteur-ito
Copy link

Docteur-ito commented Nov 3, 2022

@Docteur-ito ah, you are right of course. Sorry

😅 I would love to give you more logs!

@jiquem
Copy link

jiquem commented Nov 3, 2022

@jiquem you can't actually. What kind of device is this?

it's a double remote switch

@Docteur-ito
Copy link

According to the Netatmo dev documentation,
https://dev.netatmo.com/apidocumentation/energy

The only devices that i should have are :
NAPlug for the Relay
NATherm1 for the Smart Thermostat

I don't know what the EBU is...

modules:[
{
id:"70:ee:50:xx:xx:xx"
type:"NAPlug"
name:"Relais"
setup_date:1665829770
room_id:"2918985213"
modules_bridged:[
"04:00:00:xx:xx:xx"
"0d:00:00:xx:xx:xx"
]
}
{
id:"04:00:00:xx:xx:xx"
type:"NATherm1"
name:"Thermostat"
setup_date:1665829770
room_id:"2918985213"
bridge:"70:ee:50:xx:xx:xx"
}
{
id:"0d:00:00:xx:xx:xx"
type:"EBU"
setup_date:1665840842
bridge:"70:ee:50:xx:xx:xx"
}
]

@Docteur-ito
Copy link

Docteur-ito commented Nov 3, 2022

Now i see, it's a device plug into my gas meter.
I completely forgot about it !

https://particuliers.engie.fr/gaz-naturel/contrat-gaz-naturel/mon-pilotage-installation.html

{
id:"0d:00:00:xx:xx:xx"
type:"EBU"
battery_state:"high"
battery_level:3366
firmware_revision:8
rf_strength:74
reachable:true
bridge:"70:ee:50:xx:xx:xx"
}

@jiquem
Copy link

jiquem commented Nov 5, 2022

@cgtobi : I removed all switches, so only the Legrand control device remain

and I still get the NLunknown issue

@cgtobi cgtobi mentioned this issue Nov 5, 2022
19 tasks
@stevenwfoley
Copy link
Author

@cgtobi are there instructions for how to test this new version of pyatmo prior to the release of 2022.11.2?

@cgtobi
Copy link
Contributor

cgtobi commented Nov 7, 2022

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

When you use this, please provide feedback via Discord or issue tracker at https://github.com/cgtobi/netatmo_custom/issues

@stevenwfoley
Copy link
Author

stevenwfoley commented Nov 7, 2022

Thank you! But I'm now getting a new error.

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/netatmo/pyatmo/modules/module.py:508
Integration: Netatmo
First occurred: 8:41:25 AM (2 occurrences)
Last logged: 8:51:40 AM

Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
File "/config/custom_components/netatmo/pyatmo/home.py", line 72, in get_module
return getattr(modules, module["type"])(
AttributeError: module 'custom_components.netatmo.pyatmo.modules' has no attribute 'NLDD'

During handling of the above exception, another exception occurred:

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 "/config/custom_components/netatmo/init.py", line 164, in async_setup_entry
await data_handler.async_setup()
File "/config/custom_components/netatmo/data_handler.py", line 151, in async_setup
await self.subscribe(ACCOUNT, ACCOUNT, None)
File "/config/custom_components/netatmo/data_handler.py", line 243, in subscribe
await self.async_fetch_data(signal_name)
File "/config/custom_components/netatmo/data_handler.py", line 199, in async_fetch_data
await getattr(self.account, self.publisher[signal_name].method)(
File "/config/custom_components/netatmo/pyatmo/account.py", line 69, in async_update_topology
self.process_topology()
File "/config/custom_components/netatmo/pyatmo/account.py", line 58, in process_topology
self.homes[home_id] = Home(self.auth, raw_data=home)
File "/config/custom_components/netatmo/pyatmo/home.py", line 49, in init
self.modules = {
File "/config/custom_components/netatmo/pyatmo/home.py", line 50, in
module["id"]: self.get_module(module)
File "/config/custom_components/netatmo/pyatmo/home.py", line 78, in get_module
return getattr(modules, "NLunknown")(
File "/config/custom_components/netatmo/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: 'NLDD' is not a valid DeviceType

@cgtobi
Copy link
Contributor

cgtobi commented Nov 7, 2022

@stevenwfoley please ping me on Discord (cgtobi#7113) as this is beyond the scope of this issue.

@jiquem
Copy link

jiquem commented Nov 7, 2022

Thanks @cgtobi : HACS integration is working.
However, my dimmer without wire aren't listed in the list of devices : is it normal ?

@cgtobi
Copy link
Contributor

cgtobi commented Nov 7, 2022

Probably not yet implemented.

@jiquem
Copy link

jiquem commented Nov 7, 2022

Thanks for the rapid answer, even if not positive.
Do you know who I should ask to implement it ?

@cgtobi
Copy link
Contributor

cgtobi commented Nov 8, 2022

Ping me on Discord.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants