From 422cd11bd735a7c30df560b695e11d6940fe55d4 Mon Sep 17 00:00:00 2001 From: olemr <28068256+olemr@users.noreply.github.com> Date: Sun, 29 Dec 2024 19:20:05 +0100 Subject: [PATCH 1/3] DDF file for Namron 4512770 4in1 MultiSensor ToDo: - LightLevel issues - OTA --- devices/namron/4512770-4in1-MultiSensor.json | 475 +++++++++++++++++++ 1 file changed, 475 insertions(+) create mode 100644 devices/namron/4512770-4in1-MultiSensor.json diff --git a/devices/namron/4512770-4in1-MultiSensor.json b/devices/namron/4512770-4in1-MultiSensor.json new file mode 100644 index 0000000000..0a296688cc --- /dev/null +++ b/devices/namron/4512770-4in1-MultiSensor.json @@ -0,0 +1,475 @@ +{ + "schema": "devcap1.schema.json", + "manufacturername": "NAMRON AS", + "modelid": "4512770", + "vendor": "NAMRON", + "product": "4in1(4512770)", + "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 From 17c9ff6fd5410976c284aa0d9248c2b5ed58c9da Mon Sep 17 00:00:00 2001 From: olemr <28068256+olemr@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:05:38 +0100 Subject: [PATCH 2/3] Update 4512770-4in1-MultiSensor.json Added support for black variant 4512771 --- devices/namron/4512770-4in1-MultiSensor.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devices/namron/4512770-4in1-MultiSensor.json b/devices/namron/4512770-4in1-MultiSensor.json index 0a296688cc..26d8a55aaf 100644 --- a/devices/namron/4512770-4in1-MultiSensor.json +++ b/devices/namron/4512770-4in1-MultiSensor.json @@ -1,9 +1,9 @@ { "schema": "devcap1.schema.json", - "manufacturername": "NAMRON AS", - "modelid": "4512770", + "manufacturername": ["NAMRON AS", "NAMRON AS"], + "modelid": ["4512770","4512771"], "vendor": "NAMRON", - "product": "4in1(4512770)", + "product": "4in1-MultiSensor", "sleeper": true, "status": "Gold", "path": "/devices/namron/4512770-4in1.json", From 570ec5ac3a5a0e885505a7be4f80c106337b0e1d Mon Sep 17 00:00:00 2001 From: olemr <28068256+olemr@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:23:01 +0100 Subject: [PATCH 3/3] Update 4512770-4in1-MultiSensor.json Indent --- devices/namron/4512770-4in1-MultiSensor.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/devices/namron/4512770-4in1-MultiSensor.json b/devices/namron/4512770-4in1-MultiSensor.json index 26d8a55aaf..dd1a6c2d16 100644 --- a/devices/namron/4512770-4in1-MultiSensor.json +++ b/devices/namron/4512770-4in1-MultiSensor.json @@ -1,7 +1,13 @@ { "schema": "devcap1.schema.json", - "manufacturername": ["NAMRON AS", "NAMRON AS"], - "modelid": ["4512770","4512771"], + "manufacturername": [ + "NAMRON AS", + "NAMRON AS" + ], + "modelid": [ + "4512770", + "4512771" + ], "vendor": "NAMRON", "product": "4in1-MultiSensor", "sleeper": true,