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

Missing Matter unique_id for Eve Energy plug #84807

Closed
sandhose opened this issue Dec 29, 2022 · 7 comments · Fixed by #86046
Closed

Missing Matter unique_id for Eve Energy plug #84807

sandhose opened this issue Dec 29, 2022 · 7 comments · Fixed by #86046

Comments

@sandhose
Copy link

sandhose commented Dec 29, 2022

The problem

When commissioning an Eve Energy EU plug via the Matter multi-admin thing ("Turn On Pairing Mode" in HomeKit and pasting the code in "Commission Device" in the Matter beta integration), the device appears without any entity in it.
Note that I couldn't even add the device before 2023.1.0b0.

What version of Home Assistant Core has the issue?

2023.1.0b1

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

Matter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matter

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

With 2023.1.0b1:

2022-12-29 21:46:42.753 ERROR (MainThread) [homeassistant.components.matter] Unexpected exception: coroutine raised StopIteration
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 341, in start_listening
    self._handle_incoming_message(msg)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 410, in _handle_incoming_message
    self._handle_event_message(msg)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 425, in _handle_event_message
    self._signal_event(EventType.NODE_ADDED, node)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 456, in _signal_event
    callback(event, data)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 56, in node_added_callback
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 131, in _client_listen
    await matter_client.start_listening(init_ready)
RuntimeError: coroutine raised StopIteration
2022-12-29 21:46:42.817 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for matter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 48, in setup_nodes
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 109, in async_setup_entry
    await matter.setup_nodes()
RuntimeError: coroutine raised StopIteration

Before, with 2023.1.0b0, I also had:

2022-12-29 10:17:38.351 ERROR (MainThread) [homeassistant.components.matter] Unexpected exception: coroutine raised StopIteration
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 341, in start_listening
    self._handle_incoming_message(msg)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 410, in _handle_incoming_message
    self._handle_event_message(msg)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 425, in _handle_event_message
    self._signal_event(EventType.NODE_ADDED, node)
  File "/usr/local/lib/python3.10/site-packages/matter_server/client/client.py", line 456, in _signal_event
    callback(event, data)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 56, in node_added_callback
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 131, in _client_listen
    await matter_client.start_listening(init_ready)
RuntimeError: coroutine raised StopIteration
2022-12-29 10:17:38.402 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for matter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 48, in setup_nodes
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 109, in async_setup_entry
    await matter.setup_nodes()
RuntimeError: coroutine raised StopIteration
2022-12-29 10:18:45.381 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 169, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2022-12-29 10:18:45.382 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 618, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2022-12-29 10:18:45.383 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 565, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2022-12-29 10:18:45.383 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 83, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 166, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2022-12-29 10:18:45.384 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Matter for matter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 48, in setup_nodes
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 109, in async_setup_entry
    await matter.setup_nodes()
RuntimeError: coroutine raised StopIteration

Additional information

I have a Eve Energy EU plug, with the beta Matter firmware, added to my Apple Home and Google Home via the Matter multi-admin thing. I tried before to add it to HA, which didn't work, but now that it does on the beta, I'm not getting any entities on the commissioned device.

@home-assistant
Copy link

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matter 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 matter Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


matter documentation
matter source
(message by IssueLinks)

@sandhose sandhose changed the title Matter device fails to create on/off entities Matter device has no entities on it Dec 29, 2022
@frenck frenck added this to the 2023.1.0 milestone Dec 29, 2022
@MartinHjelmare MartinHjelmare changed the title Matter device has no entities on it Missing Matter unique_id for Eve Energy plug Jan 1, 2023
@spartandrew18
Copy link

Same issue that I am having. No entities show for eve matter devices.

@hoppel118
Copy link

hoppel118 commented Jan 4, 2023

I also don't see any entities:

screenshot_1209

After adding the EVE Energy I recognized that my Matter Integration has a problem. (EDIT: Since restarting my Home Assistant the Integration works again now.)

