Skip to content

Instantly share code, notes, and snippets.

@RadekDvorak
Last active February 6, 2023 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RadekDvorak/e67691e2a14d53af92a91b22f2beb10b to your computer and use it in GitHub Desktop.
Save RadekDvorak/e67691e2a14d53af92a91b22f2beb10b to your computer and use it in GitHub Desktop.
_TZE200_vs0skpuc
./current/log.txt:debug 2023-02-06 16:13:11: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,253],"type":"Buffer"},"datatype":2,"dp":1}],"seq":11264}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:11: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,56],"type":"Buffer"},"datatype":2,"dp":2}],"seq":11520}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:11: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,100],"type":"Buffer"},"datatype":2,"dp":4}],"seq":11776}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:11: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":9}],"seq":12032}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:12: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":23}],"seq":12288}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:12: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":24}],"seq":12544}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:12: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,100],"type":"Buffer"},"datatype":2,"dp":4}],"seq":12800}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:21: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,100],"type":"Buffer"},"datatype":2,"dp":4}],"seq":13056}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:21: Received Zigbee message from 'TestTeploty', type 'readResponse', cluster 'genBasic', data '{"65534":0,"appVersion":67,"manufacturerName":"_TZE200_vs0skpuc","modelId":"TS0601","powerSource":3,"zclVersion":3}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:26: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,253],"type":"Buffer"},"datatype":2,"dp":1}],"seq":13312}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:27: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,49],"type":"Buffer"},"datatype":2,"dp":2}],"seq":13568}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:13:31: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,100],"type":"Buffer"},"datatype":2,"dp":4}],"seq":13824}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:14:27: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,249],"type":"Buffer"},"datatype":2,"dp":1}],"seq":14080}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:14:27: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,47],"type":"Buffer"},"datatype":2,"dp":2}],"seq":14336}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:14:36: Received Zigbee message from 'TestTeploty', type 'attributeReport', cluster 'genBasic', data '{"65503":"/\bm+\u0011\u0000\u0000\u0000\u0000\u0011\u0000\u0000\u0000\u0000\u0011\u000b\u0000\u0000\u0000\u0011V�s+\u0012"}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:15:27: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,245],"type":"Buffer"},"datatype":2,"dp":1}],"seq":14592}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:15:27: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,47],"type":"Buffer"},"datatype":2,"dp":2}],"seq":14848}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:16:57: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,241],"type":"Buffer"},"datatype":2,"dp":1}],"seq":15104}' from endpoint 1 with groupID 0
./current/log.txt:debug 2023-02-06 16:16:57: Received Zigbee message from 'TestTeploty', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,48],"type":"Buffer"},"datatype":2,"dp":2}],"seq":15360}' from endpoint 1 with groupID 0
// BROKEN, NOT WORKING AT ALL
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 TS0201_battery = {
cluster: 'genPowerCfg',
type: ['attributeReport', 'readResponse'],
convert: (model, msg, publish, options, meta) => {
// https://github.com/Koenkk/zigbee2mqtt/issues/11470
if (msg.data.batteryPercentageRemaining == 200 && msg.data.batteryVoltage < 30) return;
return fz.battery.convert(model, msg, publish, options, meta);
},
};
const definition = {
// Since a lot of TuYa devices use the same modelID, but use different datapoints
// it's necessary to provide a fingerprint instead of a zigbeeModel
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: '_TZE200_vs0skpuc',
},
],
model: 'TS0601_new',
vendor: 'TuYa',
description: 'Temperature & Humidity Sensor',
// 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
e.battery(), e.temperature(), e.humidity(),e.battery_voltage()
],
fromZigbee: [TS0201_battery, fz.temperature, fz.humidity],
// meta: {
// // All datapoints go in here
// tuyaDatapoints: [
// ],
// },
};
module.exports = definition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment