Replies: 2 comments 6 replies
-
Added it! Changes will be available in the dev branch in a few hours from now. |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry guys to bother you with this topic. I had my motion sensor from Tuya TS0601 _TZE200_clrdrnya working. But after the update I think something changed in the tuya.ts file and my device is not supported anymore. I get lost in the description of z2m of how to ad support for device. It is really frustating always to lose time after an update of the system. Can anyone help me how to fix this? I have already created a file in the config folder and added the device properties to get this working but the old one does not work anymore.
this below was working:
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_clrdrnya',
},
],
model: 'TS0601_new',
vendor: 'Tuya',
description: '24G radar human presence motion 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: [
e.illuminance_lux(),
e.presence(),
e
.numeric('target_distance', ea.STATE)
.withValueMin(0)
.withValueMax(10)
.withValueStep(0.01)
.withDescription('Distance to target')
.withUnit('m'),
e.numeric('sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(9).withValueStep(1).withDescription('sensitivity of the radar'),
e
.numeric('minimum_range', ea.STATE_SET)
.withValueMin(0)
.withValueMax(10.0)
.withValueStep(0.1)
.withDescription('minimum detection range')
.withUnit('m'),
e
.numeric('maximum_range', ea.STATE_SET)
.withValueMin(0)
.withValueMax(10.0)
.withValueStep(0.1)
.withDescription('maximum detection range')
.withUnit('m'),
e
.numeric('interval_time', ea.STATE_SET)
.withValueMin(1)
.withValueMax(3600)
.withValueStep(1)
.withDescription('interval_time')
.withUnit('s'),
e
.numeric('detection_delay', ea.STATE_SET)
.withValueMin(0)
.withValueMax(10.0)
.withValueStep(0.1)
.withDescription('detection delay')
.withUnit('s'),
e
.numeric('fading_time', ea.STATE_SET)
.withValueMax(1500)
.withValueMin(5)
.withValueStep(5)
.withDescription('presence timeout')
.withUnit('s'),
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse1],
[2, 'sensitivity', tuya.valueConverter.raw],
[3, 'minimum_range', tuya.valueConverter.divideBy100],
[4, 'maximum_range', tuya.valueConverter.divideBy100],
[9, 'target_distance', tuya.valueConverter.divideBy100],
[103, 'illuminance_lux', tuya.valueConverter.raw],
[104, 'interval_time', tuya.valueConverter.raw],
[105, 'detection_delay', tuya.valueConverter.divideBy10],
[106, 'fading_time', tuya.valueConverter.divideBy10],
],
},
}
module.exports = definition;
Beta Was this translation helpful? Give feedback.
All reactions