screenshot_1210

The log shows me the following:

Logger: homeassistant.config_entries
Source: components/matter/__init__.py:109
First occurred: 11:06:38 PM (1 occurrences)
Last logged: 11:06:38 PM

Error setting up entry Matter for matter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 48, in setup_nodes
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in _setup_node
    self._setup_node_device(node_device, bridge_unique_id)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 132, in _setup_node_device
    entity_description.entity_cls(
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 67, in __init__
    f"{node.unique_id}-"
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 215, in unique_id
    self.get_attribute(
  File "/usr/local/lib/python3.10/site-packages/matter_server/common/models/node.py", line 152, in get_attribute
    return next(
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 109, in async_setup_entry
    await matter.setup_nodes()
RuntimeError: coroutine raised StopIteration

Regards Hoppel

@sgy87
Copy link

sgy87 commented Jan 6, 2023

I have exactly the same problem.

@marcusrosendahl
Copy link

Same here…

@kjagiello
Copy link

kjagiello commented Jan 14, 2023

Same problem here, although with an ESP32C3 running the light example from esp-matter.

Not sure if relevant, but I also see a bunch of errors like this on the ESP (see the lines starting with E):

I (14863) esp_matter_attribute: ********** Endpoint 0x0000's Cluster 0x0036's Attribute 0xFFFD is 1 **********
I (14883) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x001D's Attribute 0xFFFC is 0 **********
E (14883) chip[DMG]: Error retrieving data from clusterId: 0x0000_001D, err = b
I (14903) chip[EM]: <<< [E:34906r M:157694694 (Ack:140797548)] (S) Msg TX to 1:000000000001B669 [6679] --- Type 0001:05 (IM:ReportData)
I (14903) chip[IN]: (S) Sending msg 157694694 on secure session with LSID: 18530
I (14963) chip[EM]: >>> [E:34906r M:140797549 (Ack:157694694)] (S) Msg RX from 1:000000000001B669 [6679] --- Type 0001:01 (IM:StatusResponse)
I (14973) chip[IM]: Received status response, status is 0x00
I (14973) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0003's Attribute 0xFFFC is 0 **********
I (14993) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0003's Attribute 0xFFFD is 4 **********
I (15003) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0003's Attribute 0x0000 is 0 **********
I (15003) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0003's Attribute 0x0001 is 0 **********
I (15023) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0004's Attribute 0xFFFC is 1 **********
I (15033) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0004's Attribute 0xFFFD is 4 **********
I (15043) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0004's Attribute 0x0000 is 128 **********
E (15053) chip[DMG]: Error retrieving data from clusterId: 0x0000_0004, err = b
I (15063) chip[EM]: <<< [E:34906r M:157694695 (Ack:140797549)] (S) Msg TX to 1:000000000001B669 [6679] --- Type 0001:05 (IM:ReportData)
I (15073) chip[IN]: (S) Sending msg 157694695 on secure session with LSID: 18530
E (15083) chip[DL]: Long dispatch time: 103 ms, for event type 3
I (15113) chip[EM]: >>> [E:34906r M:140797550 (Ack:157694695)] (S) Msg RX from 1:000000000001B669 [6679] --- Type 0001:01 (IM:StatusResponse)
I (15123) chip[IM]: Received status response, status is 0x00
I (15123) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0xFFFC is 0 **********
I (15143) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0xFFFD is 4 **********
I (15153) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0000 is 0 **********
I (15153) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0001 is 0 **********
I (15163) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0002 is 0 **********
I (15183) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0003 is 0 **********
I (15193) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0004 is 0 **********
E (15203) chip[DMG]: Error retrieving data from clusterId: 0x0000_0005, err = b

@kjagiello
Copy link

kjagiello commented Jan 16, 2023

It looks like the issue here is that the matter component in HASS requires the Basic Information -> UniqueID attribute to always be present, even though the field is not mandatory according to the spec.

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.

7 participants