-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bseed (Led) Dimmer TS0601 _TZE200_3p5ydos3 #8911
Comments
I still hope someone can help me out... |
I have created a file TS0601.js and the device has been reconized: const definition = { module.exports = definition; |
I add the following to my configuration.yaml and reboot zigbee2mqtt: advanced:
I hit te buttons a couple off time: Down Button: nov 01 21:24:29 zigbee npm[1557]: Zigbee2MQTT:debug 2021-11-01 21:24:29: Received Zigbee message from '0xa4c1386b241d352e', type 'commandGetData', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,3,197],"type":"Buffer"},"datatype":2,"dp":2,"fn":0,"status":0,"transid":59}' from endpoint 1 with groupID 0 UP Button: ON/OFF Button: |
Can someone please help me out with the next step....I do not understand how to fix this. Thanks! |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Hi all, thanks in advance, |
Hi all, Bernd |
Nope, still waiting on a reaction..... I just added a item add the forum: |
Does it work with the following external converter? const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').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 definition = {
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
],
model: 'TS0601_dimmer',
vendor: 'TuYa',
description: 'Zigbee smart dimmer',
fromZigbee: [fz.tuya_dimmer, fz.ignore_basic_report],
toZigbee: [tz.tuya_dimmer_state, tz.tuya_dimmer_level],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
},
exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)],
whiteLabel: [
{vendor: 'Larkkey', model: 'ZSTY-SM-1DMZG-EU'},
{vendor: 'Earda', model: 'EDM-1ZAA-EU'},
{vendor: 'Earda', model: 'EDM-1ZAB-EU'},
{vendor: 'Earda', model: 'EDM-1ZBA-EU'},
{vendor: 'Mercator Ikuü', model: 'SSWD01'},
],
};
module.exports = definition;
external_converters:
- ext_converter.js
|
@Koenkk I tried out your code and it almost work perfectly, but adjust brightness by z2m is not working : On/OFF:
Dimming:
What is the next step to find out what goes wrong? Thanks a lot! |
@jvrrr that complicates things, this will require some reverse engineering when using the device with the original gateway, https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#requirements-and-caveats might help |
@Koenkk If I set in z2m the dimmer on 50%, then is that the lowest level I manually can dim by hand .. so I can't dim any lower then 50%. Is this something you have ever seen? |
@jvrrr so if I understand correctly, publishing to
|
Log from z2m: Debug Publishing 'set' 'brightness' to '0xa4c138f78de31872' Debug Received Zigbee message from '0xa4c138f78de31872', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,3,118],"type":"Buffer"},"datatype":2,"dp":3,"fn":0,"seq":1}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/0xa4c138f78de31872', payload '{"brightness":225,"level":886,"linkquality":102,"state":"ON"}' Debug Received MQTT message on 'zigbee2mqtt/0xa4c138f78de31872/set' with data '{"brightness":82}' Debug Publishing 'set' 'brightness' to '0xa4c138f78de31872' Debug Received Zigbee message from '0xa4c138f78de31872', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"data":{"data":[0,0,1,66],"type":"Buffer"},"datatype":2,"dp":3,"fn":0,"seq":1}' from endpoint 1 with groupID 0 Info MQTT publish: topic 'zigbee2mqtt/0xa4c138f78de31872', payload '{"brightness":80,"level":322,"linkquality":94,"state":"ON"}' |
Can you try with this external converter? const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').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 utils = require('zigbee-herdsman-converters/lib/utils');
const tzLocal = {
tuya_dimmer_level: {
key: ['brightness_min', 'brightness', 'brightness_percent', 'level'],
convertSet: async (entity, key, value, meta) => {
// upscale to 1000
let newValue;
let dp = tuya.dataPoints.dimmerLevel;
if (meta.device.manufacturerName === '_TZE200_3p5ydos3') {
dp = tuya.dataPoints.eardaDimmerLevel;
}
if (key === 'brightness_min') {
if (value >= 0 && value <= 100) {
newValue = utils.mapNumberRange(value, 0, 100, 0, 1000);
dp = tuya.dataPoints.dimmerLevel;
} else {
throw new Error('Dimmer brightness_min is out of range 0..100');
}
} else if (key === 'level') {
if (value >= 0 && value <= 1000) {
newValue = Math.round(Number(value));
} else {
throw new Error('Dimmer level is out of range 0..1000');
}
} else if (key === 'brightness_percent') {
if (value >= 0 && value <= 100) {
newValue = utils.mapNumberRange(value, 0, 100, 0, 1000);
} else {
throw new Error('Dimmer brightness_percent is out of range 0..100');
}
} else {
if (value >= 0 && value <= 255) {
newValue = utils.mapNumberRange(value, 0, 255, 0, 1000);
} else {
throw new Error('Dimmer brightness is out of range 0..255');
}
}
// Always use same transid as tuya_dimmer_state (https://github.com/Koenkk/zigbee2mqtt/issues/6366)
await tuya.sendDataPointValue(entity, dp, newValue, 'dataRequest', 1);
},
},
};
const definition = {
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'},
],
model: 'TS0601_dimmer',
vendor: 'TuYa',
description: 'Zigbee smart dimmer',
fromZigbee: [fz.tuya_dimmer, fz.ignore_basic_report],
toZigbee: [tz.tuya_dimmer_state, tzLocal.tuya_dimmer_level],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
},
exposes: [e.light_brightness().setAccess('state', ea.STATE_SET).setAccess('brightness', ea.STATE_SET)],
whiteLabel: [
{vendor: 'Larkkey', model: 'ZSTY-SM-1DMZG-EU'},
{vendor: 'Earda', model: 'EDM-1ZAA-EU'},
{vendor: 'Earda', model: 'EDM-1ZAB-EU'},
{vendor: 'Earda', model: 'EDM-1ZBA-EU'},
{vendor: 'Mercator Ikuü', model: 'SSWD01'},
],
};
module.exports = definition; |
@Koenkk debug Received MQTT message on 'zigbee2mqtt/0xa4c138f78de31872/set' with data '{"brightness":196}' This device has got a other ID because I have two off them, and I want to test if it was a issues with the device it self. I hope you have got a other trick ;-) Thanks a lot!! |
@jvrrr then this device uses a different data point for the brightness, you can find out which via https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#requirements-and-caveats |
@Koenkk |
@Koenkk I have the same dimmer. So, when adding a converter from your last post dimmer start working completely fine. Now it's turning on/off and can change brightness. |
I am waiting news from your discover |
It takes a couple of weeks till it will arrive. |
@Koenkk {startRowId: "", pageNo: 1, pageSize: 10, code: "2", startTime: 1645644701499, endTime: 1645817501500,…} Thanks a lot, would be great if this will work out! |
Sorry Koen, I have been stupid and forget a enter...............your script did work!!!: const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee}; const tzLocal = { const definition = { module.exports = definition;Can you please add it as new supported device. You are great ,thanks a lot!!!!!!! |
Done! 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) |
@jvrrr are you able to toggle this switch? I. have same on and am having some weird issues |
@jvrrr Maybe you could share with us the following information:
|
Hi, I finally found a Zigbee dimmer that fit in a Dutch walloutlet.
https://nl.aliexpress.com/item/1005003249382419.html
Only It is not supported by Zigbee2mqtt.:
sep 29 11:32:02 zigbee npm[1472]: Zigbee2MQTT:warn 2021-09-29 11:32:02: Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE200_3p5ydos3'
"friendly_name":"0xa4c1386b241d352e","hardwareVersion":1,"ieeeAddr":"0xa4c1386b241d352e","lastSeen":1632908752773,"manufacturerID":4417,"manufacturerName":"_TZE200_3p5ydos3","model":"TS0601","modelID":"TS0601","networkAddress":46346,"powerSource":"Mains (single phase)","type":"Router","vendor":"-"}],"type":"devices"}'
Can you please add it?
data/database.db entry of the device:
"id":46,"type":"Router","ieeeAddr":"0xa4c1386b241d352e","nwkAddr":46346,"manufId":4417,"manufName":"_TZE200_3p5ydos3","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":"\n(f\n(\u0012","65506":32,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_3p5ydos3","powerSource":1,"zclVersion":3,"appVersion":64,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":64,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1632908752773}
THANKS!!!!
Kind regards,
Jasper
The text was updated successfully, but these errors were encountered: