Zigbee2mqtt: Support for "Lonsonho Tuya ZigBee Wireless Smart Scene Switch 4 Gang" needed

Created on 26 Sep 2020  Â·  12Comments  Â·  Source: Koenkk/zigbee2mqtt

Information about the device + link

Lonsonho Tuya ZigBee Wireless Smart Scene Switch 4 Gang
IMG_3893

IMG_3892

IMG_3894

data/database.db entry of the device

{"id":70,"type":"EndDevice","ieeeAddr":"0xbc.....","nwkAddr":...,"manufId":4098,"manufName":"_TZ3000_vp6clf9d","powerSource":"Battery","modelId":"TS0044","epList":[1,2,3,4],"endpoints":{"1":{"profId":260,"epId":1,"devId":0,"inClusterList":[0,10,1,6],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"65503":"^q�&\u0012","modelId":"TS0044","manufacturerName":"_TZ3000_vp6clf9d","powerSource":3,"zclVersion":3,"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200,"batteryVoltage":30}}},"binds":[]},"2":{"profId":260,"epId":2,"devId":0,"inClusterList":[1,6],"outClusterList":[],"clusters":{},"binds":[]},"3":{"profId":260,"epId":3,"devId":0,"inClusterList":[1,6],"outClusterList":[],"clusters":{},"binds":[]},"4":{"profId":260,"epId":4,"devId":0,"inClusterList":[1,6],"outClusterList":[],"clusters":{},"binds":[]}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1600948923006}
new device support

All 12 comments

Hi,
I have one of this.

It works with these changes:

folder /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters

--- devices_orig.js     2020-09-28 19:16:53.095887508 +0200
+++ devices.js  2020-09-28 19:16:19.846152157 +0200
@@ -1231,6 +1231,18 @@
         toZigbee: [],
     },
     {
+        zigbeeModel: ['TS0044'],
+        model: 'TS0044',
+        vendor: 'TuYa',
+        description: 'Wireless switch with 4 buttons',
+        whiteLabel: [
+            {vendor: 'Lonsonho', model: 'TS0044'},
+        ],
+        supports: 'action',
+        fromZigbee: [fz.tuya_on_off_action, fz.battery],
+        toZigbee: [],
+    },
+    {
         zigbeeModel: ['TS0001'],
         model: 'TS0001',
         vendor: 'TuYa',

folder /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/converters

--- fromZigbee_orig.js  2020-09-28 19:36:08.504529036 +0200
+++ fromZigbee.js       2020-09-27 15:53:23.344632355 +0200
@@ -3521,6 +3521,7 @@
             let buttonMapping = null;
             if (model.model === 'TS0042') buttonMapping = {1: 'left', 2: 'right'};
             if (model.model === 'TS0043') buttonMapping = {1: 'right', 2: 'middle', 3: 'left'};
+            if (model.model === 'TS0044') buttonMapping = {1: 'button_1', 2: 'button_2', 3: 'button_3', 4: 'button_4'};
             const button = buttonMapping ? `${buttonMapping[msg.endpoint.ID]}_` : '';
             return {action: `${button}${clickMapping[msg.data[3]]}`};
         },

@lcse66 thanks, instead of button_1, can you change it to left_top, right_bottom, etc.? Then I can add support for it out of the box.

--- fromZigbee_orig.js  2020-09-28 19:36:08.504529036 +0200
+++ fromZigbee.js       2020-09-27 15:53:23.344632355 +0200
@@ -3521,6 +3521,7 @@
             let buttonMapping = null;
             if (model.model === 'TS0042') buttonMapping = {1: 'left', 2: 'right'};
             if (model.model === 'TS0043') buttonMapping = {1: 'right', 2: 'middle', 3: 'left'};
+            if (model.model === 'TS0044') buttonMapping = {1: 'left_bottom', 2: 'right_bottom', 3: 'right_top', 4: 'left_top'};
             const button = buttonMapping ? `${buttonMapping[msg.endpoint.ID]}_` : '';
             return {action: `${button}${clickMapping[msg.data[3]]}`};
         },

Thanks, device will be supported in next Zigbee2mqtt release on 1 October.

@Koenkk I upgraded z2m to 115 and this devices still doesn’t work. I still can see device interview and announcement but there is no device in the device list.

NO COMPONENTS Maybe this device is not (yet) supported by Zigbee2Mqtt?

@Spirituss can you provide me your Zigbee2MQTT startup log?

@Koenkk I cut lines with other devices.

log.txt

@Spirituss did you set zigbee_shepherd_devices: true in your configuration? (this should be false).

@Koenkk I didn't set this option at all, should I do?

UPD: Yes, it works for me. Thanks!

I just connected it and reaction to press is sometimes over 3-4 seconds. Why is that? Im on HA and Z2M 1.16.1. I'm using Conbee 2 on RPI4 with SSD. Other Xiaomi switches work fast (max 1 sec delay which is acceptable)
linkquality
232 lqi

I just connected it and reaction to press is sometimes over 3-4 seconds.
It happens to me too. This delay is already visible on the serial device (/dev/ttyACM0, USB dongle based on CC2531, raspberry PI 3 B+), even with good link quality.

So it's software problem as it happends on conbee 2 and cc2531.

Was this page helpful?
0 / 5 - 0 ratings