入手了两台电机,一台杜亚,一台豆灵(说明书提示可以接入涂鸦),杜亚可以顺利接入ha,但是豆灵接入zigbee2mqtt之后,提示不支持(不知道为啥帖子无法传图,一传图就说超过了字节)日志中也有提示:
Warning 2023-09-21 08:06:36Received message from unsupported device with Zigbee model 'TS0601' and manufacturer name '_TZE204_ohaqpcz5'
Warning 2023-09-21 08:06:36Please see: https://www.zigbee2mqtt.io/advan ... rt_new_devices.html
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: '_TZE204_ohaqpcz5',
},
],
model: 'TS0601_DOULING',
vendor: 'TuYa',
description: 'Fill in a description of the device here',
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().setAccess('position', ea.STATE_SET),
exposes.composite('options', 'options')
.withFeature(exposes.numeric('motor_speed', ea.STATE_SET)
.withValueMin(0)
.withValueMax(255)
.withDescription('Motor speed'))
],
meta: {
// All datapoints go in here
tuyaDatapoints: [
[1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
[2, 'position', tuya.valueConverter.coverPosition],
[3, 'position', tuya.valueConverter.raw],
[4, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
[7, 'work_state', tuya.valueConverterBasic.lookup({'standby': tuya.enum(0), 'success': tuya.enum(1), 'learning': tuya.enum(2)})],
[13, 'battery', tuya.valueConverter.raw],
[101, 'motor_direction', tuya.valueConverterBasic.lookup({'left': tuya.enum(0), 'right': tuya.enum(1)})],
[102, 'set_upper_limit', tuya.valueConverterBasic.lookup({'start': tuya.enum(1), 'stop': tuya.enum(0)})],
[107, 'factory_reset', tuya.valueConverter.setLimit],
],
},
};