Hallo Niklerus,
Thanks for your reply and patience. I guess you know that testing will take some time ;O).
You had a good point and playing around for a while, I also recognized that if it beeps for a little longer, then it does not switch back from true to false again.
For on your reply of today, I guess you got it just working fine, and do not have to uninstall the device from your configuration (I just wrote this for the user b2cis as he mentioned in his post, that he couldn’t find the directories…)
Coming back to the issue you raised, yes it seems if the device goes back to sleep while the water leakeage is true, then it will not switch back the value on deCONZ and stays true while the device is already dry again. So I adjusted the ddf file a little and did some further testing, now it will switch back within some seconds (the most after 5 minutes) - while testing mine never took that long.
please find the new ddf file below - and copy it to ~/.local/share/dresden-elektronik/deCONZ/devices
directory for testing:
{
"schema": "devcap1.schema.json",
"manufacturername": "$MF_IKEA",
"modelid": "BADRING Water Leakage Sensor",
"vendor": "IKEA",
"product": "BADRING Water Leakage Sensor",
"sleeper": true,
"status": "Silver",
"path": "/devices/ikea/badring_water_leakage_sensor.json",
"subdevices": [
{
"type": "$TYPE_WATER_LEAK_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0500"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/productid",
"refresh.interval": 86400
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/alert",
"default": "none"
},
{
"name": "config/battery",
"awake": true,
"refresh.interval": 86400,
"read": {
"at": "0x0021",
"cl": "0x0001",
"ep": 1,
"fn": "zcl:attr"
},
"parse": {
"at": "0x0021",
"cl": "0x0001",
"ep": 1,
"eval": "Item.val = Math.round(Attr.val / 2)",
"fn": "zcl:attr"
},
"default": 0
},
{
"name": "config/group"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/water",
"awake": true,
"refresh.interval": 30,
"read": {
"ep": 2,
"at": "0x0002",
"cl": "0x0500",
"fn": "zcl:attr"
},
"parse": {
"fn": "ias:zonestatus",
"mask": "alarm1"
},
"default": false
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0500",
"report": [
{
"at": "0x0002",
"dt": "0x19",
"min": 10,
"max": 300,
"change": "0x0000"
}
]
}
]
}