deconz-rest-plugin
deconz-rest-plugin copied to clipboard
EasyAccess EasyFingerTouch
Device
Product name: EasyAccess EasyFingerTouch
Manufacturer: Onesti Products AS
Model identifier: EasyFingerTouch
Device type :
Lock
Screenshots
Basic
Identify
Groups
Door Lock
OTAU
there seems to be an older version of the lock already added, so i hope this one will be straight forward :-) https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4253
Hello, but the problem is now we need to use DDF to add device. Someone have started for a doorlock too, but have give up if you want to test on your side ? https://github.com/dresden-elektronik/deconz-rest-plugin/pull/5775
DDF description https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet
Hello, if you want to start from scratch, I have made a PR for some missing file https://github.com/Smanar/deconz-rest-plugin/commit/770b4e0ea9b65d931591c544aa9778fd11a02e8b And an error here https://github.com/Smanar/deconz-rest-plugin/commit/db05ea518b2caf4bb1bd783213577e22bd50a517
You need to restart deconz after adding the files
After that
- delete all previous DDF for this device
- right clic on the node, "edit DDF"
- if not automatically filled, fill manufacture name and model id (using drag and drop)
- set the status to "gold"
- if not made automatically, drag and drop a Door Lock device
- Save file
- Make hot reload,
- Check the result in the API using third app or phoscon (help / API information)
@ZeppDK do you need some help ? You don't need to compile code, just add/edit file, will be easier on docker install ?
@ZeppDK do you need some help ? You don't need to compile code, just add/edit file, will be easier on docker install ?
I have added the files, restartet, and gotten a new DDF file with the new lock type.. But still needs to find out how to get it to use the actual info from the lock shown in the pictures under “door lock”
I m not sure to understand ? Wich one picture ? The device is reconised ?
after i added your new files, i made a DDF, and added this from the list manually...
here is the API
Not so bad.
First you probably need at least a bind https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet#bindings-panel
- go to tab "bindings"
- drag and drop the cluster 0x0101 on the left panel
- drag and drop the attribute 0x0000 (from the same cluster) on the right panel
- configure it with values min 1, max 300
After that if you read the attribute value in deconz (double clic on the attribute 0x0000 on cluster 0x0101, like that you will be able to read only it, Door lock doesn't like the "Read" button that ask for ALL attributes, it can disable the attribute) you will have the value updated in the API (config/lock = null ATM)
If not, need to configure more the config/lock
- select config/lock
- on 2 part "read" and "parse"
- enable "zcl"
- set values
"attribute": "0x0000",
"cluster": "0x0101",
"end point": 11,
"expressions": "Item.val = Attr.val == 1",
With that, if you read the attribute 0x000
BTW take care, your device use 0x0B as endpoint not 0x01 (0x0b = 11)
Don't hesitate to share the complete DDF (if you can make a c/c on the third tabs ?)
so like this?
{ "schema": "devcap1.schema.json", "manufacturername": "Onesti Products AS", "modelid": "EasyFingerTouch", "vendor": "EasyAccess", "product": "EasyFingerTouch", "sleeper": false, "status": "Gold", "path": "/devices/easyfingertouch.json", "subdevices": [ { "type": "$TYPE_DOOR_LOCK", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01" ], "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/lock", "read": { "at": "0x0000", "cl": "0x0101", "ep": 11, "fn": "zcl" }, "parse": { "at": "0x0000", "cl": "0x0101", "ep": 11, "eval": "Item.val = Attr.val == 1", "fn": "zcl" } }, { "name": "state/lockstate" }, { "name": "state/open" }, { "name": "state/reachable" } ] } ], "bindings": [ { "bind": "unicast", "src.ep": 11, "cl": "0x0101", "report": [ { "at": "0x0000", "dt": "0x30", "min": 1, "max": 300 } ] } ] }
"type": "$TYPE_DOOR_LOCK",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01"
],
Here use 0x0b instead of 0x01, but it's probably just cosmetic. I think the DDF is able to work, have you try to lock/unlock the device to hcekc if the value config/lock is sill "null" ? For me you can start to use it, for exemple with curl (idk if you have a rest client ?)
curl -H 'Content-Type: application/json' -X PUT -d '{"lock": true}' http://<IP>:<PORT>/api/<KEY>/sensors/61/config
IP and PORT are the same displayed on phoscon, KEY is an api key.
that works for lock/unlock of the the lock :)
Nice, next step the battery
- add a "config/battery" to the DDF
- configure the battery bind, Cluster 0x0001 on right panel, and attribute 0x0020 on left panel
- Values for reporting min 300, max 2700, change 1
Make state/lockstate working
- select state/lockstate
- fill the "read" and "parse" part using as value (ZCL)
Cluster 0x0101 Attribute 0x0000 endpoint 0x0B or 11 (I don't remember if it's hexa or not Expression : if (Attr.val == 1) { Item.val = 'open' } else if (Attr.val == 2) { Item.val = 'closed' } else { Item.val = 'error' }
@ZeppDK need more guidance ?
Maybe.. but have not had time to test yet
NP, just ask, I will make a PR to be sure don't forget missing file on future deconz version
this is after adding the config you provided:
the lock state looks weird, as it says open, even though the door is locked... so maybee i should switch the open/closed like this? if (Attr.val == 1) { Item.val = 'closed' } else if (Attr.val == 2) { Item.val = 'open' } else { Item.val = 'error' }
i'll double check when i get home.
Ok so config/battery still not working ....
And I have a doubt, I don't remember if we can use 2 time the same attribute. We are using the attribute 0x0000 for config/lock and state/lockstate
Values are
<value name="Not fully locked" value="0x00"></value>
<value name="Locked" value="0x01"></value>
<value name="Unlocked" value="0x02"></value>
<value name="Undefined" value="0xff"></value>
I think I have made mistake with state/open
Cluster 0x0101
Attribute 0x0003
endpoint 0x0B or 11 (I don't remember if it's hexa or not
Expression : if (Attr.val == 0) { Item.val = 'open' } else if (Attr.val == 1) { Item.val = 'closed' } else { Item.val = 'error' }
Values are
<value name="Open" value="0x00"/>
<value name="Closed" value="0x01"/>
<value name="Error jammed" value="0x02"/>
<value name="Error forced open" value="0x03"/>
<value name="Error unspecified" value="0x04"/>
<value name="Undefined" value="0xff"/>
BTW, you have state/reachable and config/recheable, the first one is useless.
What you have tried beetween the 2 captures ? I don't see differences ? But I have confused both field Open/closed is more for the door than for the lock so better to use them for state/open.
And I have confirmation, we can use the same attribute at 2 place on the DDF.
Edit:
Ha yes , I m seing open = true
now
But this field is a bool, not a string, so better to use Item.val = Attr.val == 0
Only true if 0x0003 = 0
this is how it looks at the moment
{ "schema": "devcap1.schema.json", "manufacturername": "Onesti Products AS", "modelid": "EasyFingerTouch", "vendor": "EasyAccess", "product": "EasyFingerTouch", "sleeper": false, "status": "Gold", "path": "/devices/easyfingertouch.json", "subdevices": [ { "type": "$TYPE_DOOR_LOCK", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01" ], "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", "read": { "at": "0x0000", "cl": "0x0101", "ep": 11, "fn": "zcl" }, "parse": { "at": "0x0000", "cl": "0x0101", "ep": 11, "eval": "Item.val = Attr.val == 1", "fn": "zcl" } }, { "name": "state/lockstate", "read": { "at": "0x0000", "cl": "0x0101", "ep": 11, "fn": "zcl" }, "parse": { "at": "0x0000", "cl": "0x0101", "ep": 11, "eval": "if (Attr.val == 1) { Item.val = 'open' } else if (Attr.val == 2) { Item.val = 'closed' } else { Item.val = 'error' }", "fn": "zcl" } }, { "name": "state/open", "read": { "at": "0x0003", "cl": "0x0101", "ep": 11, "fn": "zcl" }, "parse": { "at": "0x0003", "cl": "0x0101", "ep": 11, "eval": "if (Attr.val == 0) { Item.val = 'open' } else if (Attr.val == 1) { Item.val = 'closed' } else { Item.val = 'error' }", "fn": "zcl" } }, { "name": "state/reachable" } ] } ], "bindings": [ { "bind": "unicast", "src.ep": 11, "cl": "0x0101", "report": [ { "at": "0x0000", "dt": "0x30", "min": 1, "max": 300 }, { "at": "0x0003", "dt": "0x30", "min": 1, "max": 300 } ] }, { "bind": "unicast", "src.ep": 11, "cl": "0x0001", "report": [ { "at": "0x0020", "dt": "0x20", "min": 300, "max": 2700, "change": "0x00000001" } ] } ] }
You can remove state/reachable
For state/open as it's a bool I think it s better to use "Item.val = Attr.val != 1" whith that you will have open= false only if the door is closed, if you have error you will have open = true.
For state/locked I would try "if (Attr.val == 1) { Item.val = 'locked' } else if (Attr.val == 2) { Item.val = 'unlocked' } else { Item.val = 'error' }",
I don't understanbd why battery is not working. Can you try to read the attribute 0x0020 in the cluster 0x0001 in deconz ? Perhaps need more "forcing" with adding more stuff in the config/battery.
{
"name": "config/battery",
"parse": {"cl": "0x0001", "at": "0x0020", "eval": "Item.val = Attr.val"},
"awake": true
},
battery not showing much in deconz either :-)
battery not showing much in deconz either :-)
lol, ok, so we have spend time for nothing. Have take a look on other zigbee project, I don't see this device, perhaps they use the 0xFEAE cluster ...
The rest is working ?
state/open and state/locked ?
lockstate is showing the correct state now. thats the most important feature :D
a bit weird though, HA only shows the battery state, and not the lock state, but that must be a HA problem, as the info is shown in the API
Ha ? State/lockstate is something new but from my memory it can expose config/lock (so only a bool value) but it s same than State/lockstate
And for state/open ? Need to expose a bool value too (true/false) for the door state.
{
"name": "state/open",
"read": {
"at": "0x0003",
"cl": "0x0101",
"ep": 11,
"fn": "zcl"
},
"parse": {
"at": "0x0003",
"cl": "0x0101",
"ep": 11,
"eval": "Item.val = Attr.val != 1",
"fn": "zcl"
}
}
{
"bind": "unicast",
"src.ep": 11,
"cl": "0x0101",
"report": [
{
"at": "0x0003",
"dt": "0x30",
"min": 1,
"max": 300
}
]
}
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.