I interviewed a battery-powered Zigbee presence sensor and received the following code:
"ids": {
"modelId": "TS0601",
"manufacturerName": "_TZE284_ft7qqpx3"
},
"endpoints": {
"ieeeAddress": "a4:c1:38:76:3a:4f:d9:67",
"networkAddress": 47503,
"modelId": "TS0601",
"manufacturerName": "_TZE284_ft7qqpx3",
"endpointDescriptors": [
{
"status": "SUCCESS",
"nwkAddrOfInterest": 47503,
"_reserved": 22,
"endpointId": 1,
"applicationProfileId": 260,
"applicationDeviceId": 81,
"applicationDeviceVersion": 0,
"_reserved1": 1,
"inputClusters": [
4,
5,
61184,
0,
60672
],
"outputClusters": [
25,
10
]
}
],
"deviceType": "enddevice",
"receiveWhenIdle": false,
"capabilities": {
"alternatePANCoordinator": false,
"deviceType": false,
"powerSourceMains": false,
"receiveWhenIdle": false,
"security": false,
"allocateAddress": true
},
"extendedEndpointDescriptors": {
"1": {
"clusters": {
"groups": {},
"scenes": {
"attributes": [
{
"acl": [
"readable",
"reportable"
],
"id": 0,
"dataTypeId": 32
},
{
"acl": [
"readable",
"reportable"
],
"id": 1,
"dataTypeId": 32
},
{
"acl": [
"readable",
"reportable"
],
"id": 2,
"dataTypeId": 33
},
{
"acl": [
"readable",
"reportable"
],
"id": 3,
"dataTypeId": 16
},
{
"acl": [
"readable",
"reportable"
],
"id": 4,
"dataTypeId": 24
},
{
"acl": [
"readable",
"reportable"
],
"id": 65533,
"dataTypeId": 33,
"name": "clusterRevision"
}
]
},
"basic": {
"attributes": [
{
"acl": [
"readable",
"reportable"
],
"id": 0,
"dataTypeId": 32,
"name": "zclVersion",
"value": 3
},
{
"acl": [
"readable",
"reportable"
],
"id": 1,
"dataTypeId": 32,
"name": "appVersion",
"value": 80
},
{
"acl": [
"readable",
"reportable"
],
"id": 2,
"dataTypeId": 32,
"name": "stackVersion",
"value": 0
},
{
"acl": [
"readable",
"reportable"
],
"id": 3,
"dataTypeId": 32,
"name": "hwVersion",
"value": 1
},
{
"acl": [
"readable",
"reportable"
],
"id": 4,
"dataTypeId": 66,
"name": "manufacturerName",
"value": "_TZE284_ft7qqpx3"
},
{
"acl": [
"readable",
"reportable"
],
"id": 5,
"dataTypeId": 66,
"name": "modelId",
"value": "TS0601"
},
{
"acl": [
"readable",
"reportable"
],
"id": 6,
"dataTypeId": 66,
"name": "dateCode",
"value": ""
},
{
"acl": [
"readable",
"reportable"
],
"id": 7,
"dataTypeId": 48,
"name": "powerSource",
"value": "battery"
},
{
"acl": [
"readable",
"writable",
"reportable"
],
"id": 65502,
"dataTypeId": 32
},
{
"acl": [
"readable",
"reportable"
],
"id": 65533,
"dataTypeId": 33,
"name": "clusterRevision",
"value": 2
},
{
"acl": [
"readable",
"reportable"
],
"id": 65534,
"dataTypeId": 48,
"name": "attributeReportingStatus",
"value": "PENDING"
},
{
"acl": [
"readable",
"reportable"
],
"id": 65506,
"dataTypeId": 32
},
{
"acl": [
"readable",
"reportable"
],
"id": 65507,
"dataTypeId": 72
},
{
"acl": [
"readable",
"writable",
"reportable"
],
"id": 65487,
"dataTypeId": 33
}
]
}
},
"bindings": {
"ota": {
"attributes": [
{
"acl": [
"readable"
],
"id": 0,
"dataTypeId": 240,
"name": "upgradeServerID",
"value": "ff:ff:ff:ff:ff:ff:ff:ff"
},
{
"acl": [
"readable"
],
"id": 1,
"dataTypeId": 35,
"name": "fileOffset",
"value": 4294967295
},
{
"acl": [
"readable"
],
"id": 2,
"dataTypeId": 35,
"name": "currentFileVersion",
"value": 80
},
{
"acl": [
"readable"
],
"id": 3,
"dataTypeId": 33,
"name": "currentZigBeeStackVersion",
"value": 2
},
{
"acl": [
"readable"
],
"id": 4,
"dataTypeId": 35,
"name": "downloadedFileVersion",
"value": 4294967295
},
{
"acl": [
"readable"
],
"id": 5,
"dataTypeId": 33,
"name": "downloadedZigBeeStackVersion",
"value": 65535
},
{
"acl": [
"readable"
],
"id": 6,
"dataTypeId": 48,
"name": "imageUpgradeStatus",
"value": "normal"
},
{
"acl": [
"readable"
],
"id": 7,
"dataTypeId": 33,
"name": "manufacturerID",
"value": 4417
},
{
"acl": [
"readable"
],
"id": 8,
"dataTypeId": 33,
"name": "imageTypeID",
"value": 65535
},
{
"acl": [
"readable"
],
"id": 9,
"dataTypeId": 33,
"name": "minimumBlockPeriod",
"value": 0
},
{
"acl": [
"readable"
],
"id": 65533,
"dataTypeId": 33,
"name": "clusterRevision",
"value": 3
}
]
},
"time": {
"attributes": [
{
"acl": [
"readable"
],
"id": 65533,
"dataTypeId": 33,
"name": "clusterRevision",
"value": 1
}
]
}
}
}
}
}
Is it possible to know from the code whether this battery-powered motion sensor supports battery monitoring capabilities such as measure_battery or alarm_battery?
I found this code snippet, which relates to some battery information:
{
"acl": [
"readable",
"reportable"
],
"id": 7,
"dataTypeId": 48,
"name": "powerSource",
"value": "battery"
},
Is this information sufficient to create a device driver with measure_battery or alarm_battery?
I don’t know anything about programming, but I hope it’s clear what I want to know.