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]: TS0601, _TZ3000_iv6ph5tr - KnockautX FMS2C017/maybe MOES ZRM-104B-MS #20156

Closed
thotha opened this issue Dec 11, 2023 · 14 comments
Labels
new device support New device support request

Comments

@thotha
Copy link

thotha commented Dec 11, 2023

Link

https://www.brelag.com/shop/fms2c017-knockautx-licht-schaltaktor-unterputz-2-kanal-4529?page=2&attrib=31-87#attr=

Database entry

{"id":3,"type":"Router","ieeeAddr":"0x003c84fffe6fd27a","nwkAddr":24023,"manufId":4098,"manufName":"_TZ3000_iv6ph5tr","powerSource":"Mains (single phase)","modelId":"TS011F","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":266,"inClusterList":[0,3,4,5,6,57344,57345],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZ3000_iv6ph5tr","zclVersion":3,"appVersion":67,"modelId":"TS011F","powerSource":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b002b4889df","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b002b4889df","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b002b4889df","endpointID":1}],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":266,"inClusterList":[3,4,5,6,57344,57345],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":67,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1702285158789,"defaultSendRequestWhen":"immediate"}

Comments

FMS2C017 - KnockautX Licht-Schaltaktor Unterputz 2-Kanal Brelag Schweiz AG Smart Home

Product URL (German!): https://www.brelag.com/shop/fms2c017-knockautx-licht-schaltaktor-unterputz-2-kanal-4529?page=2&attrib=31-87#attr=
Documents URL (German!): https://drive.google.com/drive/folders/1wAacNL3VOTl6bkXZMSipX1I8P6jw_8GS

ZRM-104B-MS - MOES Tuya ZigBee 3.0 RF Switch Module, Smart Light Switch Module 1/2 Gang

Simmilar Prodct (Based on device pictures and specifications): https://moeshouse.com/products/zigbee-104-module?variant=39820671352913
Document URL: https://drive.google.com/file/d/11lFLA1FxpXL2g96PYHJsJYolxpPDCWYb/view

Datapoint extracted according https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html

DP Decription
1 Switch 1
2 Switch 2
9 Countdown 1
10 Countdown 2
27 Restart status

Standard Instruction Set from Device Debugging .

Code Type Values
switch_1 Boolean "{true,false}"
switch_2 Boolean "{true,false}"
countdown_1 Integer {"unit": "s","min": 0,"max": 43200,"scale": 0,"step": 1}
countdown_2 Integer {"unit": "s","min": 0,"max": 43200,"scale": 0,"step": 1}
relay_status Enum {"range": ["power_off","power_on","last"]}

Problem:
Despite I did try to create a converter file, this device will always be recognized as so totaly different product.
Instead of "_TZE200_iv6ph5tr" it will be recognized from Z2M as "_TZ3000_iv6ph5tr" which is a totaly different product, a 1-Channel Socket Switch.

Question:
How should my external converter be programmed so I can use this Tuya device?

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: [{modelID: 'TS0601',manufacturerName: '_TZE200_iv6ph5tr',},],
    model: 'FMS2C017',
    vendor: 'KnockautX Intelligent Home by Brelag AG Switzerland',
    description: '2 gang switch',
    fromZigbee: [tuya.fz.datapoints],
    toZigbee: [tuya.tz.datapoints],
	onEvent: tuya.onEventSetTime, 
    configure: tuya.configureMagicPacket,
    exposes: [
        tuya.exposes.switch().withEndpoint('l1'),
        tuya.exposes.switch().withEndpoint('l2'),
        tuya.exposes.countdown().withEndpoint('l1'),
        tuya.exposes.countdown().withEndpoint('l2'),
        // Both of the following exposes do not work either
        // e.enum('power_on_behavior', ea.STATE_SET, ['off', 'on', 'previous']),
        // or
        // e.power_on_behavior(['off', 'on', 'previous']).withAccess(ea.STATE_SET),
    ],
    meta: {
        multiEndpoint: true,
        tuyaDatapoints: [
        	// Channel 1
            [1, 'Switch 1', tuya.valueConverter.onOff],
            [9, 'Countdown 1', tuya.valueConverter.countdown],
            // Channel 2
            [2, 'Switch 2', tuya.valueConverter.onOff,], 
            [10, 'Countdown 2', tuya.valueConverter.countdown],
            // All channels
            [27, 'Restart status', tuya.valueConverter.powerOnBehaviorEnum],
        ],
    },
    endpoint: (device) => {
        return {'l1': 1, 'l2': 1};
    },
};

