Initial data for ansible added
This commit is contained in:
parent
7bfc169b97
commit
f11a8f42c9
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,9 +1,6 @@
|
||||
# ---> Backup
|
||||
*.bak
|
||||
*.gho
|
||||
*.ori
|
||||
*.orig
|
||||
*.tmp
|
||||
# Zigbee2MQTT repo rule
|
||||
config/configuration.yaml
|
||||
config/log
|
||||
|
||||
# ---> Linux
|
||||
*~
|
||||
@ -20,3 +17,10 @@
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
# ---> Backup
|
||||
*.bak
|
||||
*.gho
|
||||
*.ori
|
||||
*.orig
|
||||
*.tmp
|
||||
|
||||
|
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://{{ smart_sat_zigbee2mqtt_hostname }}', s, flags=re.MULTILINE)
|
||||
n = re.sub('^.*user: .*', ' user: {{ smart_sat_zigbee2mqtt_username }}', n, flags=re.MULTILINE)
|
||||
n = re.sub('^.*password: .*', ' password: {{ smart_sat_zigbee2mqtt_password }}', n, flags=re.MULTILINE)
|
||||
n = re.sub('^.*auth_token: .*', ' auth_token: {{ smart_sat_zigbee2mqtt_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)
|
21
config_example/configuration.j2
Normal file
21
config_example/configuration.j2
Normal file
@ -0,0 +1,21 @@
|
||||
homeassistant: false
|
||||
permit_join: false
|
||||
mqtt:
|
||||
base_topic: zigbee_gfe
|
||||
server: mqtt://{{ smart_sat_zigbee2mqtt_hostname }}
|
||||
user: {{ smart_sat_zigbee2mqtt_username }}
|
||||
password: {{ smart_sat_zigbee2mqtt_password }}
|
||||
serial:
|
||||
port: /dev/ttyACM0
|
||||
advanced:
|
||||
network_key: GENERATE
|
||||
ikea_ota_use_test_url: true
|
||||
legacy_api: false
|
||||
channel: 25
|
||||
homeassistant_legacy_entity_attributes: false
|
||||
legacy_availability_payload: false
|
||||
frontend:
|
||||
port: 8038
|
||||
host: 0.0.0.0
|
||||
auth_token: {{ smart_sat_zigbee2mqtt_auth_token }}
|
||||
url: http://localhost
|
Loading…
x
Reference in New Issue
Block a user