From 3c3b6d6fd9eafee409c331464c22fc65d877efab Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 8 Oct 2023 19:06:55 +0200 Subject: [PATCH] initial commit for zigbee2mqtt ansible deployment --- .gitignore | 4 + bin/c2r.py | 30 +++++++ config/coordinator_backup.json | 65 +++++++++++++++ config/database.db | 16 ++++ config/state.json | 131 ++++++++++++++++++++++++++++++ config_example/configuration.yaml | 70 ++++++++++++++++ 6 files changed, 316 insertions(+) create mode 100755 bin/c2r.py create mode 100644 config/coordinator_backup.json create mode 100644 config/database.db create mode 100644 config/state.json create mode 100644 config_example/configuration.yaml diff --git a/.gitignore b/.gitignore index 24c6aa9..2707980 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Zigbee2MQTT repo rule +config/configuration.yaml +config/log + # ---> Linux *~ diff --git a/bin/c2r.py b/bin/c2r.py new file mode 100755 index 0000000..9f53bd1 --- /dev/null +++ b/bin/c2r.py @@ -0,0 +1,30 @@ +#!/bin/python3 +# +import re +import sys + +try: + src_file = sys.argv[1] + dst_file = sys.argv[2] +except IndexError: + print(sys.argv[0], " ") + sys.exit(17) + +try: + with open(src_file, 'r') as fh: + s = fh.read() +except (PermissionError, FileNotFoundError) as e: + print("Unable to open", '"' + src_file + '"') + sys.exit(18) + +n = re.sub('^.*server: .*', ' server: mqtt://', s, flags=re.MULTILINE) +n = re.sub('^.*user: .*', ' user: ', n, flags=re.MULTILINE) +n = re.sub('^.*password: .*', ' password: ', n, flags=re.MULTILINE) +n = re.sub('^.*auth_token: .*', ' auth_token: ', n, flags=re.MULTILINE) + +try: + with open(dst_file, 'w') as fh: + fh.write(n) +except PermissionError: + print("Unable to write", '"' + dst_file + '"') + sys.exit(19) diff --git a/config/coordinator_backup.json b/config/coordinator_backup.json new file mode 100644 index 0000000..8de1025 --- /dev/null +++ b/config/coordinator_backup.json @@ -0,0 +1,65 @@ +{ + "metadata": { + "format": "zigpy/open-coordinator-backup", + "version": 1, + "source": "zigbee-herdsman@0.14.76", + "internal": { + "date": "2023-10-07T17:31:11.764Z", + "znpVersion": 0 + } + }, + "stack_specific": { + "zstack": {} + }, + "coordinator_ieee": "00124b001cdd065c", + "pan_id": "1a62", + "extended_pan_id": "00124b001cdd065c", + "nwk_update_id": 0, + "security_level": 5, + "channel": 11, + "channel_mask": [ + 11 + ], + "network_key": { + "key": "7b4baa243f424153d6737663bb006af6", + "sequence_number": 0, + "frame_counter": 0 + }, + "devices": [ + { + "nwk_address": "12d0", + "ieee_address": "90fd9ffffe751d80", + "is_child": false + }, + { + "nwk_address": "d6b8", + "ieee_address": "cc86ecfffeb4d5bb", + "is_child": false + }, + { + "nwk_address": "e056", + "ieee_address": "000b57fffebadb72", + "is_child": false + }, + { + "nwk_address": "9dff", + "ieee_address": "000b57fffea6e32a", + "is_child": false + }, + { + "nwk_address": "4169", + "ieee_address": "cc86ecfffea1f4b7", + "is_child": true + }, + { + "nwk_address": "b99b", + "ieee_address": "84ba20fffe82ed95", + "is_child": false + }, + { + "nwk_address": "a199", + "ieee_address": "003c84fffec4ffc6", + "is_child": false + } + ] +} \ No newline at end of file diff --git a/config/database.db b/config/database.db new file mode 100644 index 0000000..c7ca45e --- /dev/null +++ b/config/database.db @@ -0,0 +1,16 @@ +{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b001cdd065c","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,8,10,11,12,13,47,110,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"8":{"profId":260,"epId":8,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"10":{"profId":260,"epId":10,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[1281,10],"outClusterList":[1280,1282],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"12":{"profId":49246,"epId":12,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"13":{"profId":260,"epId":13,"devId":5,"inClusterList":[25],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"47":{"profId":260,"epId":47,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"110":{"profId":260,"epId":110,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"interviewCompleted":true,"meta":{},"lastSeen":null,"defaultSendRequestWhen":"immediate"} +{"id":2,"type":"Router","ieeeAddr":"0x90fd9ffffe751d80","nwkAddr":4816,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"FLOALT panel WS 60x60","epList":[1],"endpoints":{"1":{"profId":49246,"epId":1,"devId":544,"inClusterList":[0,3,4,5,6,8,768,2821,4096],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"FLOALT panel WS 60x60","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":1,"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":2,"colorTemperature":393}},"genOnOff":{"attributes":{"onOff":1}},"genLevelCtrl":{"attributes":{"currentLevel":26}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224","zclVersion":1,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696738632090,"defaultSendRequestWhen":"immediate"} +{"id":4,"type":"Router","ieeeAddr":"0x60a423fffe1397b7","nwkAddr":40218,"manufId":4098,"manufName":"_TZ3000_kdi2o9m6","powerSource":"Mains (single phase)","modelId":"TS011F","epList":[1,11,242],"endpoints":{"1":{"epId":1,"inClusterList":[],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"TS011F","manufacturerName":"_TZ3000_kdi2o9m6"}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[],"configuredReportings":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":266,"inClusterList":[0,3,4,5,6],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"powerSource":1,"zclVersion":3,"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b001cdd1197","endpointID":1}],"configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":3600,"repChange":0}],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1696779733370,"defaultSendRequestWhen":"immediate"} +{"id":5,"type":"EndDevice","ieeeAddr":"0x000b57fffea6e32a","nwkAddr":40447,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Battery","modelId":"TRADFRI remote control","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":2064,"inClusterList":[0,1,3,9,2821,4096],"outClusterList":[3,4,5,6,8,25,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI remote control","manufacturerName":"IKEA of Sweden","powerSource":3,"zclVersion":1,"appVersion":17,"stackVersion":87,"hwVersion":1,"dateCode":"20161011","swBuildId":"1.1.1.1-5.7.2.0"}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":74}}},"binds":[{"cluster":6,"groupID":901,"type":"group"},{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b001cdd065c","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":62000,"repChange":0}],"meta":{}}},"appVersion":17,"stackVersion":87,"hwVersion":1,"dateCode":"20161011","swBuildId":"1.1.1.1-5.7.2.0","zclVersion":1,"interviewCompleted":true,"meta":{"configured":2040954255},"lastSeen":1696781919714,"defaultSendRequestWhen":"immediate"} +{"id":6,"type":"Group","groupID":901,"members":[],"meta":{}} +{"id":7,"type":"Router","ieeeAddr":"0x003c84fffe42032a","nwkAddr":20430,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707556,"defaultSendRequestWhen":"immediate"} +{"id":8,"type":"Router","ieeeAddr":"0x003c84fffe30130a","nwkAddr":33598,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707318,"defaultSendRequestWhen":"immediate"} +{"id":9,"type":"Router","ieeeAddr":"0x003c84fffee6b1ea","nwkAddr":25042,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707460,"defaultSendRequestWhen":"immediate"} +{"id":10,"type":"Router","ieeeAddr":"0x003c84fffe80de22","nwkAddr":59487,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707353,"defaultSendRequestWhen":"immediate"} +{"id":11,"type":"Router","ieeeAddr":"0x003c84fffee6aeb8","nwkAddr":5905,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":2,"colorTemperature":454}},"genOnOff":{"attributes":{"onOff":0}},"genLevelCtrl":{"attributes":{"currentLevel":89}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707534,"defaultSendRequestWhen":"immediate"} +{"id":12,"type":"Router","ieeeAddr":"0x84b4dbfffef5c819","nwkAddr":1137,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E14 WS globe 470lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768,4096,64599],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E14 WS globe 470lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":8,"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":106,"hwVersion":1,"dateCode":"20211201","swBuildId":"1.1.003","zclVersion":8,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696781707430,"defaultSendRequestWhen":"immediate"} +{"id":13,"type":"Router","ieeeAddr":"0x000b57fffebadb72","nwkAddr":57430,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 W 400lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":257,"inClusterList":[0,3,4,5,6,8,4096,64636],"outClusterList":[5,25,32,4096],"clusters":{"genOnOff":{"attributes":{"onOff":1}},"genLevelCtrl":{"attributes":{"currentLevel":160}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":33,"stackVersion":98,"hwVersion":1,"dateCode":"20211025","swBuildId":"2.3.086","zclVersion":3,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696704177982,"defaultSendRequestWhen":"immediate"} +{"id":15,"type":"EndDevice","ieeeAddr":"0x003c84fffec4ffc6","nwkAddr":41369,"manufId":4098,"manufName":"_TZE200_2cs6g9i7","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"x�|,\u0011","65506":31,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_2cs6g9i7","powerSource":3,"zclVersion":3,"appVersion":85,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":85,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1696784497443,"defaultSendRequestWhen":"immediate"} +{"id":16,"type":"Router","ieeeAddr":"0x000b57fffed9e406","nwkAddr":17343,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"FLOALT panel WS 30x90","epList":[1],"endpoints":{"1":{"profId":49246,"epId":1,"devId":544,"inClusterList":[0,3,4,5,6,8,768,2821,4096],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"FLOALT panel WS 30x90","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":1,"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":2,"colorTemperature":332}},"genOnOff":{"attributes":{"onOff":1}},"genLevelCtrl":{"attributes":{"currentLevel":79}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224","zclVersion":1,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696756685961,"defaultSendRequestWhen":"immediate"} +{"id":18,"type":"Router","ieeeAddr":"0x84fd27fffedc7e4d","nwkAddr":21895,"manufId":4098,"manufName":"_TZ3000_kdi2o9m6","powerSource":"Mains (single phase)","modelId":"TS011F","epList":[1,11,242],"endpoints":{"1":{"epId":1,"inClusterList":[],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"TS011F","manufacturerName":"_TZ3000_kdi2o9m6"}}},"binds":[],"configuredReportings":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":266,"inClusterList":[0,3,4,5,6],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"powerSource":1,"zclVersion":3,"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b001cdd065c","endpointID":1}],"configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":3600,"repChange":0}],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1},"lastSeen":1696779722850,"defaultSendRequestWhen":"immediate"} +{"id":19,"type":"EndDevice","ieeeAddr":"0xcc86ecfffeb4d5bb","nwkAddr":54968,"manufId":4619,"manufName":"_TZ1800_fcdjzz3s","powerSource":"Battery","modelId":"TY0202","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,1280,2821],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"TY0202","manufacturerName":"_TZ1800_fcdjzz3s","powerSource":3,"zclVersion":1,"appVersion":67,"stackVersion":2,"hwVersion":1,"dateCode":"2021.1.5"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b001cdd065c","zoneState":1}},"genPowerCfg":{"attributes":{"batteryVoltage":29,"batteryPercentageRemaining":196}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b001cdd065c","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":32,"minRepIntval":3600,"maxRepIntval":62000,"repChange":0},{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":62000,"repChange":0}],"meta":{}}},"appVersion":67,"stackVersion":2,"hwVersion":1,"dateCode":"2021.1.5","zclVersion":1,"interviewCompleted":true,"meta":{"configured":172811876},"lastSeen":1696780234100,"defaultSendRequestWhen":"immediate"} \ No newline at end of file diff --git a/config/state.json b/config/state.json new file mode 100644 index 0000000..f2f1405 --- /dev/null +++ b/config/state.json @@ -0,0 +1,131 @@ +{ + "0x90fd9ffffe751d80": { + "color_mode": "color_temp", + "state": "ON", + "linkquality": 99, + "update": { + "state": "idle" + }, + "color_temp": 393, + "brightness": 26 + }, + "0x60a423fffe1397b7": { + "state": "OFF", + "linkquality": 55 + }, + "0x000b57fffea6e32a": { + "battery": 74, + "update": { + "state": "available" + }, + "linkquality": 65 + }, + "0x003c84fffe30130a": { + "color_mode": "color_temp", + "state": "ON", + "update": { + "state": "idle" + }, + "linkquality": 55, + "brightness": 24, + "color_temp": 413, + "color_temp_startup": 65535 + }, + "0x003c84fffee6b1ea": { + "color_mode": "color_temp", + "update": { + "state": "idle" + }, + "state": "ON", + "linkquality": 68, + "brightness": 24, + "color_temp": 413, + "color_temp_startup": 65535 + }, + "0x003c84fffe80de22": { + "color_mode": "color_temp", + "update": { + "state": "idle" + }, + "state": "ON", + "linkquality": 76, + "brightness": 24, + "color_temp": 413, + "color_temp_startup": 65535 + }, + "0x003c84fffee6aeb8": { + "color_mode": "color_temp", + "update": { + "state": "idle" + }, + "state": "ON", + "brightness": 24, + "color_temp": 413, + "linkquality": 39, + "color_temp_startup": 65535 + }, + "0x84b4dbfffef5c819": { + "color_mode": "color_temp", + "state": "ON", + "update": { + "state": "idle" + }, + "linkquality": 57, + "brightness": 24, + "color_temp": 413, + "color_temp_startup": 65535 + }, + "0x003c84fffe42032a": { + "color_mode": "color_temp", + "state": "ON", + "update": { + "state": "idle" + }, + "linkquality": 52, + "brightness": 24, + "color_temp": 413, + "color_temp_startup": 65535 + }, + "0x003c84fffec4ffc6": { + "preset": "manual", + "away_mode": "OFF", + "system_mode": "heat", + "current_heating_setpoint": 21.5, + "window_detection": "ON", + "valve_detection": "ON", + "child_lock": "UNLOCK", + "local_temperature": 22.2, + "battery": 5, + "linkquality": 60 + }, + "0x000b57fffed9e406": { + "color_mode": "color_temp", + "brightness": 79, + "state": "ON", + "color_temp": 332, + "update": { + "state": "idle" + }, + "linkquality": 57 + }, + "0x84fd27fffedc7e4d": { + "state": "OFF", + "linkquality": 60 + }, + "0xcc86ecfffeb4d5bb": { + "voltage": 2900, + "battery": 98, + "occupancy": false, + "tamper": false, + "battery_low": false, + "linkquality": 55 + }, + "0x000b57fffebadb72": { + "state": "OFF", + "update": { + "state": "idle" + }, + "brightness": 160, + "linkquality": 28 + } +} \ No newline at end of file diff --git a/config_example/configuration.yaml b/config_example/configuration.yaml new file mode 100644 index 0000000..919b49e --- /dev/null +++ b/config_example/configuration.yaml @@ -0,0 +1,70 @@ +homeassistant: false +permit_join: false +mqtt: + base_topic: zigbee/ffe + server: mqtt:// + user: + password: +serial: + port: /dev/ttyACM0 +advanced: + network_key: + - 123 + - 75 + - 170 + - 36 + - 63 + - 66 + - 65 + - 83 + - 214 + - 115 + - 118 + - 99 + - 187 + - 0 + - 106 + - 246 + ikea_ota_use_test_url: true + legacy_api: false + log_level: debug + homeassistant_legacy_entity_attributes: false + legacy_availability_payload: false +frontend: + port: 8038 + host: 0.0.0.0 + auth_token: + url: http://localhost +device_options: + legacy: false +devices: + '0x003c84fffec4ffc6': + friendly_name: sleep/heating_valve + '0x000b57fffebadb72': + friendly_name: sleep/bed_light_di + '0x90fd9ffffe751d80': + friendly_name: livingroom/main_light + '0x60a423fffe1397b7': + friendly_name: diningroom/powerplug_floorlamp + '0x000b57fffea6e32a': + friendly_name: sleep/input_device + '0x003c84fffe42032a': + friendly_name: livingroom/floorlamp_6 + '0x003c84fffe30130a': + friendly_name: livingroom/floorlamp_1 + '0x003c84fffee6b1ea': + friendly_name: livingroom/floorlamp_4 + '0x003c84fffe80de22': + friendly_name: livingroom/floorlamp_2 + '0x003c84fffee6aeb8': + friendly_name: livingroom/floorlamp_5 + '0x84b4dbfffef5c819': + friendly_name: livingroom/floorlamp_3 + '0x000b57fffed9e406': + friendly_name: sleep/main_light + '0x84fd27fffecdda65': + friendly_name: livingroom/powerplug_xmas-tree + '0x84fd27fffedc7e4d': + friendly_name: sleep/bed_light_ma + '0xcc86ecfffeb4d5bb': + friendly_name: stairway/motion_sensor_ff