DDF for Aqara Presence Sensor FP1E#7900
Conversation
Add attributes for Aqara FP1E, see dresden-elektronik#7885
Reset presence is write-only. Reset it to false on next presence report.
Apparently we still need C++ support to make items updatable. See dresden-elektronik#7885.
SwoopX
left a comment
There was a problem hiding this comment.
Guess this one's ok so far. Just added some questions on the DDF.
| "name": "attr/swversion", | ||
| "parse": { | ||
| "fn": "zcl:attr", | ||
| "ep": "0x01", | ||
| "cl": "0x0000", | ||
| "at": "0x0001", | ||
| "eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)" | ||
| }, | ||
| "read": { | ||
| "fn": "zcl:attr", | ||
| "ep": "0x01", | ||
| "cl": "0x0000", | ||
| "at": "0x0001" | ||
| }, | ||
| "refresh.interval": 86400 | ||
| }, | ||
| { | ||
| "name": "attr/swversion_bis", | ||
| "awake": true, | ||
| "parse": { | ||
| "fn": "xiaomi:special", | ||
| "at": "0x00F7", | ||
| "idx": "0x08", | ||
| "eval": "Item.val = '0.0.0_' + ('0000' + (Attr.val & 0xFF).toString()).slice(-4)" | ||
| }, | ||
| "read": { | ||
| "fn": "none" | ||
| } | ||
| }, |
There was a problem hiding this comment.
I'd probably go with the special reporting here only. Saves some lines and requests towards the device :)
There was a problem hiding this comment.
I'm not too sure if the sensor actually sends regular reports for the special attribute. I've only ever captures a single report, shortly after resetting the sensor.
| "eval": "Item.val = Attr.val" | ||
| }, | ||
| "read": { | ||
| "fn": "none" |
There was a problem hiding this comment.
Hm, don't we want to know the current state or isn't it readable? 🤔
| "eval": "Item.val = Attr.val" | ||
| }, | ||
| "read": { | ||
| "fn": "none" |
There was a problem hiding this comment.
Also here, do we want to read?
There was a problem hiding this comment.
The presence attribute is report-only, the distance can be read.
Address remarks by @SwoopX
|
This pull request is now merged. The new DDB files have been uploaded to the store. DDB FilesModified
🕓 Updated for commit 8756d93 |
See #7885.
Changes:
general.xml;config/resetpresenceto set AI Learning (see issue);config/detectionrange. Unfortunately making that updatable from the API requires some trivial C++ changes;state/distance.