// export default definitions;
module.exports = definitions;


module.exports = definition;

Supported color modes

No response

Color temperature range

No response

@thotha thotha added the new device support New device support request label Dec 11, 2023
@Koenkk
Copy link
Owner

Koenkk commented Dec 11, 2023

Your ext converter looks good, does it work with this?

@thotha
Copy link
Author

thotha commented Dec 11, 2023

unfortunately no, it doesn't
see my problem description

@Koenkk
Copy link
Owner

Koenkk commented Dec 12, 2023

@thotha
Copy link
Author

thotha commented Dec 12, 2023

Hello Keon
Thank you for your suggestion, but there was no change in behaviour.
I did have to change the last code from "module.exports = definitions;" to "module.exports = definition;" (without the letter "s") that Z2M did not complain and did finally start.

Any other way to get this working?
Do you need any other outputs, logs and such?

failure.log

@thotha
Copy link
Author

thotha commented Dec 13, 2023

Dear Koen
Just a little information.
In ZHA latest version in Hassio, I'm able to add this switch and I can send On/Off commands, despite ZHA also does recognize it as TS011F by _TZ3000_iv6ph5tr and not as TS0601 by _TZE200_iv6ph5tr as it should.
Mybe this is of some help for you. Also let me know if you need anything else.

@Koenkk
Copy link
Owner

Koenkk commented Dec 13, 2023

z2m also detects it as TS011F, from your database.db entry: "modelId":"TS011F",, I updated https://gist.github.com/Koenkk/cd0206b2ed9d76c5430811df37c3cd89

@thotha thotha changed the title [New device support]: TS0601, _TZE200_iv6ph5tr - KnockautX FMS2C017/maybe MOES ZRM-104B-MS [New device support]: TS0601, _TZ3000_iv6ph5tr - KnockautX FMS2C017/maybe MOES ZRM-104B-MS Dec 15, 2023
@thotha
Copy link
Author

thotha commented Dec 15, 2023

Zigbee2MQTT disregards this proposed converter and does not use it at all. Instead Z2M chooses, for no reason, the integrated converter “Tuya” “TS011F_plug_1”. With this, however, a completely wrong device is assigned to this module.
Bildschirmfoto 2023-12-15 um 13 45 06

Surprisingly, in ZHA this module is recognised as “TS011F by _TZ3000_iv6ph5tr” and the quirk “zhaoquirks.tuya.ts011f_switch.Tuya_2G_Switch” is used. This allows me to switch the two channels on/off as needed. OK, the functions “Countdown” and “Restart status” are not recognised here either, but they don’t matter to me at the moment.
Bildschirmfoto 2023-12-15 um 13 44 50

My question now is how to integrate this device into Z2M, whether and how to rewrite the ZHA Quirk into a working Z2M converter.
My other module KnockautX FMD2C018/maybe MOES ZM-105B-MS was successfully integrated with the Z2M converter.

@Koenkk
Copy link
Owner

Koenkk commented Dec 15, 2023

@thotha
Copy link
Author

thotha commented Dec 15, 2023

Dear Koen
Thank you for your converter config.
1.) I can see now the correct exposes, I can press the buttons On/Off or change the Countdown, but the device doesn't change its state.
2.) I can see in the log file that Z2M does send the commands but nothing happens.
3.) If I do change On/Off values on the device itself, I here the relays like they flip state, I can see the signal arrive in the log file but no change in the exposes view.
4.) I had to change the last entry from module.exports = definitions; to module.exports = definition;. Else Z2M wouldn't start at all.

So we're getting closer to a working solution.
The device code in question is 0x003c84fffe90671c.
After successful registration, I first did try several times to with On/Off and then change values for countdown.
then I did change several times the On/Off state on the device it self...
Logfile below.

023-12-15 21:49:44Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'manuSpecificTuya_3', data '{"powerOnBehavior":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:49:44MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:44+01:00","linkquality":29,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:49:44Received Zigbee message from '0x003c84fffe90671c', type 'readResponse', cluster 'genBasic', data '{"stackVersion":0}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:44MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:44+01:00","linkquality":29,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:49:44Received Zigbee message from '0x003c84fffe90671c', type 'read', cluster 'genTime', data '["localTime"]' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:44MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:44+01:00","linkquality":36,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:49:44Received Zigbee message from '0x003c84fffe90671c', type 'readResponse', cluster 'genBasic', data '{"dateCode":""}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:44MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:44+01:00","linkquality":32,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:49:45Received Zigbee message from '0x003c84fffe90671c', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:45MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:45+01:00","linkquality":29,"state_l1":null,"state_l2":null}' Info 2023-12-15 21:49:45Successfully interviewed '0x003c84fffe90671c', device has successfully been paired Info 2023-12-15 21:49:45Device '0x003c84fffe90671c' is supported, identified as: KnockautX Intelligent Home by Brelag AG Switzerland 2 gang switch (FMS2C017) Info 2023-12-15 21:49:45MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"2 gang switch","exposes":[{"endpoint":"l1","features":[{"access":3,"description":"On/off state of the switch","endpoint":"l1","label":"State","name":"state","property":"state_l1","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"endpoint":"l2","features":[{"access":3,"description":"On/off state of the switch","endpoint":"l2","label":"State","name":"state","property":"state_l2","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":3,"description":"Countdown to turn device off after a certain time","endpoint":"l1","label":"Countdown","name":"countdown","property":"countdown_l1","type":"numeric","unit":"s","value_max":43200,"value_min":0,"value_step":1},{"access":3,"description":"Countdown to turn device off after a certain time","endpoint":"l2","label":"Countdown","name":"countdown","property":"countdown_l2","type":"numeric","unit":"s","value_max":43200,"value_min":0,"value_step":1},{"access":1,"description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"FMS2C017","options":[],"supports_ota":false,"vendor":"KnockautX Intelligent Home by Brelag AG Switzerland"},"friendly_name":"0x003c84fffe90671c","ieee_address":"0x003c84fffe90671c","status":"successful","supported":true},"type":"device_interview"}' Info 2023-12-15 21:49:45Configuring '0x003c84fffe90671c' Info 2023-12-15 21:49:45MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"2 gang switch","friendly_name":"0x003c84fffe90671c","model":"FMS2C017","supported":true,"vendor":"KnockautX Intelligent Home by Brelag AG Switzerland"},"type":"pairing"}' Debug 2023-12-15 21:49:45Received Zigbee message from '0x003c84fffe90671c', type 'readResponse', cluster 'genBasic', data '{"65534":0,"appVersion":67,"manufacturerName":"_TZ3000_iv6ph5tr","modelId":"TS011F","powerSource":1,"zclVersion":3}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:45MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:45+01:00","linkquality":21,"state_l1":null,"state_l2":null}' Info 2023-12-15 21:49:45Successfully configured '0x003c84fffe90671c' Debug 2023-12-15 21:49:52Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genBasic', data '{"65506":31,"65508":0,"appVersion":67}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:52MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:52+01:00","linkquality":21,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:49:52Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genBasic', data '{"65503":"_�\u000f-\u0012"}' from endpoint 1 with groupID 0 Info 2023-12-15 21:49:52MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:52+01:00","linkquality":29,"state_l1":null,"state_l2":null}' Debug 2023-12-15 21:50:00Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"state_l1":"ON"}' Debug 2023-12-15 21:50:00Publishing 'set' 'state' to '0x003c84fffe90671c' Info 2023-12-15 21:50:00MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:49:52+01:00","linkquality":29,"state_l1":"ON","state_l2":null}' Info 2023-12-15 21:50:00MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:50:00+01:00","linkquality":36,"state_l1":"ON","state_l2":null}' Debug 2023-12-15 21:50:03Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"state_l2":"ON"}' Debug 2023-12-15 21:50:03Publishing 'set' 'state' to '0x003c84fffe90671c' Info 2023-12-15 21:50:03MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:50:00+01:00","linkquality":36,"state_l1":"ON","state_l2":"ON"}' Info 2023-12-15 21:50:03MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":null,"countdown_l2":null,"last_seen":"2023-12-15T21:50:03+01:00","linkquality":36,"state_l1":"ON","state_l2":"ON"}' Debug 2023-12-15 21:50:06Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"countdown_l1":11849}' Debug 2023-12-15 21:50:06Publishing 'set' 'countdown' to '0x003c84fffe90671c' Info 2023-12-15 21:50:06MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":null,"last_seen":"2023-12-15T21:50:03+01:00","linkquality":36,"state_l1":"ON","state_l2":"ON"}' Info 2023-12-15 21:50:06MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":null,"last_seen":"2023-12-15T21:50:06+01:00","linkquality":36,"state_l1":"ON","state_l2":"ON"}' Debug 2023-12-15 21:50:08Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"countdown_l2":13045}' Debug 2023-12-15 21:50:08Publishing 'set' 'countdown' to '0x003c84fffe90671c' Info 2023-12-15 21:50:08MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:06+01:00","linkquality":36,"state_l1":"ON","state_l2":"ON"}' Info 2023-12-15 21:50:09MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:09+01:00","linkquality":32,"state_l1":"ON","state_l2":"ON"}' Debug 2023-12-15 21:50:11Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"state_l1":"OFF"}' Debug 2023-12-15 21:50:11Publishing 'set' 'state' to '0x003c84fffe90671c' Info 2023-12-15 21:50:11MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:09+01:00","linkquality":32,"state_l1":"OFF","state_l2":"ON"}' Info 2023-12-15 21:50:11MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:11+01:00","linkquality":29,"state_l1":"OFF","state_l2":"ON"}' Debug 2023-12-15 21:50:13Received MQTT message on 'zigbee2mqtt/0x003c84fffe90671c/set' with data '{"state_l2":"OFF"}' Debug 2023-12-15 21:50:13Publishing 'set' 'state' to '0x003c84fffe90671c' Info 2023-12-15 21:50:14MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:11+01:00","linkquality":29,"state_l1":"OFF","state_l2":"OFF"}' Info 2023-12-15 21:50:14MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:14+01:00","linkquality":36,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:33Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:33MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:33+01:00","linkquality":29,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:33Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:33MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:33+01:00","linkquality":25,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:47Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:47MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:47+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:47Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:47MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:47+01:00","linkquality":69,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:49Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:49MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:49+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:50Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:50MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:50+01:00","linkquality":72,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:51Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:51MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:51+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:50:52Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:50:52MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:50:52+01:00","linkquality":72,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:00Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 2 with groupID 0 Info 2023-12-15 21:51:00MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:00+01:00","linkquality":61,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:02Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 2 with groupID 0 Info 2023-12-15 21:51:02MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:02+01:00","linkquality":61,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:10Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:10MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:10+01:00","linkquality":72,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:11Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:11MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:11+01:00","linkquality":72,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:13Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:13MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:13+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:14Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:14MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:14+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:15Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":0}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:15MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:15+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}' Debug 2023-12-15 21:51:15Received Zigbee message from '0x003c84fffe90671c', type 'attributeReport', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID 0 Info 2023-12-15 21:51:15MQTT publish: topic 'zigbee2mqtt/0x003c84fffe90671c', payload '{"countdown_l1":11849,"countdown_l2":13045,"last_seen":"2023-12-15T21:51:15+01:00","linkquality":76,"state_l1":"OFF","state_l2":"OFF"}'

