home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.05k stars 29.72k forks source link

Netatmo: missing NLPD Device Type #100988

Closed mickele87 closed 10 months ago

mickele87 commented 11 months ago

The problem

When I try to integrate with Bticino/Netatmo devices I receive the error present in the logs.

What version of Home Assistant Core has the issue?

2023.9.3

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?

Error setting up entry Home Assistant Cloud for netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 72, in get_module
    return getattr(modules, module["type"])(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pyatmo.modules' has no attribute 'NLPD'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 185, in async_setup_entry
    await data_handler.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 153, in async_setup
    await self.subscribe(ACCOUNT, ACCOUNT, None)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 244, in subscribe
    await self.async_fetch_data(signal_name)
  File "/usr/src/homeassistant/homeassistant/components/netatmo/data_handler.py", line 200, in async_fetch_data
    await getattr(self.account, self.publisher[signal_name].method)(
  File "/usr/local/lib/python3.11/site-packages/pyatmo/account.py", line 69, in async_update_topology
    self.process_topology()
  File "/usr/local/lib/python3.11/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.11/site-packages/pyatmo/home.py", line 49, in __init__
    self.modules = {
                   ^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 50, in <dictcomp>
    module["id"]: self.get_module(module)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/home.py", line 78, in get_module
    return getattr(modules, "NLunknown")(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyatmo/modules/module.py", line 520, in __init__
    self.device_type = DeviceType(module["type"])
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc
ValueError: 'NLPD' is not a valid DeviceType

Additional information

No response

home-assistant[bot] commented 11 months ago

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)

siobhanellis commented 11 months ago

I also have this problem. It is also logged here:

https://community.home-assistant.io/t/integration-problem-with-netatmo/515893/2

it is caused by the Arteor 4 scene switch. When I remove the switch, the integration works.

https://www.legrand.com/ecatalogue/574312-4-scenes-wireless-switch-arteor.html

mickele87 commented 11 months ago

I don't have that component, I read on the netatmo site and NLPD should be the DRY CONTACT FC80AC device which is evidently not managed by the integration. I'm hoping for an update. Thank you.

siobhanellis commented 11 months ago

Ah, you are right. Mine is NLDP :-o

mickele87 commented 11 months ago

Hi, will the code be updated to also manage the NLPD device? I don't see any changes here https://github.com/jabesq/pyatmo/pull/454. Thank you

cgtobi commented 11 months ago

What do you mean by manage? pyatmo will not fail anymore, but those devices are remote triggers to my understanding and can't be controlled via API.

To quote the documentation:

These products do not offer any remote interaction. It is only possible to know that they exist in a home

mickele87 commented 11 months ago

The device is not NLDP but NLPD which is controllable via API. I hope for a resolution. Thank you in advance

cgtobi commented 11 months ago

Oh, sorry, thanks for clarification.

siobhanellis commented 11 months ago

Tobias,

Is it not possible to look for the fact that the button has been pressed? Some kind of notification that goes into an MQ?

Siobhan

IOT: Practical HomeKit: ( https://practicalhomekit.blogspot.com ) Charity Fundraising: Lammie Drive: ( lammiedrive.blogspot.comhttp://lammiedrive.blogspot.com/ )

mickele87 commented 11 months ago

What are the release times for the NLPD device? Thank you

cgtobi commented 11 months ago

@mickele87 you mean when it will be available in HA? I can't tell until it is merged.

cgtobi commented 11 months ago

@siobhanellis No, not unless Netatmo provide events for those devices.

mickele87 commented 10 months ago

Good morning, the change (https://github.com/jabesq-org/pyatmo/pull/457) has been merged but I still have the problem. Should I wait for a new home-assistant release? Thank you

mickele87 commented 10 months ago

Good morning, news?

cgtobi commented 10 months ago

I will not give an ETA on when this will be available.