Tuya 10 Gang Switch TS0601_switch_10 #19938
Closed
Neil-M0NFI
started this conversation in
Devices
Replies: 1 comment 1 reply
-
Added! 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) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently received a 10 gang Tuya switch from Aliexpress that wasn't supported
https://www.aliexpress.com/item/1005005847728198.html
I modified other similar switch files into this external converter file tze200_10.js file and will hopefully be useful to others until it is supported directly
`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 = {
// 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_7sjncirf',
},
],
model: 'TS0601_switch_10',
vendor: 'TuYa',
description: '10 gang 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: [
e.switch().withEndpoint('l1'),
e.switch().withEndpoint('l2'),
e.switch().withEndpoint('l3'),
e.switch().withEndpoint('l4'),
e.switch().withEndpoint('l5'),
e.switch().withEndpoint('l6'),
e.switch().withEndpoint('l7'),
e.switch().withEndpoint('l8'),
e.switch().withEndpoint('l9'),
e.switch().withEndpoint('l10')
],
endpoint: (device) => {
return {'l1': 1, 'l2': 1, 'l3': 1, 'l4': 1, 'l5': 1, 'l6': 1, 'l7': 1, 'l8': 1, 'l9': 1, 'l10': 1};
},
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[1, 'state_l1', tuya.valueConverter.onOff],
[2, 'state_l2', tuya.valueConverter.onOff],
[3, 'state_l3', tuya.valueConverter.onOff],
[4, 'state_l4', tuya.valueConverter.onOff],
[5, 'state_l5', tuya.valueConverter.onOff],
[6, 'state_l6', tuya.valueConverter.onOff],
[0x65, 'state_l7', tuya.valueConverter.onOff],
[0x66, 'state_l8', tuya.valueConverter.onOff],
[0x67, 'state_l9', tuya.valueConverter.onOff],
[0x68, 'state_l10', tuya.valueConverter.onOff],
],
},
};
module.exports = definition;`
Beta Was this translation helpful? Give feedback.
All reactions