@Koenkk
Copy link
Owner

Koenkk commented Dec 16, 2023

@thotha
Copy link
Author

thotha commented Dec 16, 2023

Good morning Koen
thank you for this updated converter.
Looks good for the switch part.
But for to officially create a pull, the countdown needs to be implemented as well, despite I don't need it for myself.

I did try to add this missing part myself, but either if I try to add extend: tuya.extend.countdown({endpoints: ['l1', 'l2']}), command or add exposes: tuya.exposes.countdown().withEndpoint('l1'), tuya.exposes.countdown().withEndpoint('l12'), Z2M won't start, so I miss the correct structure to modify the converter myself.

Thank you again for your help.
Have a nice day.
Regards
Thomas

@Koenkk
Copy link
Owner

Koenkk commented Dec 17, 2023

I'm not sure about the countdown, but can you check if switch type works with https://gist.github.com/Koenkk/cd0206b2ed9d76c5430811df37c3cd89

@thotha
Copy link
Author

thotha commented Dec 17, 2023

Good morning Koen
Thank you again for your converter.
This new function "switchType" is not supported from my device.
It's also not shown as supported feature in the extracted datapoints

DP Decription
1 Switch 1
2 Switch 2
9 Countdown 1
10 Countdown 2
27 Restart status

and the standard instruction set from device debugging.

Code Type Values
switch_1 Boolean "{true,false}"
switch_2 Boolean "{true,false}"
countdown_1 Integer {"unit": "s","min": 0,"max": 43200,"scale": 0,"step": 1}
countdown_2 Integer {"unit": "s","min": 0,"max": 43200,"scale": 0,"step": 1}
relay_status Enum {"range": ["power_off","power_on","last"]}

The only left functionality is countdown, but is no problem for me as HA has the much better countdown possibilities.
The converter without "switchType" is working for me and I can use it.

Have a nice and quiet Sunday with family and friends.
Kind regards
Thomas

@Koenkk
Copy link
Owner

Koenkk commented Dec 17, 2023

Added the device, let's ignore countdown for now, probably requires sniffing with the original hub because datapoints API doesn't seem to work for this device.

Changes will be available in the dev branch in a few hours from now.

@Koenkk Koenkk closed this as completed Dec 17, 2023
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