initial commit for zigbee2mqtt ansible deployment
This commit is contained in:
parent
b17b0619ca
commit
4f5c34e95b
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
# Zigbee2MQTT repo rule
|
||||
config/configuration.yaml
|
||||
config/log
|
||||
|
||||
# ---> Linux
|
||||
*~
|
||||
|
||||
|
30
bin/c2r.py
Executable file
30
bin/c2r.py
Executable file
@ -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], "<src> <dst>")
|
||||
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://<mqtt_smarthome_hostname>', s, flags=re.MULTILINE)
|
||||
n = re.sub('^.*user: .*', ' user: <mqtt_smarthome_username>', n, flags=re.MULTILINE)
|
||||
n = re.sub('^.*password: .*', ' password: <mqtt_smarthome_password>', n, flags=re.MULTILINE)
|
||||
n = re.sub('^.*auth_token: .*', ' auth_token: <zigbee_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)
|
46
config/coordinator_backup.json
Normal file
46
config/coordinator_backup.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"metadata": {
|
||||
"format": "zigpy/open-coordinator-backup",
|
||||
"version": 1,
|
||||
"source": "zigbee-herdsman@0.14.83-hotfix.0",
|
||||
"internal": {
|
||||
"date": "2023-10-07T18:12:31.420Z",
|
||||
"ezspVersion": 8
|
||||
}
|
||||
},
|
||||
"stack_specific": {
|
||||
"ezsp": {
|
||||
"hashed_tclk": "4a833488e7c2b3b158939439e211dd07"
|
||||
}
|
||||
},
|
||||
"coordinator_ieee": "e0798dfffe8f943f",
|
||||
"pan_id": "1a62",
|
||||
"extended_pan_id": "dddddddddddddddd",
|
||||
"nwk_update_id": 0,
|
||||
"security_level": 5,
|
||||
"channel": 20,
|
||||
"channel_mask": [
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26
|
||||
],
|
||||
"network_key": {
|
||||
"key": "fa5f8cde589bee50a38c63f60bb52aba",
|
||||
"sequence_number": 0,
|
||||
"frame_counter": 2400085
|
||||
},
|
||||
"devices": []
|
||||
}
|
5
config/database.db
Normal file
5
config/database.db
Normal file
@ -0,0 +1,5 @@
|
||||
{"id":1,"type":"Coordinator","ieeeAddr":"0xe0798dfffe8f943f","nwkAddr":0,"manufId":0,"epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":48879,"inClusterList":[0,3,6,10,25,26,768],"outClusterList":[0,3,4,5,6,8,32,768,1024,1026,1029,1030,1280,2817,2819,2820,1794,4096,64513,64514],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"interviewCompleted":true,"meta":{},"lastSeen":1674656577828,"defaultSendRequestWhen":"immediate"}
|
||||
{"id":2,"type":"Router","ieeeAddr":"0x000b57fffedadf27","nwkAddr":58239,"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}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224","zclVersion":1,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696438822055,"defaultSendRequestWhen":"immediate"}
|
||||
{"id":3,"type":"Router","ieeeAddr":"0x943469fffea68993","nwkAddr":43056,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E27 WW 806lm","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":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E27 WW 806lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":3,"appVersion":32,"stackVersion":99,"hwVersion":2,"dateCode":"20181203","swBuildId":"2.3.050"}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":32,"stackVersion":99,"hwVersion":2,"dateCode":"20181203","swBuildId":"2.3.050","zclVersion":3,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696714159411,"defaultSendRequestWhen":"immediate"}
|
||||
{"id":4,"type":"Router","ieeeAddr":"0x000d6ffffe62221e","nwkAddr":62289,"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}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":18,"stackVersion":87,"hwVersion":1,"dateCode":"20200107","swBuildId":"1.2.224","zclVersion":1,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1696708661934,"defaultSendRequestWhen":"immediate"}
|
||||
{"id":5,"type":"EndDevice","ieeeAddr":"0x84ba20fffe82ed95","nwkAddr":14844,"manufId":4098,"manufName":"_TZE200_hhrtiq0x","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":"<22>J<EFBFBD>,\u0011","65506":31,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_hhrtiq0x","stackVersion":0,"appVersion":85,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":85,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1696780913825,"defaultSendRequestWhen":"immediate"}
|
48
config/state.json
Normal file
48
config/state.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"0x000d6ffffe62221e": {
|
||||
"color_mode": "color_temp",
|
||||
"state": "ON",
|
||||
"brightness": 77,
|
||||
"color_temp": 413,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 304235891,
|
||||
"latest_version": 304235891
|
||||
},
|
||||
"linkquality": 204
|
||||
},
|
||||
"0x000b57fffedadf27": {
|
||||
"color_mode": "color_temp",
|
||||
"state": "ON",
|
||||
"brightness": 26,
|
||||
"color_temp": 413.2,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 304235891,
|
||||
"latest_version": 304235891
|
||||
},
|
||||
"linkquality": 184
|
||||
},
|
||||
"0x943469fffea68993": {
|
||||
"brightness": 128,
|
||||
"state": "ON",
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 587531825,
|
||||
"latest_version": 587531825
|
||||
},
|
||||
"linkquality": 188
|
||||
},
|
||||
"0x84ba20fffe82ed95": {
|
||||
"preset": "manual",
|
||||
"away_mode": "OFF",
|
||||
"system_mode": "heat",
|
||||
"current_heating_setpoint": 23,
|
||||
"window_detection": "ON",
|
||||
"valve_detection": "ON",
|
||||
"child_lock": "UNLOCK",
|
||||
"local_temperature": 24.9,
|
||||
"battery": 5,
|
||||
"linkquality": 144
|
||||
}
|
||||
}
|
45
config_example/configuration.yaml
Normal file
45
config_example/configuration.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
homeassistant: false
|
||||
permit_join: false
|
||||
mqtt:
|
||||
base_topic: zigbee/ffw
|
||||
server: mqtt://<mqtt_smarthome_hostname>
|
||||
user: <mqtt_smarthome_username>
|
||||
password: <mqtt_smarthome_password>
|
||||
serial:
|
||||
port: /dev/ttyACM0
|
||||
advanced:
|
||||
network_key:
|
||||
- 179
|
||||
- 176
|
||||
- 181
|
||||
- 98
|
||||
- 2
|
||||
- 239
|
||||
- 245
|
||||
- 151
|
||||
- 75
|
||||
- 138
|
||||
- 221
|
||||
- 249
|
||||
- 179
|
||||
- 16
|
||||
- 209
|
||||
- 176
|
||||
ikea_ota_use_test_url: true
|
||||
legacy_api: false
|
||||
log_level: debug
|
||||
channel: 20
|
||||
frontend:
|
||||
port: 8038
|
||||
host: 0.0.0.0
|
||||
auth_token: <zigbee_auth_token>
|
||||
url: http://localhost
|
||||
devices:
|
||||
'0x000b57fffedadf27':
|
||||
friendly_name: julian/main_light
|
||||
'0x943469fffea68993':
|
||||
friendly_name: sleep/main_light
|
||||
'0x000d6ffffe62221e':
|
||||
friendly_name: livingroom/main_light
|
||||
'0x84ba20fffe82ed95':
|
||||
friendly_name: bath/heating_valve
|
Loading…
x
Reference in New Issue
Block a user