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

Heiman HS2WD-E siren installed in ZHA integration stopped working: object has no attribute ‘serialize’ #96101

Closed
sesardelaisla opened this issue Jul 7, 2023 · 12 comments · Fixed by #96275
Assignees

Comments

@sesardelaisla
Copy link

sesardelaisla commented Jul 7, 2023

The problem

Heiman Siren model HS2WD-E entity switch to trigger the siren on/off stopped working after several months doing fine. I have two units and both have the same problem. Tried to remove and re-add devices but issue persists. Siren switch is available but the following error is displayed when trying to either turn it on or off:

Failed to call service siren.turn_on. Unknown error

Other features like RSSI level or identifying the device work well, so it doesn't seem a communication issue.

I noticed that issue #95978 reports a similar problem, but decided to post another one because device model is different. Happy to remove it should it be advisable to follow up on such open issue.

What version of Home Assistant Core has the issue?

core-2023.7.1

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

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

Diagnostics information

For reference, I enabled debug logs and restarted HA. Restart finished at about 17:55:35. Then, at 17:56:00.651 (line 18959), I tried to trigger the siren on and off a couple of times with its entity switch siren.heiman_interior. At 17:56:14.712 (line 19503), I pressed the identify button a couple of times and device turned the LED on as expected.

home-assistant_zha_2023-07-07T15-56-23.929Z_v2.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I see the following error snippet in the logs upon trying to manually trigger the siren using the entity switch:


2023-07-07 17:56:00.651 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=siren, service=turn_on, service_data=entity_id=siren.heiman_interior>
2023-07-07 17:56:00.653 DEBUG (MainThread) [zigpy.util] Tries remaining: 3
2023-07-07 17:56:00.660 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139854377083728] 'Warning' object has no attribute 'serialize'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1957, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1997, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  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 845, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 889, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/siren/__init__.py", line 117, in async_handle_turn_on_service
    await siren.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/zha/siren.py", line 145, in async_turn_on
    await self._cluster_handler.issue_start_warning(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/security.py", line 330, in issue_start_warning
    await self.start_warning(
  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 355, in request
    hdr, request = self._create_request(
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/zcl/__init__.py", line 318, in _create_request
    request.serialize()  # Throw an error before generating a new TSN
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zigpy/types/struct.py", line 250, in serialize
    chunks.append(value.serialize())
                  ^^^^^^^^^^^^^^^
AttributeError: 'Warning' object has no attribute 'serialize'


### Additional information

I [posted my problem](https://community.home-assistant.io/t/heiman-hs2wd-e-siren-turn-on-and-turn-off-stopped-working/589328) in the HA Community Forum as well. Also noticed another user is having a [similar problem](https://community.home-assistant.io/t/tuya-siren-ts0216-tyzb01-a5tf0bpl-says-warning-object-has-no-attribute-serialize-after-ha-update/588951/2) with a Tuya siren.
@home-assistant
Copy link

home-assistant bot commented Jul 7, 2023

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)

@naijaping
Copy link

I am having same problem with my Tuya TS0216 TYZB01_a5tf0bpl siren, this has been working fine for about 2years plus now. but after the new update it stopped working.

@borwolf
Copy link

borwolf commented Jul 8, 2023

Same problem with my Heiman Sirene HEI_ZHS2WD after the new update.

@julianrinaldi
Copy link

Having the same issue,

@MuadDom
Copy link

MuadDom commented Jul 8, 2023

I am having same problem with zigbee siren Immax NEO 07504L (TS0219 par _TYZB01_b6eaxdlh) after update HA 2023.7

image

@porly1985
Copy link

Same here with a thermostat (TS0601 von _TZE200_b6wax7g0) after updating HA Core to 2023.7.1 the thermostat is not available any more. When I restored Backup to 2023.6 it was working again.

grafik

@naijaping
Copy link

@puddly, thanks so much for your timely intervention . looking forward for the pushed fixed.

@johnsethwatkins
Copy link

johnsethwatkins commented Jul 15, 2023

I have the Frient smart siren. The HA switch was not working with message failed to call service (as OP) at 7.1. 7.2 has not fixed this, now the switch operates but then returns to off a few seconds later. Siren does not sound.

Edit Frient is a Develco by another name, same unit.

@naijaping
Copy link

naijaping commented Jul 16, 2023

@johnsethwatkins, Have you tried to remove and re add the Siren? 7.2 has fixed all my issues with Siren.

xx

@johnsethwatkins
Copy link

Just tried that now. Removed the siren, re-booted HA.

Added the siren again, it's discovered immediately and the entities are added.

There are some attributes that can be set and apart from these there are two switches created. One of them does nothing and when switched on then turns off itself after a few seconds, whilst the other one errors "Failed to call service switch/turn_on. connection lost".

At 7.1 both switches had the error message.

@johnsethwatkins
Copy link

Log extract:

`Logger: homeassistant.components.websocket_api.http.connection
Source: components/zha/core/cluster_handlers/general.py:408
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 6:52:29 PM (5 occurrences)
Last logged: 6:56:44 PM

[140639215450384] index out of range
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service
return await cast(
^^^^^^^^^^^
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 848, in entity_service_call
response_data = task.result() # pop exception if have
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/switch.py", line 96, in async_turn_off
result = await self._on_off_cluster_handler.turn_off()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/general.py", line 408, in turn_off
if isinstance(result, Exception) or result[1] is not Status.SUCCESS:
~~~~~~^^^
IndexError: index out of range`

@Dejmal69
Copy link

Dejmal69 commented Aug 2, 2023

Hello,
I have still problem with the same siren. HA core 7.3

I am having same problem with zigbee siren Immax NEO 07504L (TS0219 par _TYZB01_b6eaxdlh) after update HA 2023.7

image

I

@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2023
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.