-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[New device support]: TS0601 - _TZE200_ppuj1vem #24124
Comments
wow, I just need to change |
It is working [as far as the motion sensor and its behavior], but I have trouble to get the battery... const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ppuj1vem']),
model: 'TS0601',
vendor: 'Tuya',
description: 'Human presence sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.presence(),
exposes.numeric('battery_level', ea.STATE).withDescription('Battery level').withUnit('%'),
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse0],
[101, 'battery_level', tuya.valueConverter.raw],
],
},
};
module.exports = definition; |
I think this should cover all: motion (shows as presence in Home Assistant), illuminance, and battery. const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_ppuj1vem']),
model: 'TS0601_motion_sensor',
vendor: 'Tuya',
description: 'Human presence sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.presence().withDescription('Occupancy'),
e.illuminance_lux(),
e.battery()
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse0],
[101, 'illuminance_lux', tuya.valueConverter.raw],
[4, 'battery', tuya.valueConverter.raw]
],
},
};
module.exports = definition; |
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 |
Link
https://a.co/d/dpKaOr4
Database entry
{"definition":{"description":"Human presence sensor","model":"TS0601","supports":"presence, battery_level, linkquality","vendor":"Tuya"},"friendlyName":"0xa4c1383bebfbaf96","ieeeAddr":"0xa4c1383bebfbaf96","lastSeen":1727464098607,"manufacturerName":"_TZE200_ppuj1vem","modelID":"TS0601","networkAddress":55019,"type":"EndDevice"}]}}
Zigbee2MQTT version
1.40.1
Comments
See details below... when I trigger sensor, it will log twice about "presence: false" ... and as expected after 30s, another two logs for "presence: true".
External definition
What does/doesn't work with the external definition?
I tried this so far:
when I trigger sensor, it will log twice about "presence: false" ... and as expected after 30s, another two logs for "presence: true".
The battery value also seems low for a battery that just replaced a month ago.
I played around with converter to flip the presence value. but no luck, it just make trigger not triggering at all :(
More info
The text was updated successfully, but these errors were encountered: