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

ZHA - brand new Hue motion sensors (SML003) joining and leaving the network, then not available #102008

Closed
madchap opened this issue Oct 14, 2023 · 9 comments
Assignees

Comments

@madchap
Copy link

madchap commented Oct 14, 2023

The problem

I purchased a couple SML003 and been focusing to get one to work.... to no avail (mac addr 00:17:88:01:0c:da:86:68). Both are giving me this issue of joining and leaving, and ultimately become unavailable. I've read some issues for SML001, but people in these discussions seem not to have issues with SML003, hence the new issue.

15mn of ZHA DEBUG logs are at this link https://gist.github.com/madchap/6d2119e148affe8af8727fceb30a8eda

In a nutshell, I add the device, the it joins the network, leaves the network and joins again like 3mn later.

Leaving

2023-10-14 19:16:54.153 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received trustCenterJoinHandler: [0x5d07,
 00:17:88:01:0c:da:86:68, <EmberDeviceUpdate.DEVICE_LEFT: 2>, <EmberJoinDecision.NO_ACTION: 3>, 0xffff]
2023-10-14 19:16:54.153 DEBUG (MainThread) [bellows.zigbee.application] Received trustCenterJoinHandler frame with [0x5d07, 00
:17:88:01:0c:da:86:68, <EmberDeviceUpdate.DEVICE_LEFT: 2>, <EmberJoinDecision.NO_ACTION: 3>, 0xffff]
2023-10-14 19:16:54.154 INFO (MainThread) [zigpy.application] Device 0x5d07 (00:17:88:01:0c:da:86:68) left the network
2023-10-14 19:16:54.154 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x5d07](SML003): Update device availabi
lity -  device available: True - new availability: False - changed: True
2023-10-14 19:16:54.155 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x5d07](SML003): Device availability ch
anged and device became unavailable

and re-joining

2023-10-14 19:16:54.857 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x770E](DS01): Device seen - marking th
e device available and resetting counter
2023-10-14 19:16:54.858 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x770E](DS01): Update device availabili
ty -  device available: True - new availability: True - changed: False
2023-10-14 19:17:02.955 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'7242b1a9702a12ef31129029abdd85499d4e27ab9bc17e'
2023-10-14 19:17:02.955 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8070787e'
2023-10-14 19:17:02.957 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received trustCenterJoinHandler: [0x5d07,
 00:17:88:01:0c:da:86:68, <EmberDeviceUpdate.STANDARD_SECURITY_UNSECURED_JOIN: 1>, <EmberJoinDecision.USE_PRECONFIGURED_KEY: 0
>, 0x0000]
2023-10-14 19:17:02.958 DEBUG (MainThread) [bellows.zigbee.application] Received trustCenterJoinHandler frame with [0x5d07, 00
:17:88:01:0c:da:86:68, <EmberDeviceUpdate.STANDARD_SECURITY_UNSECURED_JOIN: 1>, <EmberJoinDecision.USE_PRECONFIGURED_KEY: 0>, 
0x0000]
2023-10-14 19:17:02.959 INFO (MainThread) [zigpy.application] Device 0x5d07 (00:17:88:01:0c:da:86:68) joined the network
2023-10-14 19:17:02.960 DEBUG (MainThread) [bellows.ezsp.protocol] Send command findKeyTableEntry: (00:17:88:01:0c:da:86:68, True)

Thanks for any help!

What version of Home Assistant Core has the issue?

core-2023.10.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

zha

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@madchap madchap changed the title ZHA - brand new Hue SML003 joining and leaving the network ZHA - brand new Hue motion sensors (SML003) joining and leaving the network, then not available Oct 15, 2023
@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

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

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@puddly
Copy link
Contributor

puddly commented Oct 23, 2023

Can you upload diagnostics JSON for the ZHA integration?

@stiltjack
Copy link

Similar problems with SML001. In addition, after being repaired a few times they refuse to pair at all:

`Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:226
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:15:45 (4 occurrences)
Last logged: 13:16:04

[546500636864] Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 64, in wrap_zigpy_exceptions
yield
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 84, in wrapper
return await RETRYABLE_REQUEST_DECORATOR(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/util.py", line 132, in retry
return await func()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/init.py", line 620, in write_attributes
return await self.write_attributes_raw(attrs, manufacturer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/init.py", line 626, in write_attributes_raw
result = await self._write_attributes(attrs, manufacturer=manufacturer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/quirks/init.py", line 321, in _write_attributes
return await super()._write_attributes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/init.py", line 377, in request
return await self._endpoint.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/endpoint.py", line 253, in request
return await self.device.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/zigpy/device.py", line 293, in request
await self._application.request(
File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 828, in request
await self.send_packet(
File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 870, in send_packet
raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/switch.py", line 247, in async_turn_on
await self.async_turn_on_off(True)
File "/usr/src/homeassistant/homeassistant/components/zha/switch.py", line 240, in async_turn_on_off
await self._cluster_handler.write_attributes_safe(
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 518, in write_attributes_safe
res = await self.write_attributes(attributes, manufacturer=manufacturer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 83, in wrapper
with wrap_zigpy_exceptions():
File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit
self.gen.throw(typ, value, traceback)
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 75, in wrap_zigpy_exceptions
raise HomeAssistantError(message) from exc
homeassistant.exceptions.HomeAssistantError: Failed to send request: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>`

@stiltjack
Copy link

Is this problem the same as #99305?

@puddly
Copy link
Contributor

puddly commented Oct 27, 2023

@stiltjack check out the second half of #89311 (comment). This is a known problem with the sensor.

@stiltjack
Copy link

Problem solved, thank you! Also resolved a similar issue with an SML002 outdoor motion sensor.

@hauserpro
Copy link

Problem solved, thank you! Also resolved a similar issue with an SML002 outdoor motion sensor.

How did you resolve it please?

@TheJulianJES
Copy link
Member

@hauserpro The link puddly posted contains a snippet which you can add to your configuration.yaml that will allow the older Hue sensors (SML001 and SML002) to re-join your network if they become disconnected.
If you have an EZSP coordinator and SML001 or SML002 sensors, you'll want to follow those instructions.

For newer SML003 and SML004 sensors (which don't have that issue), that doesn't matter. Your issue is something different.
This issue is (originally) about a SML003 sensor. Those rarely have issues from my experience.

@madchap
Copy link
Author

madchap commented Nov 5, 2023

In the end, I went through the philips integration, which seems to be stable. Maybe less ideal, but no time to troubleshoot right now. Will re-open if need be. Thanks.

@madchap madchap closed this as completed Nov 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants