-
-
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
Trust ZCTS-808 / ZPIR-8000 #677
Comments
Can you share the content of your |
Can you try adding this to devices.js: {
zigbeeModel: ['VMS_ADUROLIGHT'],
model: 'ZPIR-8000',
vendor: 'Trust',
description: 'Motion Sensor',
supports: 'occupancy',
fromZigbee: [ ],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
}, |
Thank you for your reply, now after detection I get the following output:
zigbee2mqtt:debug 2018-12-13 16:37:53 Received zigbee message of type 'devInterview' with data '"0x00158d0001cc9439"'
zigbee2mqtt:debug 2018-12-13 16:37:53 Received zigbee message of type 'devIncoming' with data '"0x00158d0001cc9439"' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:info 2018-12-13 16:37:53 Device incoming...
zigbee2mqtt:info 2018-12-13 16:37:53 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
zigbee2mqtt:debug 2018-12-13 16:37:53 Received zigbee message of type 'devStatus' with data '"online"' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:info 2018-12-13 16:37:54 Succesfully configured 0x00158d0001cc9439 0x00158d0001cc9439
zigbee2mqtt:debug 2018-12-13 16:37:54 Received zigbee message of type 'devChange' with data '{"cid":"ssIasZone","data":{"zoneState":1,"zoneStatus":32,"iasCieAddr":"0x00124b0018ed35a7","zoneId":23}}' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:warn 2018-12-13 16:37:54 No converter available for 'ZPIR-8000' with cid 'ssIasZone', type 'devChange' and data '{"cid":"ssIasZone","data":{"zoneState":1,"zoneStatus":32,"iasCieAddr":"0x00124b0018ed35a7","zoneId":23}}'
zigbee2mqtt:warn 2018-12-13 16:37:54 Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
zigbee2mqtt:debug 2018-12-13 16:37:55 Received zigbee message of type 'devChange' with data '{"cid":"ssIasZone","data":{"zoneState":1,"zoneStatus":32,"iasCieAddr":"0x00124b0018ed35a7","zoneId":23}}' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:warn 2018-12-13 16:37:55 No converter available for 'ZPIR-8000' with cid 'ssIasZone', type 'devChange' and data '{"cid":"ssIasZone","data":{"zoneState":1,"zoneStatus":32,"iasCieAddr":"0x00124b0018ed35a7","zoneId":23}}'
zigbee2mqtt:warn 2018-12-13 16:37:55 Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
zigbee2mqtt:debug 2018-12-13 16:37:56 Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":34}' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:warn 2018-12-13 16:37:56 No converter available for 'ZPIR-8000' with cid 'ssIasZone', type 'statusChange' and data '{"cid":"ssIasZone","zoneStatus":34}'
zigbee2mqtt:warn 2018-12-13 16:37:56 Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
From: Koen Kanters <notifications@github.com>
Sent: 12 December 2018 11:03
To: Koenkk/zigbee2mqtt <zigbee2mqtt@noreply.github.com>
Cc: arcsyst <git-hub@TheITboat.co.uk>; Author <author@noreply.github.com>
Subject: Re: [Koenkk/zigbee2mqtt] Trust ZCTS-808 / ZPIR-8000 (#677)
Can you try adding this to devices.js:
{
zigbeeModel: ['VMS_ADUROLIGHT'],
model: 'ZPIR-8000',
vendor: 'Trust',
description: 'Motion Sensor',
supports: 'occupancy',
fromZigbee: [ ],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
},
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#677 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFJnVIkUNA_YY41vDAwlgQeK7fzgxj7yks5u4OJNgaJpZM4ZKRPm>.
|
Awhile ago I've also tried to add this sensor, and am giving it a shot once again.
If I add gz.generic_occupancy to fromZigbee, I get a ' failed to configure' error from Zigbee2mqtt. The device does seem to be connected as the LED on the device is periodically flashing. Is there any way to have it send a dump or something? /Edit I reckon I should add a function to fromZigbee.js that catches all information, but I am running zigbee2mqtt through the hass.io package. I suppose there are two things I could do:
Option 1 doesn't have my preference since the current solution to edit devices.js is already a bit iffy (could conflict with updates), but Option 2 might not work? I assume the cid and type are set by your suggested fix, would this in theory work with every new device? |
Looks good, this should be it: {
zigbeeModel: ['VMS_ADUROLIGHT'],
model: 'ZPIR-8000',
vendor: 'Trust',
description: 'Motion Sensor',
supports: 'occupancy',
fromZigbee: [fz.ias_zone_motion_dev_change, fz.ias_zone_motion_status_change],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
}, Make sure you have the |
Thanks, it seems to call the function, but something is still wrong:
Perhaps the cid should be a property of the message instead of a key in the data? I can't find a comparable example in devices.js to copy this from. Also, are those values like the zoneid just placeholders for initial setup? |
Thanks Koen that seems to work fine for the PIR, I also gained an insight into the bit functions of the zoneStatus value. With that I have modified your code for the Trust ZCTS-808 window contact as below, maybe you could review?
I still get these log messages for the PIR and door contact though it doesn’t seem to affect anything:
zigbee2mqtt:error 2018-12-14 10:40:55 Failed to configure Trust_Contact_1 0x00158d000202bb30
zigbee2mqtt:error 2018-12-14 10:40:55 Failed to configure Trust_PIR_1 0x00158d0001cc9439
Devices.js:
{
zigbeeModel: ['CSW_ADUROLIGHT'],
model: 'ZCTS-808',
vendor: 'Trust',
description: 'Door & Window Contact',
supports: 'contact',
fromZigbee: [fz.ias_contact_dev_change, fz.ias_contact_status_change],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
},
fromZigbee.js:
ias_contact_dev_change: {
cid: 'ssIasZone',
type: 'devChange',
convert: (model, msg, publish, options) => {
if (msg.data.data.zoneType === 0x000D) { // type 0x000D = motion sensor
const zoneStatus = msg.data.data.zoneStatus;
return {
contact: (zoneStatus & 1) == 0, // Bit 1 = Alarm 2: Presence Indication
// tamper: (zoneStatus & 1<<2) > 0, // Bit 2 = Tamper status
// battery_low: (zoneStatus & 1<<3) > 0, // Bit 3 = Battery LOW indicator (trips around 2.4V)
};
}
},
},
ias_contact_status_change: {
cid: 'ssIasZone',
type: 'statusChange',
convert: (model, msg, publish, options) => {
const zoneStatus = msg.data.zoneStatus;
return {
contact: (zoneStatus & 1) == 0, // Bit 1 = Alarm 2: Presence Indication
// tamper: (zoneStatus & 1<<2) > 0, // Bit 2 = Tamper status
// battery_low: (zoneStatus & 1<<3) > 0, // Bit 3 = Battery LOW indicator (trips around 2.4V)
};
},
},
Regards
Brian Clarke.
From: Koen Kanters <notifications@github.com>
Sent: 14 December 2018 07:06
To: Koenkk/zigbee2mqtt <zigbee2mqtt@noreply.github.com>
Cc: arcsyst <git-hub@TheITboat.co.uk>; Author <author@noreply.github.com>
Subject: Re: [Koenkk/zigbee2mqtt] Trust ZCTS-808 / ZPIR-8000 (#677)
Looks good, this should be it:
{
zigbeeModel: ['VMS_ADUROLIGHT'],
model: 'ZPIR-8000',
vendor: 'Trust',
description: 'Motion Sensor',
supports: 'occupancy',
fromZigbee: [fz.ias_zone_motion_dev_change, fz.ias_zone_motion_status_change],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
},
Make sure you have the ias_zone_motion_dev_change and ias_zone_motion_status_change in fromZigbee.js (they have been added quite recently: https://github.com/Koenkk/zigbee-shepherd-converters/blob/master/converters/fromZigbee.js#L1019)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#677 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFJnVP0P_ZQj0JaVPz2t3A07zrAgO6vBks5u403fgaJpZM4ZKRPm>.
|
@ekaats please update to the latest dev branch. |
@arcsyst how did the no converter available message look like, I think we can reuse https://github.com/Koenkk/zigbee-shepherd-converters/blob/master/converters/fromZigbee.js#L988 |
Thanks, that seems to do the job.
occupancy was false before I triggered the sensor, so the sensor relays information just fine. However, the error is also still popping up in the logs:
|
The failed to configure happen because the device is probably sleeping (and zigbee2mqtt tries to configure on every startup, you can ignore this). |
Contact Closed: Contact Opened: I think we need : I have tried reducing the battery voltage to the point of failure, there doesn't appear to be any change in the status so I guess there's no battery info. |
Can you check if everything work in the latest: https://github.com/Koenkk/zigbee-shepherd-converters ? |
Also supported in the dev branch now. |
It works perfectly for me. In Home Assistant it is detected as a binary sensor that resets to 'clear' after not detecting movement for about 15 seconds. No mention of any other settings in the manual so I suppose it is fully functional right now. Thanks! |
Thanks, works for me too, just get: But I guess we can ignore these. |
Ok, great :) |
I'm trying to get the two above devices to work without success. I have an Aqara temp/humidity sensor which works fine. Bothe the trust devices seem to pair correctly but never generate any 'events' when operated. Viewing the log in debug shows:
zigbee2mqtt:debug 2018-12-9 18:50:28 Received zigbee message of type 'devInterview' with data '"0x00158d0001cc9439"'
zigbee2mqtt:debug 2018-12-9 18:50:28 Received zigbee message of type 'devIncoming' with data '"0x00158d0001cc9439"' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
zigbee2mqtt:info 2018-12-9 18:50:28 Device incoming...
zigbee2mqtt:info 2018-12-9 18:50:28 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
zigbee2mqtt:debug 2018-12-9 18:50:28 Received zigbee message of type 'devStatus' with data '"online"' of device 'VMS_ADUROLIGHT' (0x00158d0001cc9439)
then nothing.
Any help appreciated.
The text was updated successfully, but these errors were encountered: