Skip to content

Commit

Permalink
Adding DDF for IDlock 150
Browse files Browse the repository at this point in the history
  • Loading branch information
brujoand committed Feb 10, 2022
1 parent 52995d2 commit f1637af
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 1 deletion.
175 changes: 175 additions & 0 deletions devices/datek/id_lock_150.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "$MD_DATEK",
"modelid": "ID Lock 150",
"product": "ID Lock 150",
"sleeper": false,
"status": "Bronze",
"subdevices": [
{
"type": "ZHADoorLock",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0101"
],
"fingerprint": {
"profile": "0x0104",
"device": "0x000A",
"endpoint": "0x01",
"in": [
"0x0001",
"0x0101"
]
},
"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"
},
{
"name": "config/lock",
"refresh.interval": 180,
"read": {
"at": "0x0000",
"cl": "0x0101",
"ep": 1,
"fn": "zcl",
"mf": "0x1337"
},
"parse": {
"at": "0x0000",
"cl": "0x0101",
"ep": 1,
"eval": "Item.val = Attr.val == 1",
"fn": "zcl",
"mf": "0x1337"
}
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/lockstate",
"refresh.interval": 172,
"read": {
"at": "0x0000",
"cl": "0x0101",
"ep": 1,
"fn": "zcl",
"mf": "0x1337"
},
"parse": {
"at": "0x0000",
"cl": "0x0101",
"ep": 1,
"fn": "zcl",
"mf": "0x1337",
"script": "lockstatus.js"
},
"default": "\"unlocked\""
},
{
"name": "state/open",
"refresh.interval": 160,
"read": {
"at": "0x0003",
"cl": "0x0101",
"ep": 1,
"fn": "zcl",
"mf": "0x1337"
},
"parse": {
"at": "0x0003",
"cl": "0x0101",
"ep": 1,
"eval": "Item.val = Attr.val < 1",
"fn": "zcl",
"mf": "0x1337"
}
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0001",
"report": [
{
"at": "0x0021",
"dt": "0x20",
"mf": "0x1337",
"min": 300,
"max": 2700,
"change": "0x00000001"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0101",
"report": [
{
"at": "0x0003",
"dt": "0x10",
"mf": "0x0003",
"min": 300,
"max": 2700
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0101",
"report": [
{
"at": "0x0000",
"dt": "0x30",
"mf": "0x1337",
"min": 300,
"max": 2700
}
]
}
]
}
3 changes: 3 additions & 0 deletions devices/datek/lockstatus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const values = ["not fully locked","locked","unlocked","undefined"];
if (Attr.val >= 0 && Attr.val < 4)
Item.val = values[Attr.val];
3 changes: 2 additions & 1 deletion devices/generic/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

"manufacturers" : {
"$MF_BOSCH": "Bosch",
"$MF_DATEK": "Datek",
"$MF_IKEA": "IKEA of Sweden",
"$MF_LUMI": "LUMI",
"$MF_LUTRON": "Lutron",
Expand Down Expand Up @@ -42,4 +43,4 @@
"$TYPE_ZGP_SWITCH": "ZGPSwitch",
"$TYPE_SPECTRAL_SENSOR": "ZHASpectral"
}
}
}

0 comments on commit f1637af

Please sign in to comment.