diff --git a/devices/namron/4512770-4in1-MultiSensor.json b/devices/namron/4512770-4in1-MultiSensor.json new file mode 100644 index 0000000000..dd1a6c2d16 --- /dev/null +++ b/devices/namron/4512770-4in1-MultiSensor.json @@ -0,0 +1,481 @@ +{ + "schema": "devcap1.schema.json", + "manufacturername": [ + "NAMRON AS", + "NAMRON AS" + ], + "modelid": [ + "4512770", + "4512771" + ], + "vendor": "NAMRON", + "product": "4in1-MultiSensor", + "sleeper": true, + "status": "Gold", + "path": "/devices/namron/4512770-4in1.json", + "subdevices": [ + { + "type": "$TYPE_PRESENCE_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x01", + "0x0406" + ], + "fingerprint": { + "profile": "0x0104", + "device": "0x0107", + "endpoint": "0x01", + "in": [ + "0x0000", + "0x0406" + ] + }, + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/productname", + "static": "4in1-MultiSensor" + }, + { + "name": "attr/swversion" + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/on" + }, + { + "name": "config/reachable" + }, + { + "name": "state/lastupdated" + }, + { + "name": "state/presence", + "awake": true, + "parse": { + "at": "0x0000", + "cl": "0x0406", + "ep": 1, + "eval": "Item.val = Attr.val", + "fn": "zcl:attr" + }, + "default": false + } + ] + }, + { + "type": "$TYPE_TEMPERATURE_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x03", + "0x0402" + ], + "fingerprint": { + "profile": "0x0104", + "device": "0x0302", + "endpoint": "0x03", + "in": [ + "0x0000", + "0x0402" + ] + }, + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/productname", + "static": "4in1-MultiSensor" + }, + { + "name": "attr/swversion" + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/offset", + "description": "Relative offset to the main measured value.", + "default": 0 + }, + { + "name": "config/on" + }, + { + "name": "config/reachable" + }, + { + "name": "state/lastupdated" + }, + { + "name": "state/temperature", + "awake": true, + "parse": { + "at": "0x0000", + "cl": "0x0402", + "ep": 0, + "eval": "Item.val = Attr.val + R.item('config/offset').val", + "fn": "zcl:attr" + }, + "default": 0 + } + ] + }, + { + "type": "$TYPE_HUMIDITY_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x04", + "0x0405" + ], + "fingerprint": { + "profile": "0x0104", + "device": "0x0302", + "endpoint": "0x04", + "in": [ + "0x0000", + "0x0405" + ] + }, + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/productname", + "static": "4in1-MultiSensor" + }, + { + "name": "attr/swversion" + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/offset", + "description": "Relative offset to the main measured value.", + "default": 0 + }, + { + "name": "config/on" + }, + { + "name": "config/reachable" + }, + { + "name": "state/humidity", + "awake": true, + "parse": { + "at": "0x0000", + "cl": "0x0405", + "ep": 0, + "eval": "Item.val = Attr.val + R.item('config/offset').val", + "fn": "zcl:attr" + }, + "default": 0 + }, + { + "name": "state/lastupdated" + } + ] + }, + { + "type": "$TYPE_LIGHT_LEVEL_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x05", + "0x0400" + ], + "fingerprint": { + "profile": "0x0104", + "device": "0x0106", + "endpoint": "0x05", + "in": [ + "0x0000", + "0x0400" + ] + }, + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/productname", + "static": "4in1-MultiSensor" + }, + { + "name": "attr/swversion" + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/on" + }, + { + "name": "config/reachable" + }, + { + "name": "config/tholddark", + "description": "Specifies at which lightlevel the dark attribute turns false.", + "default": 12000 + }, + { + "name": "config/tholdoffset", + "description": "Relative offset to tholddark. Sets daylight attribute to true when when lightlevel is at or above (tholddark + tholdoffset).", + "default": 7000 + }, + { + "name": "state/dark", + "description": "True when lightlevel is lower than tholddark.", + "default": false + }, + { + "name": "state/daylight", + "description": "True when lightlevel suits daylight according tholddark and tholdoffset configuration.", + "default": false + }, + { + "name": "state/lastupdated" + }, + { + "name": "state/lightlevel", + "awake": true, + "parse": { + "at": "0x0000", + "cl": "0x0400", + "ep": 5, + "eval": "Item.val = Attr.val", + "fn": "zcl:attr" + }, + "default": 0 + }, + { + "name": "state/lux", + "description": "The current Light level in lux.", + "default": 0 + } + ] + }, + { + "type": "$TYPE_BATTERY_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x01", + "0x0001" + ], + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/productname", + "static": "4in1-MultiSensor" + }, + { + "name": "attr/swversion" + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/on" + }, + { + "name": "config/reachable" + }, + { + "name": "state/battery", + "awake": true, + "refresh.interval": 3603, + "read": { + "at": "0x0021", + "cl": "0x0001", + "ep": 0, + "fn": "zcl:attr" + }, + "parse": { + "at": "0x0021", + "cl": "0x0001", + "ep": 1, + "eval": "Item.val = Attr.val", + "fn": "zcl:attr" + } + }, + { + "name": "state/lastupdated" + } + ] + } + ], + "bindings": [ + { + "bind": "unicast", + "src.ep": 1, + "cl": "0x0406", + "report": [ + { + "at": "0x0000", + "dt": "0x18", + "min": 1, + "max": 300 + } + ] + }, + { + "bind": "unicast", + "src.ep": 3, + "cl": "0x0402", + "report": [ + { + "at": "0x0000", + "dt": "0x29", + "min": 60, + "max": 600, + "change": "0x0000000A" + } + ] + }, + { + "bind": "unicast", + "src.ep": 4, + "cl": "0x0405", + "report": [ + { + "at": "0x0000", + "dt": "0x21", + "min": 10, + "max": 600, + "change": "0x0000000A" + } + ] + }, + { + "bind": "unicast", + "src.ep": 5, + "cl": "0x0400", + "report": [ + { + "at": "0x0000", + "dt": "0x21", + "min": 5, + "max": 300, + "change": "0x00000001" + } + ] + }, + { + "bind": "unicast", + "src.ep": 1, + "cl": "0x0001", + "report": [ + { + "at": "0x0021", + "dt": "0x20", + "min": 60, + "max": 3600, + "change": "0x00000001" + } + ] + } + ] +} \ No newline at end of file