Yep, confirmed works fine.
The motion sensor device seems a little more complicated. It looks like you have to derive whether or not it sees motion using the motionEnded
and motionStarted
branches. Here’s the JSON from one of my motion sensors:
{
"meta": {},
"links": {},
"linked": {},
"nodes": [
{
"id": "64059699-9a05-4f15-bcda-b4efa695985d",
"href": "https://api.prod.bgchprod.info:8443/omnia/nodes/64059699-9a05-4f15-bcda-b4efa695985d",
"links": {},
"name": "Old Shed",
"nodeType": "http://alertme.com/schema/json/node.class.motion.sensor.json#",
"parentNodeId": "8ad3072f-684c-433b-8e16-906c9a5c7495",
"lastSeen": 1473275339692,
"createdOn": 1468525694135,
"userId": "563aab21-92d0-494a-a7eb-413708ce7074",
"ownerId": "563aab21-92d0-494a-a7eb-413708ce7074",
"relationships": {
"boundNodes": []
},
"attributes": {
"nativeIdentifier": {
"reportedValue": "B133",
"displayValue": "B133",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"LQI": {
"reportedValue": 100,
"displayValue": 100,
"reportReceivedTime": 1473275339692,
"reportChangedTime": 1473205094508,
"readOnly": false
},
"batteryVoltage": {
"reportedValue": 2.9,
"displayValue": 2.9,
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473271129372,
"readOnly": false
},
"motionStarted": {
"reportedValue": "2016-09-07T19:04:21.760+0000",
"displayValue": "2016-09-07T19:04:21.760+0000",
"reportReceivedTime": 1473275062773,
"reportChangedTime": 1473275062773,
"readOnly": false
},
"nodeType": {
"reportedValue": "http://alertme.com/schema/json/node.class.motion.sensor.json#",
"displayValue": "http://alertme.com/schema/json/node.class.motion.sensor.json#",
"reportReceivedTime": 1473275339692,
"reportChangedTime": 1473205094508,
"readOnly": false
},
"powerSupply": {
"reportedValue": "BATTERY",
"displayValue": "BATTERY",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"manufacturer": {
"reportedValue": "AlertMe.com",
"displayValue": "AlertMe.com",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"RSSI": {
"reportedValue": -56,
"displayValue": -56,
"reportReceivedTime": 1473275339692,
"reportChangedTime": 1473275339692,
"readOnly": false
},
"macAddress": {
"reportedValue": "000D6F0005A54431",
"displayValue": "000D6F0005A54431",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"protocol": {
"reportedValue": "ZIGBEE",
"displayValue": "ZIGBEE",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"lastSeen": {
"reportedValue": "2016-09-07T18:18:47.954+0000",
"displayValue": "2016-09-07T18:18:47.954+0000",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473272425826,
"readOnly": false
},
"batteryState": {
"reportedValue": "NORMAL",
"displayValue": "NORMAL",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473271129372,
"readOnly": false
},
"temperature": {
"reportedValue": 25.5,
"displayValue": 25.5,
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473264524144,
"readOnly": false
},
"hardwareVersion": {
"reportedValue": "02",
"displayValue": "02",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"model": {
"reportedValue": "PIR00140005",
"displayValue": "PIR00140005",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"motionEnded": {
"reportedValue": "2016-09-07T18:57:23.406+0000",
"displayValue": "2016-09-07T18:57:23.406+0000",
"reportReceivedTime": 1473274944388,
"reportChangedTime": 1473274944388,
"readOnly": false
},
"inMotion": {
"reportedValue": true,
"displayValue": true,
"reportReceivedTime": 1473275062773,
"reportChangedTime": 1473275062773,
"readOnly": false
},
"presence": {
"reportedValue": "PRESENT",
"displayValue": "PRESENT",
"reportReceivedTime": 1473275339692,
"reportChangedTime": 1473205094508,
"readOnly": false
},
"softwareVersion": {
"reportedValue": "30585010",
"displayValue": "30585010",
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
},
"batteryLevel": {
"reportedValue": 100,
"displayValue": 100,
"reportReceivedTime": 1473272425826,
"reportChangedTime": 1473207627033,
"readOnly": false
}
}
}
]
}
You’ll see it has an inMotion
branch however I believe that is a red herring.