ebaauw / homebridge-deconz

Homebridge plugin for deCONZ
Apache License 2.0
135 stars 7 forks source link

add tuya 4-way switch #109

Closed schroot72 closed 1 year ago

schroot72 commented 1 year ago

Hi, i have tuya 4 way switch, which is detected in deconz as: _TZ3000_mh9px7cq . When adding the switch in homebridge it says unknown ZHAswitch. It is just a different version from model TS0044. (see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/6344) and was added in deconz.

Can you add this device ? or do I need to do something else ?

This is a copy of the error i the log:

AB001: _TZ3000_mh9px7cq TS0044 v1.0.3 (1 resources) [2/11/2023, 10:00:30 AM] [deCONZ] AB001: warning: /sensors/24: unknown ZHASwitch: {"config":{"battery":0,"on":true,"reachable":true},"etag":"ff46ec4d5c93ac3bcda39035084e7a0a","lastannounced":null,"lastseen":"2023-02-11T07:20Z","manufacturername":"_TZ3000_mh9px7cq","mode":1,"modelid":"TS0044","name":"AB001","state":{"buttonevent":1002,"lastupdated":"2023-02-10T17:57:47.748"},"swversion":"1.0.3","type":"ZHASwitch","uniqueid":"a4:c1:38:f2:56:5e:e6:3a-01-0006"}

ebaauw commented 1 year ago

What buttonevent values does this device support?

schroot72 commented 1 year ago

it supports a single press, dubble press and long press.

it is now added as a switch with only one button, but also with single, double and long press.

ebaauw commented 1 year ago

Please indicate what buttonevent values it supports and what the names of the associated buttons are.

schroot72 commented 1 year ago

Not sure how I can see this, but I have copied relevant lines from the log. Is this sufficient ?

06:57:34:580 [INFO] - Button 1002 - TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: B1 short, payload: 00, zclSeq: 86 06:57:34:584 rule event /sensors/24/state/lastupdated: 0 -> 0 06:58:55:579 [INFO] - Button 1004 - TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: B1 double, payload: 01, zclSeq: 87 06:58:55:583 rule event /sensors/24/state/lastupdated: 0 -> 0 07:00:08:512 [INFO] - Button 1003 - TS0044, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: B1 long, payload: 02, zclSeq: 90 07:00:08:515 rule event /sensors/24/state/lastupdated: 0 -> 0

07:00:53:867 [INFO] - Button 2002 - TS0044, unicast to: 0x0000, endpoint: 0x02, cluster: ONOFF (0x0006), action: B2 short, payload: 00, zclSeq: 91 07:00:53:868 rule event /sensors/24/state/lastupdated: 0 -> 0 07:01:02:746 [INFO] - Button 2004 - TS0044, unicast to: 0x0000, endpoint: 0x02, cluster: ONOFF (0x0006), action: B2 double, payload: 01, zclSeq: 92 07:01:02:748 rule event /sensors/24/state/lastupdated: 0 -> 0 07:01:59:246 [INFO] - Button 2003 - TS0044, unicast to: 0x0000, endpoint: 0x02, cluster: ONOFF (0x0006), action: B2 long, payload: 02, zclSeq: 95 07:01:59:249 rule event /sensors/24/state/lastupdated: 0 -> 0

07:03:00:445 [INFO] - Button 3002 - TS0044, unicast to: 0x0000, endpoint: 0x03, cluster: ONOFF (0x0006), action: B3 short, payload: 00, zclSeq: 96 07:03:00:449 rule event /sensors/24/state/lastupdated: 0 -> 0 07:03:10:219 [INFO] - Button 3004 - TS0044, unicast to: 0x0000, endpoint: 0x03, cluster: ONOFF (0x0006), action: B3 double, payload: 01, zclSeq: 98 07:03:10:221 rule event /sensors/24/state/lastupdated: 0 -> 0 07:03:16:714 [INFO] - Button 3003 - TS0044, unicast to: 0x0000, endpoint: 0x03, cluster: ONOFF (0x0006), action: B3 long, payload: 02, zclSeq: 99 07:03:16:716 rule event /sensors/24/state/lastupdated: 0 -> 0

07:03:55:199 [INFO] - Button 4002 - TS0044, unicast to: 0x0000, endpoint: 0x04, cluster: ONOFF (0x0006), action: B4 short, payload: 00, zclSeq: 100 07:03:55:202 rule event /sensors/24/state/lastupdated: 0 -> 0 07:04:04:392 [INFO] - Button 4004 - TS0044, unicast to: 0x0000, endpoint: 0x04, cluster: ONOFF (0x0006), action: B4 double, payload: 01, zclSeq: 102 07:04:04:396 rule event /sensors/24/state/lastupdated: 0 -> 0 07:04:36:555 [INFO] - Button 4003 - TS0044, unicast to: 0x0000, endpoint: 0x04, cluster: ONOFF (0x0006), action: B4 long, payload: 02, zclSeq: 103 07:04:36:557 rule event /sensors/24/state/lastupdated: 0 -> 0

schroot72 commented 1 year ago

Thanks for adding the device. I put your extra lines manually in my local Resource.js and it works.

ebaauw commented 1 year ago

In v0.1.9.