zigbee2mqtt
zigbee2mqtt copied to clipboard
[New device support]: Tuya TS0601 / _TZE204_5lc9gpx3
Link
https://nolink
Database entry
{"id":32,"type":"Router","ieeeAddr":"0xa4c1384b5c4f60a6","nwkAddr":37589,"manufId":4417,"manufName":"_TZE204_5lc9gpx3","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"��l.\u0017��l.\u0013ël.eīl.\u0012","65506":56,"65508":0,"65534":0,"stackVersion":0,"dateCode":"","manufacturerName":"_TZE204_5lc9gpx3","zclVersion":3,"appVersion":74,"modelId":"TS0601","powerSource":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1725522730904}
Comments
This is a light switch which has customizable backlight LED colours, as well as power reporting.
I got all the endpoint codes, but the instructions say the "Event Details" are garbage, but mine are all actual data, like colours and power usage.
These are the "Code" from the Tuya website Switch 1 Master Switch 13 Restart Status 14 Indicator Status 15 Backlight Switch 16 Add Electircity 20 Current Current 21 Current Power 22 Current Voltage 23 Voltage Coefficient 25 Electric Coefficient 26 Power Coefficient 27 Electricity Coefficient 28 Restart Status 29 Backlight 102 On Colour 103 Off Colour 104
External definition
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 legacy = require('zigbee-herdsman-converters/lib/legacy');
const ota = require('zigbee-herdsman-converters/lib/ota');
const modernExtend = require('zigbee-herdsman-converters/lib/modernExtend');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition = {
fingerprint: [
{
// The model ID from: Device with modelID 'TS0601' is not supported
// You may need to add \u0000 at the end of the name in some cases
modelID: 'TS0601',
// The manufacturer name from: Device with modelID 'TS0601' is not supported.
manufacturerName: '_TZE204_5lc9gpx3',
},
],
model: 'TS0601',
vendor: 'TuYa',
description: '1 Gang Custom Color Light Switch',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime'
configure: tuya.configureMagicPacket,
exposes: [
// Here you should put all functionality that your device exposes
],
meta: {
// All datapoints go in here
tuyaDatapoints: [],
},
extend: [
// A preferred new way of extending functionality.
],
};
module.exports = definition;
What does/doesn't work with the external definition?
I got the basic parts in, but I feel this is a bit complex and I'm not sure where to start. The automatic JS code to paste in the console window didn't work, so i got these codes from each of the network dev tool "code" values, hopefully its right.
If someone could tell me what I need to do to get all the colours
Power Usage:
and then the basic switch functionality that would be amazing.