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
73.78k stars 30.88k forks source link

ZHA: unexpected TS0012 device behaviour #92609

Closed chrism0dwk closed 1 year ago

chrism0dwk commented 1 year ago

The problem

This problem is related to Zigbee2mqtt moes switch problem

I have a 2-gang Samotech Zigbee Wall Light switch hooked up to my SkyConnect and running through ZHA. The physical switches work independently as expected. However, if I try to switch one gang from the HA Dashboard, then both gangs switch together. Surely I should be able to operate the switches independently from the remote source?

What version of Home Assistant Core has the issue?

core-2023.4.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

2-gang Samotech Zigbee Wall Light switch

Link to integration documentation on our website

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

Diagnostics information

config_entry-zha-c1eabaf35084b1f764d31a6c6c672a1d.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I'm assuming this may be a bug way lower down in the zigpy stack somewhere. I'm happy to run any test Python code that may be useful, bearing in mind my HA is running as a snap.

home-assistant[bot] commented 1 year ago

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)

kryanth commented 1 year ago

Hi, This device is likely a tuya device, and requires the "magic spell" / "enchanted device" signature in zigpy / zha device handlers / quirks.

Danixu commented 1 year ago

Any workaround for this?. I recently bough this device and the problem still there, and I am not able to make work the zigbee2mqtt...

chrism0dwk commented 1 year ago

@kryanth I wasn't quite sure if your comment was a steer towards a bit of code that needs editing, or whether it's a prompt to update some config file(s) somewhere. Care to elaborate a little?

Chris

kryanth commented 1 year ago

Hi,

It's common for these devices to require a "tuya magic spell". I've done it for a few of my tuya based switches. They have the same "feature" - flipping a switch in HA toggles both "actual" switches. I find the 4 gang switches are much more consistent. Basically every time someone releases another batch of these switches, the firmware has some subtle changes and they require some magic packet interaction to "unlock" the full functions. Generally you can do it once per switch and it will be fine forever (in my experience)

I think you can run it from HA now, more info here: (might need the zha toolkit).

https://github.com/mdeweerd/zha-toolkit#tuya_magic---tuya-magic-spell

Hope that helps! If you follow the grapevine far enough, you can find where to add your device signature and it will be included in zha-quirks.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.