[New device support]: AVATTO ZWSM-16-1 1gang switch module
Link
https://de.aliexpress.com/item/1005003051876791.html?spm=a2g0o.order_list.order_list_main.22.21ef1802hMto9a&gatewayAdapt=glo2deu
Database entry
{"id":35,"type":"Router","ieeeAddr":"0xa4c138698d0e8684","nwkAddr":31294,"manufId":4417,"manufName":"_TZ3000_4rbqgcuv","powerSource":"Mains (single phase)","modelId":"TS0001","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[3,4,5,6,1794,2820,57344,57345,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"�4\u000f,\u0012","65506":56,"65508":0,"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZ3000_4rbqgcuv","zclVersion":3,"appVersion":72,"modelId":"TS0001","powerSource":1}},"manuSpecificBosch":{"attributes":{"53251":"AAAA"}},"genOnOff":{"attributes":{"onOff":0,"onTime":0,"offWaitTime":0,"moesStartUpOnOff":0}},"manuSpecificTuya_3":{"attributes":{"53248":0,"53249":0,"53250":0,"53251":0,"53252":0,"53253":0,"switchType":2}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00259088d4","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":72,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":153093895},"lastSeen":1685875541154,"defaultSendRequestWhen":"immediate"}
Comments
device gets fingerprinted in Z2M as this device: https://www.zigbee2mqtt.io/devices/TS0001.html#tuya-ts0001 Problem is only switching is possible, other exposes are missing (power_on_behavior, switch_type) The right device seems that one: https://www.zigbee2mqtt.io/devices/TS0001_switch_module.html With this external Converter everthing works fine. (exposes switch type, power on behavior both work)
External converter
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition ={
fingerprint: tuya.fingerprint('TS0001', ['_TZ3000_4rbqgcuv']),
model: 'TS0001_switch_module',
vendor: 'TuYa',
description: '1 gang switch module',
whiteLabel: [{vendor: 'OXT', model: 'SWTZ21'}, {vendor: 'AVATTO', model: 'ZWSM16-1'}],
extend: tuya.extend.switch({switchType: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
},
};
module.exports = definition;
Supported color modes
No response
Color temperature range
No response
Fixed, thanks!
Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)