Open morpheus302 opened 10 months ago
// Add the lines below
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 ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const {} = require('zigbee-herdsman-converters/lib/tuya');
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 definition = {
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE204_srmahpwl'}],
model: 'ZS-SR-EUC',
vendor: 'Moes',
description: 'Star Ring - Smart Curtain Switch',
options: [exposes.options.invert_cover()],
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.cover_position(),
e.cover_position().setAccess('position', ea.STATE_SET),
e.enum('calibration', ea.STATE_SET, ['START', 'END']).withDescription('Calibration'),
//e.binary('backlight_mode', ea.STATE_SET, 'ON', 'OFF').withDescription('Backlight'),
e.enum('indicator_mode', ea.STATE_SET, ['off', 'on_off', 'off_on']).withDescription('Relay LED indicator mode'),
e.enum('motor_steering', ea.STATE_SET, ['FORWARD', 'BACKWARD']).withDescription('Motor Steering')
],
meta: {
// All datapoints go in here
tuyaDatapoints: [
[1, 'state', tuya.valueConverterBasic.lookup({'CLOSE': tuya.enum(2), 'STOP': tuya.enum(1), 'OPEN': tuya.enum(0)})], //Curtain Switch 1
[2, 'position', tuya.valueConverter.coverPosition], // Percentage 1
[3, 'calibration', tuya.valueConverterBasic.lookup({'START': tuya.enum(0), 'END': tuya.enum(1)})],, // Accurate Calibration
[8, 'motor_steering', tuya.valueConverterBasic.lookup({'FORWARD': tuya.enum(0), 'BACKWARD': tuya.enum(1)})], // Motor steering
// [14, 'backlight_mode', tuya.valueConverter.backlightModeOffNormalInverted], // Indicator Status
[14, 'indicator_mode', tuya.valueConverterBasic.lookup({'off': tuya.enum(0), 'on_off': tuya.enum(1), 'off_on': tuya.enum(2)})],
],
},
};
module.exports = definition;
This works to open/close the curtain but the indicator mode not
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days
Is this a working solution, or has a better version already been merged?
Link
https://moeshouse.com/products/zigbee-star-ring-curtain-switch
Database entry
{"id":26,"type":"Router","ieeeAddr":"0xa4c138c928bd3b8f","nwkAddr":49879,"manufId":4417,"manufName":"_TZE204_srmahpwl","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":"�[�,\u0013�[�,e�[�,\u0012","65506":56,"65508":0,"65534":0,"stackVersion":0,"dateCode":"","appVersion":74,"manufacturerName":"_TZE204_srmahpwl","zclVersion":3,"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":-1440156621},"lastSeen":1700339863157,"defaultSendRequestWhen":"immediate"}
Comments
Very similar to Moes ZTS-EUR-C
External converter
Supported color modes
No response
Color temperature range
No response