This is the first lot of things I'm trying to add - will also need to add Hive plugs, thermostat and other zigbee devices.
I get this message in my logs on startup (I added it to devices.js, think this part is ok):
2018-6-23 14:00:13 INFO 0x00124b000fa0779e (0x00124b000fa0779e): MOT003 - Hive Hive Motion Sensor (EndDevice)
I have this in the devices.js:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [fz.hive_ias, fz.hive_occupancy, fz.hive_illum, fz.hive_temp],
toZigbee: [],
},
and here are the entries in fromZigbee.js:
hive_occupancy: {
cid: 'msOccupancySensing',
type: 'attReport',
convert: (model, msg, publish, options) => {
console.log(msg);
},
},
hive_illum: {
cid: 'msIlluminanceMeasurement',
type: 'attReport',
convert: (model, msg, publish, options) => {
console.log(msg);
},
},
hive_temp: {
cid: 'msTemperatureMeasurement',
type: 'attReport',
convert: (model, msg, publish, options) => {
console.log(msg);
},
},
hive_ias: {
cid: 'ssIasZone',
type: 'statusChange',
convert: (model, msg, publish, options) => {
return {motion: msg.data.zoneStatus === 1};
},
},
Thing is that I don't get any messages in the logs or over MQTT - here is the entry in database.db:
{
"id":2,
"type":"EndDevice",
"ieeeAddr":"0x00124b000fa0779e",
"nwkAddr":39651,
"manufId":4153,
"manufName":"HiveHome.com",
"powerSource":"Battery",
"modelId":"MOT003",
"epList":[
6
],
"status":"online",
"joinTime":1529757538,
"endpoints":{
"6":{
"profId":260,
"epId":6,
"devId":1026,
"inClusterList":[
0,
1,
3,
32,
1024,
1026,
1030,
1280
],
"outClusterList":[
25
],
"clusters":{
"genBasic":{
"dir":{
"value":1
},
"attrs":{
"zclVersion":1,
"appVersion":4,
"stackVersion":38,
"hwVersion":0,
"manufacturerName":"HiveHome.com",
"modelId":"MOT003",
"dateCode":"20170809",
"powerSource":3,
"appProfileVersion":16908544,
"locationDesc":"",
"physicalEnv":0,
"deviceEnabled":1
}
},
"genPowerCfg":{
"dir":{
"value":1
},
"attrs":{
"batteryVoltage":30,
"batteryPercentageRemaining":181,
"batteryManufacturer":"CR123A",
"batterySize":2,
"batteryAHrRating":155,
"batteryQuantity":1,
"batteryRatedVoltage":30,
"batteryVoltMinThres":25
}
},
"genIdentify":{
"dir":{
"value":1
},
"attrs":{
}
},
"genOta":{
"dir":{
"value":2
},
"attrs":{
}
},
"genPollCtrl":{
"dir":{
"value":1
},
"attrs":{
}
},
"msIlluminanceMeasurement":{
"dir":{
"value":1
},
"attrs":{
"measuredValue":23538,
"minMeasuredValue":65535,
"maxMeasuredValue":65535,
"tolerance":65535,
"lightSensorType":0
}
},
"msTemperatureMeasurement":{
"dir":{
"value":1
},
"attrs":{
"measuredValue":2675,
"minMeasuredValue":-2500,
"maxMeasuredValue":8500,
"tolerance":50
}
},
"msOccupancySensing":{
"dir":{
"value":1
},
"attrs":{
"occupancy":1,
"occupancySensorType":0,
"pirOToUDelay":30,
"pirUToODelay":1,
"pirUToOThreshold":2
}
},
"ssIasZone":{
"dir":{
"value":1
},
"attrs":{
"zoneState":0,
"zoneType":13,
"zoneStatus":1,
"iasCieAddr":"0x0000000000000000",
"zoneId":255
}
}
}
}
},
"_id":"ZSCUNpjs70nw1k5V"
}
am I missing something? The device _should_ report battery, illumaninance, motion and tempreature - but I never get anything out of it?
Looks like there's something up at part 2 of the supporting new devices tutorial - before adding it to devices.js I get the following in the logs:
2018-6-23 14:46:49 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
2018-6-23 14:46:49 WARN Device with modelID 'MOT003' is not supported.
2018-6-23 14:46:49 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices
I then add this to devices.js:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
},
but I never get any of the messages like this:
WARN No converter available
We probably need to bind it.
Go to zigbee2mqtt directory:
cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b hive_motion
cd zigbee-shepherd-converters
npm install
Now start zigbee2mqtt and trigger events on the motion sensor, do you see any WARN No converter available. ?
I'm running with docker and have a volume mapped there:
- ./zigbee_conv:/app/node_modules/zigbee-shepherd-converters/
that's where I was adding it to devices.js and fromZigbee.js
Just re-did it, still not seeing any, I have 2 hive bulbs in as well (to test) and changed their descriptors:
2018-6-23 19:09:24 INFO hallway_hive_motion_mqtt (0x00124b000fa0779e): MOT003 - Hive Hive Motion Sensor (EndDevice)
2018-6-23 19:09:24 INFO hallway_light (0x00158d00016766fc): HALIGHTDIMWWE27 - Hive Active light dimmable - I WIZ ERE (Router)
2018-6-23 19:09:24 INFO stair_light (0x00158d000166bcf7): HALIGHTDIMWWE27 - Hive Active light dimmable - I WIZ ERE (Router)
so my docker volume is definately hitting the right place (I added 'I WIZ ERE' to the descriptors)
Still not seeing anything in the logs when I trigger motion
I'm now trying it with your commit (missed that lol)
I now get
2018-06-23T19:16:21.810Z - error: Failed to configure 0x00124b000fa0779e
(0x00124b000fa0779e is the motion sensor) - this appears right after 'device is incoming'
Just as I started to reset and repair it I got this message:
2018-06-23T19:18:19.081Z - warn: Message without device!
so that's possibly done the trick - will reset and repair and let you know
after reset/repairing a couple of times - still not seeing any messages in reponse to stimulii
one thing to mention is that it keeps attempting to pair (on every restart) - not sure if this is an acceptable behaviour
Just to ensure we're getting all the info in here:
2018-6-23 19:42:04 INFO Starting zigbee2mqtt version 0.0.0 (commit #01a26ad)
2018-6-23 19:42:04 INFO Starting zigbee-shepherd
2018-6-23 19:42:04 INFO zigbee-shepherd started
2018-6-23 19:42:04 INFO Currently 3 devices are joined:
2018-6-23 19:42:04 INFO hallway_light (0x00158d00016766fc): HALIGHTDIMWWE27 - Hive Active light dimmable (Router)
2018-6-23 19:42:04 INFO stair_light (0x00158d000166bcf7): HALIGHTDIMWWE27 - Hive Active light dimmable (Router)
2018-6-23 19:42:04 INFO hallway_hive_motion_mqtt (0x00124b000fa0779e): MOT003 - Hive Hive Motion Sensor (EndDevice)
2018-6-23 19:42:04 WARN `permit_join` set to `true` in configuration.yaml.
2018-6-23 19:42:04 WARN Allowing new devices to join.
2018-6-23 19:42:04 WARN Set `permit_join` to `false` once you joined all devices.
2018-6-23 19:42:04 INFO Zigbee: allowing new devices to join.
2018-6-23 19:42:04 INFO Connecting to MQTT server at mqtt://192.168.0.8
2018-6-23 19:42:04 INFO zigbee-shepherd ready
spinlock: false []
2018-6-23 19:42:04 INFO Connected to MQTT server
2018-6-23 19:42:04 INFO MQTT publish, topic: 'zb/bridge/state', payload: 'online'
2018-6-23 19:42:04 INFO MQTT publish, topic: 'homeassistant/light/0x00158d00016766fc/light/config', payload: '{"brightness":true,"platform":"mqtt_json","command_topic":"zb/hallway_light/set","state_topic":"zb/hallway_light","availability_topic":"zb/bridge/state","name":"hallway_light","unique_id":"0x00158d00016766fc_light_zb"}'
2018-6-23 19:42:04 INFO MQTT publish, topic: 'homeassistant/light/0x00158d000166bcf7/light/config', payload: '{"brightness":true,"platform":"mqtt_json","command_topic":"zb/stair_light/set","state_topic":"zb/stair_light","availability_topic":"zb/bridge/state","name":"stair_light","unique_id":"0x00158d000166bcf7_light_zb"}'
spinlock: true []
2018-6-23 19:42:05 INFO Connecting with device...
2018-6-23 19:42:05 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:05 INFO Connecting with device...
2018-6-23 19:42:05 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:12 INFO Connecting with device...
2018-6-23 19:42:12 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:13 INFO Connecting with device...
2018-6-23 19:42:13 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:14 INFO Connecting with device...
2018-6-23 19:42:14 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:15 INFO Connecting with device...
2018-6-23 19:42:15 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:16 INFO Connecting with device...
2018-6-23 19:42:16 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:16 INFO Device incoming...
2018-6-23 19:42:16 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
2018-6-23 19:42:16 INFO Connecting with device...
2018-6-23 19:42:16 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:16 INFO Connecting with device...
2018-6-23 19:42:16 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:16 INFO Connecting with device...
2018-6-23 19:42:16 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:18 INFO Connecting with device...
2018-6-23 19:42:18 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:18 INFO Connecting with device...
2018-6-23 19:42:18 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:18 INFO Connecting with device...
2018-6-23 19:42:18 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:18 INFO Connecting with device...
2018-6-23 19:42:18 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}'
2018-6-23 19:42:18 INFO Device incoming...
2018-6-23 19:42:18 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
2018-6-23 19:42:54 INFO Succesfully configured 0x00124b000fa0779e
Other than any other pairing attempts and weird 'spinlock' messages, the logs are silent(ish) after this point)
Used the Debug=* method - now logs are v. noisy but I can't pinpoint anything for this device
I think the below is pertinent to this device though:
Sat, 23 Jun 2018 20:20:17 GMT cc-znp:AREQ <-- ZDO:tcDeviceInd, { nwkaddr: 54397, extaddr: '0x00124b000fa0779e', parentaddr: 16507 }
Sat, 23 Jun 2018 20:20:17 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:tcDeviceInd
Sat, 23 Jun 2018 20:20:17 GMT cc-znp:AREQ <-- ZDO:tcDeviceInd, { nwkaddr: 54397, extaddr: '0x00124b000fa0779e', parentaddr: 16507 }
Sat, 23 Jun 2018 20:20:17 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:tcDeviceInd
Sat, 23 Jun 2018 20:20:17 GMT cc-znp:AREQ <-- ZDO:endDeviceAnnceInd, { srcaddr: 54397, nwkaddr: 54397, ieeeaddr: '0x00124b000fa0779e', capabilities: 128 }
spinlock: false []
Sat, 23 Jun 2018 20:20:17 GMT zigbee-shepherd:request REQ --> ZDO:nodeDescReq
Sat, 23 Jun 2018 20:20:17 GMT cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 54397, nwkaddrofinterest: 54397 }
Sat, 23 Jun 2018 20:20:17 GMT serialport write 9 bytes of data
Sat, 23 Jun 2018 20:20:17 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:endDeviceAnnceInd
Sat, 23 Jun 2018 20:20:17 GMT cc-znp:SRSP <-- ZDO:nodeDescReq, { status: 0 }
Sat, 23 Jun 2018 20:20:27 GMT zigbee-shepherd:request REQ --> ZDO:nodeDescReq
Sat, 23 Jun 2018 20:20:27 GMT cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 54397, nwkaddrofinterest: 54397 }
Sat, 23 Jun 2018 20:20:27 GMT serialport write 9 bytes of data
Sat, 23 Jun 2018 20:20:27 GMT cc-znp:SRSP <-- ZDO:nodeDescReq, { status: 0 }
2018-6-23 21:20:37 ERROR Cannot get the Node Descriptor of the Device: 0x00124b000fa0779e (Error: Timed out after 10000 ms)
yeah - the above messages are produced in response to removing and re-adding the battery
Updated the code, can you try this again?
cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b hive_motion
cd zigbee-shepherd-converters
npm install
Tried that, I did get this - but only because the device was sitting for a while (and woke up I reckon):
Sat, 23 Jun 2018 20:49:53 GMT cc-znp:AREQ <-- ZDO:endDeviceAnnceInd, { srcaddr: 11322, nwkaddr: 11322, ieeeaddr: '0x00124b000fa0779e', capabilities: 128 }
spinlock: false []
device already in network
Sat, 23 Jun 2018 20:49:53 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:endDeviceAnnceInd
Sat, 23 Jun 2018 20:49:53 GMT cc-znp:AREQ <-- ZDO:tcDeviceInd, { nwkaddr: 11322, extaddr: '0x00124b000fa0779e', parentaddr: 0 }
Sat, 23 Jun 2018 20:49:53 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:tcDeviceInd
It didn't report the 2nd or 3rd time I tried it (there's an LED on it for when it detects motion)
Don't know if it will help much but there are smartthings device handlers: https://community.smartthings.com/t/hive-motion-contact-sensors/57452 this doesn't work for motion with this version - but the orvibo one apparently does https://github.com/Kriskit/SmartThingsPublic/blob/master/devicetypes/kriskit/orvibo/orvibo-motion-sensor.groovy#L68
The orvibo DTH looks at IASzone 19?
Pulling the battery also produces this:
spinlock: false []
device already in network
Sat, 23 Jun 2018 20:54:54 GMT cc-znp:AREQ <-- ZDO:endDeviceAnnceInd, { srcaddr: 11322, nwkaddr: 11322, ieeeaddr: '0x00124b000fa0779e', capabilities: 128 }
Sat, 23 Jun 2018 20:54:54 GMT zigbee-shepherd:msgHdlr IND <-- ZDO:endDeviceAnnceInd
Did it also confgure correctly with my new change? e.g. 2018-6-23 19:42:54 INFO Succesfully configured 0x00124b000fa0779e
๐ getting something now, needed to completely strip it out completely in order to get it (didn't get a configured correctly/incorrectly message)
2018-06-23T21:40:04.274Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":0}}
2018-06-23T21:40:04.275Z - warn: No converter available for 'MOT003' with cid 'msOccupancySensing' and type 'attReport'
2018-06-23T21:40:04.275Z - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-06-23T21:40:04.277Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":0}}
2018-06-23T21:40:04.279Z - warn: No converter available for 'MOT003' with cid 'msOccupancySensing' and type 'devChange'
2018-06-23T21:40:04.282Z - warn: Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
However - even with debug=* as an environement variable - I'm still not seeing anything happening (attaching to the docker container or in the logs - but is that the right behaviour?) I'll add a converter and see what happens
Yes this looks good! How does your configure() now look?
I get this now:
2018-06-23T21:54:15.409Z - info: Succesfully configured 0x00124b000fa0779e
2018-06-23T21:54:15.793Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
but no _actual_ reaction to the device LED telling me that it's sensing motion
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [fz.hive_occupancy],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const cfgRptRec = {
direction: 0, attrId: 0, dataType: 24, minRepIntval: 0, maxRepIntval: 1000, repChange: 0,
};
const device = shepherd.find(ieeeAddr, 6);
if (device) {
device.bind('msOccupancySensing', coordinator, (error) => {
if (error) {
callback(error);
} else {
device.foundation('msOccupancySensing', 'configReport', [cfgRptRec]).then((rsp) => {
callback(rsp[0].status === 0);
});
}
});
}
},
},
But does it send
2018-06-23T21:54:15.793Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
when you trigger the sensor?
Not when I trigger the sensor - that happens when the configure happens
By attaching to the docker container I get logs like this for other devices:
2018-6-23 23:09:10 DEBUG Check online 0x00158d00016766fc
Sat, 23 Jun 2018 22:09:10 GMT zigbee-shepherd:request REQ --> ZDO:nodeDescReq
Sat, 23 Jun 2018 22:09:10 GMT cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 16507, nwkaddrofinterest: 16507 }
Sat, 23 Jun 2018 22:09:10 GMT serialport write 9 bytes of data
But nothing for this device (other than when it wakes)
Could you try to change the maxRepIntval to 5?
what about repChange? It's 0 atm which says false to me?
Yes, you could also try with repChange 1
Hmm - still don't seem to be getting anything - the sensor was working with a Hive hub ( and has previously worked with the smartthings hub) - I'm a bit lost with the zigbee stuff but is the configure step subscribing to the IAS alarms? (based on reading that looks liek it's how it this model works)
IT's quite weird - woke up to logs like this:
2018-06-24T08:44:47.396Z - debug: Check online 0x00158d00016766fc
2018-06-24T08:44:47.398Z - debug: Check online 0x00158d000166bcf7
2018-06-24T08:44:48.883Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:44:48.883Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:44:54.881Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:44:54.882Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:00.877Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:00.878Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:06.876Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:06.877Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:12.874Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:12.874Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:18.870Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:18.870Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:24.986Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:24.986Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:30.985Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:30.986Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:36.976Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:36.979Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:42.975Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:42.976Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:47.403Z - debug: Check online 0x00158d00016766fc
2018-06-24T08:45:47.405Z - debug: Check online 0x00158d000166bcf7
2018-06-24T08:45:48.974Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:48.974Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:45:54.967Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:45:54.968Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:00.978Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:00.979Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:06.974Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:06.974Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:12.958Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:12.959Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:18.953Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:18.954Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:24.950Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:24.951Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:30.948Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:30.948Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
2018-06-24T08:46:36.965Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T08:46:36.966Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
The 'check online' entries are for the bulbs, but the other entries aren't in response to motion (motion sensor is sitting face down on a table atm)
Yes, it's just reporting the occupancy on a 6 seconds interval.
I the configure, can you try replacing msOccupancySensing with ssIasZone.
HM.....this is interesting - pulling the battery gives
2018-06-24T09:04:49.520Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":0}}
2018-06-24T09:04:49.521Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":0}}'
until motion is triggered - might it need to write a 0 after 30 seconds or reset the IASzonealarm at some point?
Chaning it to ssIasZone doesn't seem to have made much of a difference to it (ie. I don't get the no-converter message fro ssIASzone) - would this require re-pairing?
Actually - as an update - the IAszone change (after re-pairing) removes the /6 seconds report - without replacing ti with anything at all
So to clarify:
Sorry - when battery is pulled/it's a clean reset/repair (no motion has been detected since reset/repair) the following messages are received as per the maxreinterval (roughly):
2018-06-24T09:46:37.328Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":0}}
2018-06-24T09:46:37.329Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":0}}'
Then, if motion is detected, it switches over to reporting this (again as per the maxrepinterval):
2018-06-24T09:48:49.484Z - debug: Recieved zigbee message with data {"cid":"msOccupancySensing","data":{"occupancy":1}}
2018-06-24T09:48:49.485Z - info: MQTT publish, topic: 'zb/hallway_hive_motion_mqtt', payload: '{"cid":"msOccupancySensing","data":{"occupancy":1}}'
it does this (as far as I can tell - based on it doing that all night) until infinity - it's like the sensor itself isn't clearing the motion detected flag, might this me needed from the software side?
*This is with the msOccupancy configuration
Here is a diff (I just added the msTemperatureMeasurement to see if that'd give us additional logging):
diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js
index cc61c5a..57b1989 100644
--- a/converters/fromZigbee.js
+++ b/converters/fromZigbee.js
@@ -78,6 +78,21 @@ const ictcg1 = (model, msg, publish, options, action) => {
const converters = {
+ hive_occupancy: {
+ cid: 'msOccupancySensing',
+ type: 'devChange',
+ convert: (model, msg, publish, options) => {
+ return msg.data;
+ },
+ },
+
+ hive_occ: {
+ cid: 'msOccupancySensing',
+ type: 'attReport',
+ convert: (model, msg, publish, options) => {
+ return msg.data;
+ },
+ },
xiaomi_battery_3v: {
cid: 'genBasic',
type: 'attReport',
diff --git a/devices.js b/devices.js
index 095c7dd..60c1f63 100644
--- a/devices.js
+++ b/devices.js
@@ -539,11 +539,11 @@ const devices = [
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
- fromZigbee: [],
+ fromZigbee: [fz.hive_occupancy, fz.hive_occ],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const cfgRptRec = {
- direction: 0, attrId: 0, dataType: 24, minRepIntval: 0, maxRepIntval: 1000, repChange: 0,
+ direction: 0, attrId: 0, dataType: 24, minRepIntval: 0, maxRepIntval: 10, repChange: 0,
};
const device = shepherd.find(ieeeAddr, 6);
@@ -557,6 +557,16 @@ const devices = [
});
}
});
+
+ device.bind('msTemperatureMeasurement', coordinator, (error) => {
+ if (error) {
+ callback(error);
+ } else {
+ device.foundation('msTemperatureMeasurement', 'configReport', [cfgRptRec]).then((rsp) => {
+ callback(rsp[0].status === 0);
+ });
+ }
+ });
}
},
},
Adding the msTemp part doesn't seem to have done anything - still getting the msocc message every interval (0 atm because it's been face down since I did the reset)
Don't think this is within my abilities (this is my first foray into zigbee outside of hive/tradfri/smarttthings hubs) - I'm going to move on from trying to get these motion sensors to work (for the moment), might return after I've added some other devices (hopefully will pick some stuff up as I go)
Ok, no problem, lets keep this issue open for future reference.
Just a slight furtherance - I paired a smartthings motion sensor and the dB entry looked very, very similar
https://stackoverflow.com/questions/39599822/ias-zone-device-enroll-steps
Looks like the issue might be the cie address being 0x0..0 - will check this out tonight
That looks promising, please let me know if you need more help.
Will do - ended up with some other issues last night (shepherd wouldn't start), interestingly - my IKEA and hive lights aren't behaving now, will nuke and re-do tonight
If I read you response from #153 correctly, this didn't work?
Yeah, configure is as follows(includes writing the CIE address):
const cfgRptRec = {
direction: 0, attrId: 0, dataType: 32, minRepIntval: 10, maxRepIntval: 20, repChange: 0,
};
const cfgRptRec2 = {
direction: 0, attrId: 0, dataType: 33, minRepIntval: 10, maxRepIntval: 20, repChange: 0,
};
const device = shepherd.find(ieeeAddr, 6);
if (device) {
device.write('ssIasZone' , 'iasCieAddr' , coordinator.device.getIeeeAddr(), (err) => {
console.log(err);
});
device.bind('msOccupancySensing', coordinator, (error) => {
if (error) {
callback(error);
} else {
device.foundation('msOccupancySensing', 'configReport', [cfgRptRec]).then((rsp) => {
callback(rsp[0].status === 0);
});
}
});
device.bind('msTemperatureMeasurement', coordinator, (error) => {
if (error) {
callback(error);
} else {
device.foundation('msTemperatureMeasurement', 'configReport', [cfgRptRec2]).then((rsp) => {
callback(rsp[0].status === 0);
});
}
});
But we never receive an IAS alarm packet (as far as I can tell)
it's like we need to clear the alarm | reset the attrib ourself - again, if I pull the batter it starts up by reporting no motion (until it trips, then it reports motion forever)
Still can't get Temp. readings though...
Makes me wonder - is it possible to bind 2 clusters?
I've found some interesting code example here https://github.com/zigbeer/ziee/wiki Initialize a 'ssIasZone' cluster
After the cieeadress write we need to send the enroll request.
tried this - no effect what so ever:
device.foundation('ssIasZone', 'enrollReq', [ ], function (err, rsp) { console.log(err); console.log(rsp); });
I'm not sure what to do with this here ๐คทโโ๏ธ
The flow is as follows
iasCieAddrLet's first check if the enroll request is send from the motion sensor. Can you try with:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
console.log('Configuring Hive motion sensor after 10 seconds');
setTimeout(() => {
const device = shepherd.find(ieeeAddr, 6);
if (device) {
device.write('ssIasZone' , 'iasCieAddr' , coordinator.device.getIeeeAddr(), (err) => {
if (err) {
console.log('Sucesfully wrote iasCieAddr, with DEBUG=* you should now see an enroll request');
} else {
console.log('Failed to write iasCieAddr')
}
});
}
}, 10 * 1000);
},
},
and provide the log when running with DEBUG=* npm start.
Thanks, I'll give all this a try tonight and let you know what I get - I'm still having issues with my cc2531 going into a bad state (put in a new issue with this (#161), going to add suport for Nanoleaf bulbs and hive plugs this weekend (assuming they go relatively easily)
Haven't managed to test this tonight, will tomorrow ๐
PR will be incoming for Hive plug and Nanoleaf bulb as well
Howdy,
Got the following log:
2018-6-30 09:52:14 INFO MQTT publish, topic: 'zb/bridge/log', payload: '{"type":"device_connected","message":"0x00124b000fa0779e"}'
Configuring Hive motion sensor after 10 seconds
2018-6-30 09:52:14 DEBUG Recieved zigbee message with data "online"
zigbee-shepherd:request REQ --> AF:dataRequest, transId: 146 +10s
cc-znp:SREQ --> AF:dataRequest, { dstaddr: 11918, destendpoint: 6, srcendpoint: 1, clusterid: 1280, transid: 146, options: 48, radius: 30, len: 14, data: <Buffer 00 92 02 10 00 f0 da eb bd 14 00 4b 12 00> } +1ms
serialport write 29 bytes of data +1ms
cc-znp:SRSP <-- AF:dataRequest, { status: 0 } +11ms
zigbee-shepherd:request RSP <-- AF:dataRequest, status: 0 +1ms
cc-znp:AREQ <-- AF:dataConfirm, { status: 0, endpoint: 1, transid: 146 } +211ms
zigbee-shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 146 +0ms
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 1280, srcaddr: 11918, srcendpoint: 6, dstendpoint: 1, wasbroadcast: 0, linkquality: 110, securityuse: 0, timestamp: 11489702, transseqnumber: 0, len: 4, data: <Buffer 18 92 04 00> } +9ms
zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +0ms
zigbee-shepherd:request REQ --> AF:dataRequest, transId: 147 +1ms
cc-znp:SREQ --> AF:dataRequest, { dstaddr: 11918, destendpoint: 6, srcendpoint: 1, clusterid: 1280, transid: 147, options: 48, radius: 30, len: 6, data: <Buffer 00 93 0c 00 00 f0> } +1ms
serialport write 21 bytes of data +0ms
Failed to write iasCieAddr
cc-znp:SRSP <-- AF:dataRequest, { status: 0 } +11ms
zigbee-shepherd:request RSP <-- AF:dataRequest, status: 0 +0ms
cc-znp:AREQ <-- AF:dataConfirm, { status: 0, endpoint: 1, transid: 147 } +119ms
zigbee-shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 147 +1ms
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 1280, srcaddr: 11918, srcendpoint: 6, dstendpoint: 1, wasbroadcast: 0, linkquality: 110, securityuse: 0, timestamp: 11490181, transseqnumber: 0, len: 19, data: <Buffer 18 93 0d 01 00 00 30 01 00 31 02 00 19 10 00 f0 11 00 20> } +22ms
zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +3ms
zigbee-shepherd:request REQ --> AF:dataRequest, transId: 148 +0ms
cc-znp:SREQ --> AF:dataRequest, { dstaddr: 11918, destendpoint: 6, srcendpoint: 1, clusterid: 1280, transid: 148, options: 48, radius: 30, len: 13, data: <Buffer 00 94 00 00 00 01 00 02 00 10 00 11 00> } +1ms
serialport write 28 bytes of data +0ms
cc-znp:SRSP <-- AF:dataRequest, { status: 0 } +11ms
zigbee-shepherd:request RSP <-- AF:dataRequest, status: 0 +0ms
cc-znp:AREQ <-- AF:dataConfirm, { status: 0, endpoint: 1, transid: 148 } +100ms
zigbee-shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 148 +0ms
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 1280, srcaddr: 11918, srcendpoint: 6, dstendpoint: 1, wasbroadcast: 0, linkquality: 110, securityuse: 0, timestamp: 11490581, transseqnumber: 0, len: 37, data: <Buffer 18 94 01 00 00 00 30 00 01 00 00 31 0d 00 02 00 00 19 00 00 10 00 00 f0 da eb bd 14 00 4b 12 00 11 00 00 20 ff> } +14ms
zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +5ms
2018-6-30 09:52:25 DEBUG Recieved zigbee message with data {"cid":"ssIasZone","data":{"iasCieAddr":"0x00124b0014bdebda"}}
2018-6-30 09:52:25 WARN No converter available for 'MOT003' with cid 'ssIasZone' and type 'devChange'
2018-6-30 09:52:25 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
However - I notice something in the code you posted - are the console.log statements the right way round? (err will evaluate to true if it's got a value - so if there is and error - and if(true) - print out success else print out fail is the wrong way round then?)
Yes the if is indeed wrong.
What is logged after no converter available? We need to check if the enrollRequest is send.
Here's a pastebin - I can't ID an enrollRequest: https://pastebin.com/r5AmZWNS (I'm trying again to try and ID it)
Can you try the following code:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
console.log('Configuring Hive motion sensor after 10 seconds');
setTimeout(() => {
const device = shepherd.find(ieeeAddr, 6);
if (device) {
device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), (err) => {
if (err) {
console.log('Failed to write iasCieAddr')
} else {
console.log('Sucesfully wrote iasCieAddr, with DEBUG=* you should now see an enroll request');
setTimeout(() => {
device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0x00, zoneid : 255}, (err) => {
if (err) {
console.log('Error on enrollRsp');
} else {
console.log('Sucesfully enrolled!!! :DDDDD');
}
});
}, 5000);
}
});
}
}, 10 * 1000);
},
},
Howdy,
I get the 'successfully enrolled' message in the logs - but motion doesn't trigger any messages
Here's another pastebin: https://pastebin.com/YkEMr3L9 - I'm not sure how to make sense of some of those messages - there seems to be a fair bit of traffic after that message (but motion doesn't trigger any later on)
The zoneState is still 0 which means that the device is not enrolled yet (should be 1).
Can you try with the following code: (also write zoneId now).
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
console.log('Configuring Hive motion sensor after 10 seconds');
setTimeout(() => {
const device = shepherd.find(ieeeAddr, 6);
const zoneid = 5;
if (device) {
device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), (err) => {
if (err) {
console.log('Failed to write iasCieAddr');
} else {
console.log('Sucesfully wrote iasCieAddr');
device.write('ssIasZone', 'zoneId', zoneid, (err) => {
if (err) {
console.log('failed to write zoneid');
} else {
console.log('wrote zone id :D');
setTimeout(() => {
device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0x00, zoneid: zoneid}, (err) => {
if (err) {
console.log('Error on enrollRsp');
} else {
console.log('Sucesfully enrolled!!! :DDDDD');
}
});
}, 3000);
}
});
}
});
}
}, 10 * 1000);
},
},
Howdy,
It failed to write the zoneId - here's a hastebin: https://hastebin.com/omukejoboj.hs
Did the same trying with a couple of different zoneid's - not sure where to go from here - guessing that this is writing in the write format? (zb data type 240)?
@matchett808 I've updated your comment to point to hastebin as it's more clean
I've found this Smartthings handler for the Hive motion sensor. That means that theoretically we should be able to support this.
Can you try with:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 6);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.report('msOccupancySensing', 'occupancy', 0, 600, null, cb),
(cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb),
(cb) => device.report('genPowerCfg', 'batteryVoltage', 10, 600, 1, cb),
(cb) => device.report('ssIasZone', 'zoneStatus', 0, 30, null, cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 1, zoneid: 23}, cb),
];
execute(device, actions, callback);
},
},
I'll do that tonight - unfortunately I've fell back into the issue where I can't control the devices (similar to #172 and #155) - still trying to chase down if I've got a hardware issue
I have a ST hub, I will also test that ST handler (there are a couple of versions of the motion sensor - and that DTH looks to be for V1) - I linked that DTH:
https://community.smartthings.com/t/hive-motion-contact-sensors/57452
This comment on that thread:
https://community.smartthings.com/t/hive-motion-contact-sensors/57452/26
discusses the difference between v1 and v2 - it's a v2 I've got (MOT003), which makes me realise something:
Don't know if it will help much but there are smartthings device handlers: https://community.smartthings.com/t/hive-motion-contact-sensors/57452 this doesn't work for motion with this version - but the orvibo one apparently does https://github.com/Kriskit/SmartThingsPublic/blob/master/devicetypes/kriskit/orvibo/orvibo-motion-sensor.groovy#L68
The orvibo DTH looks at IASzone 19?
Wich means your code:
{
zigbeeModel: ['MOT003'],
model: 'MOT003',
vendor: 'Hive',
description: 'Hive Motion Sensor',
supports: 'occupancy',
fromZigbee: [],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
console.log('Configuring Hive motion sensor after 10 seconds');
setTimeout(() => {
const device = shepherd.find(ieeeAddr, 6);
const zoneid = 5; // Wrong zone ID?
if (device) {
device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), (err) => {
if (err) {
console.log('Failed to write iasCieAddr');
} else {
console.log('Sucesfully wrote iasCieAddr');
device.write('ssIasZone', 'zoneId', zoneid, (err) => {
if (err) {
console.log('failed to write zoneid');
} else {
console.log('wrote zone id :D');
setTimeout(() => {
device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0x00, zoneid: zoneid}, (err) => {
if (err) {
console.log('Error on enrollRsp');
} else {
console.log('Sucesfully enrolled!!! :DDDDD');
}
});
}, 3000);
}
});
}
});
}
}, 10 * 1000);
},
},
Could be modified zoneid = 19 rather than zoneid = 5 ?
Also a note - on the link:
https://community.smartthings.com/t/hive-motion-contact-sensors/57452
I tested that DTH in October 2017, no changes since ๐
None of the above work - tried both the code you posted and the code I posted, each with different zoneids (5/19/23), none of them seem to have done much ๐คทโโ๏ธ
Scratch that, your code brings back temperature reporting - not saw battery (might not have ran for long enough) - but still no motion...
oh wait, got battery in logs - still can't get any motion
Can you provide the log?
Will do - been afk for a few days, everything is stable atm, looks like lots of restarts were causing my issues (touch wood)
I paired one of my other devices and had some issues getting it to add, turns out its been implemented recently through another name - any value in noting this on the wiki? ( Device is Netvox Z809AE3R, but I bought it uder the Swann one brand)
Just to note, have ordered a 2nd stick, don't want to keep doing dev like this on my production setup (as it was causing instability) - will revist this once the stick arrives
Just a side note, been trying to get the hive plug to pair unsuccessfully, looks like hive is on channel 25 (my stick is ch11) - will this be the reason this can't pair?
NVm - it just took a bit of pairing, but works ok in the end ๐
I think this (produced with debug on, on motion trigger):
serialport:poller received "readable" +10s
serialport:bindings read +10s
serialport:unixRead Starting read +10s
serialport:unixRead Finished read 16 bytes +0ms
serialport:main binding.read finished +10s
cc-znp Error: Unrecognized command
cc-znp at new ZpiObject (/home/iain/zigbee2mqtt/node_modules/cc-znp/lib/zpiObject.js:33:15)
cc-znp at CcZnp._parseMtIncomingData (/home/iain/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:325:18)
cc-znp at Unpi.parseMtIncomingData (/home/iain/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:92:18)
cc-znp at emitOne (events.js:116:13)
cc-znp at Unpi.emit (events.js:211:7)
cc-znp at Dissolve.<anonymous> (/home/iain/zigbee2mqtt/node_modules/unpi/index.js:107:14)
cc-znp at emitOne (events.js:116:13)
cc-znp at Dissolve.emit (events.js:211:7)
cc-znp at Dissolve.<anonymous> (/home/iain/zigbee2mqtt/node_modules/dissolve-chunks/index.js:73:29)
cc-znp at emitNone (events.js:106:13) +10s
is what we _didn't_/did want :)
However:
{"id":21,"type":"EndDevice","ieeeAddr":"0x00124b001181fb2f","nwkAddr":14699,"manufId":4153,"manufName":"HiveHome.com","powerSource":"Battery","modelId":"MOT003","epList":[6],"status":"offline","joinTime":null,"endpoints":{"6":{"profId":260,"epId":6,"devId":1026,"inClusterList":[0,1,3,32,1024,1026,1030,1280],"outClusterList":[25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"appVersion":4,"stackVersion":38,"hwVersion":0,"manufacturerName":"HiveHome.com","modelId":"MOT003","dateCode":"20180226","powerSource":3,"appProfileVersion":16908544,"locationDesc":"","physicalEnv":0,"deviceEnabled":1}},"genPowerCfg":{"dir":{"value":1},"attrs":{"batteryVoltage":31,"batteryPercentageRemaining":200,"batteryManufacturer":"CR123A","batterySize":2,"batteryAHrRating":155,"batteryQuantity":1,"batteryRatedVoltage":30,"batteryVoltMinThres":25}},"genIdentify":{"dir":{"value":1},"attrs":{"identifyTime":0,"identifyCommissionState":3}},"genOta":{"dir":{"value":2},"attrs":{}},"genPollCtrl":{"dir":{"value":1},"attrs":{"checkinInterval":1200,"longPollInterval":1200,"shortPollInterval":4,"fastPollTimeout":6,"checkinIntervalMin":120,"longPollIntervalMin":20,"fastPollTimeoutMax":120}},"msIlluminanceMeasurement":{"dir":{"value":1},"attrs":{"measuredValue":9032,"minMeasuredValue":65535,"maxMeasuredValue":65535,"tolerance":65535,"lightSensorType":0}},"msTemperatureMeasurement":{"dir":{"value":1},"attrs":{"measuredValue":2550,"minMeasuredValue":-2500,"maxMeasuredValue":8500,"tolerance":50}},"msOccupancySensing":{"dir":{"value":1},"attrs":{"occupancy":1,"occupancySensorType":0,"pirOToUDelay":30,"pirUToODelay":1,"pirUToOThreshold":2}},"ssIasZone":{"dir":{"value":1},"attrs":{"zoneState":0,"zoneType":13,"zoneStatus":1,"iasCieAddr":"0x00124b0014bdebda","zoneId":255}}}}},"_id":"XilVhees3UCaYNp8"}
this indicates that we successfully setup ias (zoneStatus 1, CieAddr is correct) - suppose zigbee-shepherd(?) will need something added?
Also getting battery, temp, and lux out of these sensors - so seem to be good value
Ok thats great! Are you comfortable with digging a little bit more in the cc-znp library? To find out what unrecognised command this is.
Eek, will do - certainly to get more info, still waiting on that other stick, trying to minimise development on my 'production' network lol
It was produced on motion (there was no subsequent errors when motion was retriggered within the timeout, only after - also no subsequent error indicating the clearance of the alarm, I assume this might have to be a setTimeout hack (with appropriate reporting etc)
All of the info to bind was included in the DB from the start:
DB:
"ssIasZone":{
"dir":{
"value":1
},
"attrs":{
"zoneState":0,
"zoneType":13,
"zoneStatus":1,
"iasCieAddr":"0x0000000000000000",
"zoneId":255
}
}
When my new stick comes I'll dig into it all a bit further and get it up and running - I reckon it might also be worth it to try and add some sort of auto bind (so as to not have to go through the whole process lol)
@tb-killa managed to get a Ias occupancy sensor working in: https://github.com/Koenkk/zigbee-shepherd-converters/pull/67.
Could you try if you can get the hive motion sensor working with the similar code?
hi @matchett808
Do you work on this problem actually ?
iยดm modify my code to get better results and would like to share this with you to hope you get your devices working.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Haven't managed to test this tonight, will tomorrow ๐
PR will be incoming for Hive plug and Nanoleaf bulb as well