Hi. This is my first effort at a DDF. Put together from editor default and examining DDFs for similar devices.
It works ok for me but I’d be keen to get any feedback on it.
{
"schema": "devcap1.schema.json",
"manufacturername": "sengled",
"modelid": "E1D-G73",
"vendor": "Sengled",
"product": "Smart Window and Door Sensor",
"sleeper": true,
"status": "Silver",
"path": "/devices/sengled/e1d-g73.json",
"subdevices": [
{
"type": "$TYPE_OPEN_CLOSE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0500"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x0402",
"endpoint": "0x01",
"in": [
"0x0000",
"0x0001",
"0x0500"
]
},
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"description": "The current device battery level in 0–100 %.",
"awake": true,
"parse": {
"at": "0x0021",
"cl": "0x0001",
"ep": 1,
"eval": "Item.val = Attr.val / 2"
},
"default": 0
},
{
"name": "config/enrolled",
"description": "State of IAS enrollment process.",
"public": false
},
{
"name": "config/on"
},
{
"name": "config/pending",
"description": "Pending tasks to configure the device."
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/lowbattery",
"description": "True when the device battery runs low."
},
{
"name": "state/open",
"description": "True when open is detected."
},
{
"name": "state/tampered",
"description": "True when the device tampered alarm was triggered."
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0001",
"report": [
{
"at": "0x0021",
"dt": "0x20",
"min": 60,
"max": 3600,
"change": "0x00000001"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0500"
}
]
}