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

[New device support]: AVATTO ZWSM-16-1 1gang switch module #17907

Closed
anharald opened this issue Jun 4, 2023 · 1 comment
Closed

[New device support]: AVATTO ZWSM-16-1 1gang switch module #17907

anharald opened this issue Jun 4, 2023 · 1 comment
Labels
new device support New device support request

Comments

@anharald
Copy link

anharald commented Jun 4, 2023

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

@anharald anharald added the new device support New device support request label Jun 4, 2023
Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jun 4, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 4, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests

2 participants