ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit d79c3720d450b5d7ec0d810d841741955475843a
parent 73bca854a0f76fdd49f9f6a0ca9916ea336e4f0d
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 20 Feb 2021 22:48:05 +0100

lollo/smartied: update config
1 file changed, 81 insertions(+), 24 deletions(-)
M
config-files/smartied/config.json
|
105
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
diff --git a/config-files/smartied/config.json b/config-files/smartied/config.json
@@ -3,9 +3,15 @@
 		"modbus-10": {
 			"type": "RelayBoard",
 			"firstRegister": 0,
-			"count": 8,
+			"count": 4,
 			"address": 10
 		},
+		"modbus-20": {
+			"type": "RelayBoard",
+			"firstRegister": 0,
+			"count": 4,
+			"address": 20
+		},
 		"modbus-50": {
 			"type": "PowerMeter",
 			"model": "SDM120",

@@ -16,20 +22,53 @@
 			"model": "SDM120",
 			"address": 60
 		},
+		"tradfri-lamp1": {
+			"type": "Zigbee2MqttLamp",
+			"lampType": "RGB",
+			"deviceName": "ikea_lamp_rgb"
+		},
+		"tradfri-lamp2": {
+			"type": "Zigbee2MqttLamp",
+			"lampType": "WhiteSpectrum",
+			"deviceName": "ikea_lamp_whitespectrum"
+		},
+		"tradfri-lamp3": {
+			"type": "Zigbee2MqttLamp",
+			"lampType": "Switchable",
+			"deviceName": "ikea_lamp_switchable"
+		},
+		"tradfri-relay1": {
+			"type": "Zigbee2MqttRelay",
+			"deviceName": "ikea_control_outlet"
+		},
+		"tradfri-remote1": {
+			"type": "Zigbee2MqttRemote",
+			"deviceName": "ikea_remote",
+			"actions": {
+				"toggle": {"type": "SwitchStateAction", "deviceName": "modbus-10", "relay": 0, "toggle": true},
+				"toggle_hold": {"type": "SwitchStateAction", "deviceName": "modbus-10", "relay": 2, "toggle": true},
+				"arrow_left_click": {"type": "SwitchStateAction", "deviceName": "modbus-10", "relay": 1, "toggle": true},
+				"arrow_right_click": {"type": "SwitchStateAction", "deviceName": "modbus-10", "relay": 3, "toggle": true},
+				"brightness_up_click": {"type": "SwitchStateAction", "deviceName": "modbus-20", "relay": 0, "toggle": true},
+				"brightness_down_click": {"type": "SwitchStateAction", "deviceName": "modbus-20", "relay": 2, "toggle": true},
+				"brightness_down_hold": {"type": "SwitchStateAction", "deviceName": "modbus-20", "relay": 3, "toggle": true}
+			}
+		},
 		"lacrosse-raum": {
 			"type": "LacrosseTempSensor",
-			"id": "5",
-			"address": 5
+			"id": "21"
+		},
+		"lacrosse-kuehlschrank": {
+			"type": "LacrosseTempSensor",
+			"id": "3a"
 		},
 		"lacrosse-draussen": {
 			"type": "LacrosseTempSensor",
-			"id": "31",
-			"address": 31
+			"id": "26"
 		},
 		"lacrosse-bad": {
 			"type": "LacrosseTempSensor",
-			"id": "3f",
-			"address": 42
+			"id": "3f"
 		}
 	},
 	"clientConfigs": {

@@ -41,11 +80,14 @@
 					"icon": "lightbulb",
 					"type": "switches",
 					"switches": [
-						{ "name": "Decke", "device": "modbus-10", "relay": 0 },
-						{ "name": "Bett", "device": "modbus-10", "relay": 1 },
-						{ "name": "Küche", "device": "modbus-10", "relay": 2 },
-						{ "name": "Regal", "device": "modbus-10", "relay": 7 },
-						{ "name": "Bad", "device": "modbus-10", "relay": 3 }
+						{ "name": "Decke (abgedunkelt)", "device": "modbus-10", "relay": 0 },
+						{ "name": "Decke", "device": "modbus-10", "relay": 2 },
+						{ "name": "Küche", "device": "modbus-10", "relay": 1 },
+						{ "name": "Bett", "device": "modbus-10", "relay": 3 },
+						{ "name": "Bad", "device": "modbus-20", "relay": 0 },
+						{ "name": "Decke: RGB", "device": "tradfri-lamp1", "relay": 0 },
+						{ "name": "Decke: Weiß-Spektrum", "device": "tradfri-lamp2", "relay": 0 },
+						{ "name": "Decke: Schaltbar", "device": "tradfri-lamp3", "relay": 0 }
 					]
 				},
 				{

@@ -54,8 +96,9 @@
 					"icon": "power_settings_new",
 					"type": "switches",
 					"switches": [
-                                                { "name": "Bett-Monitor", "device": "modbus-10", "relay": 5 },
-						{ "name": "Verstärker", "device": "modbus-10", "relay": 6 }
+                        { "name": "Lüfter", "device": "modbus-20", "relay": 3 },
+						{ "name": "Lüfter (leise)", "device": "modbus-20", "relay": 2 },
+						{ "name": "Tradfri Steckdose", "device": "tradfri-relay1", "relay": 0 },
 					]
 				},
 				{

@@ -74,6 +117,7 @@
 					"icon": "brightness_7",
 					"type": "temperature",
 					"sensors": [
+						{ "name": "Kühlschrank", "device": "lacrosse-kuehlschrank" },
 						{ "name": "Raum", "device": "lacrosse-raum" },
 						{ "name": "Bad", "device": "lacrosse-bad" },
 						{ "name": "Draussen", "device": "lacrosse-draussen" }

@@ -103,14 +147,27 @@
 			]
 		}
 	},
-	"httpPort": 5000,
-	"tcpPort": 5001,
-	"wsPort": 5002,
-	"prometheusPort": 5003,
-	"modbusAddr": "10.0.0.1",
-	"modbusPort": 502,
-	"lacrosseAddr": "10.0.0.1",
-	"lacrossePort": 2342,
-	"powermeterUpdateIntervalSec": 20,
-	"accessToken": "penis123"
+	"serverConfig": {
+		"frontendPort": 5000,
+		"modbus": {
+			"host": "10.0.0.1",
+			"port": 502
+		},
+		"mqtt": {
+			"host": "10.0.0.1",
+			"port": 1883
+		},
+		"lacrosse": {
+			"host": "10.0.0.1",
+			"port": 2342
+		},
+		"influx": {
+			"host": "10.0.0.1",
+			"port": 8086,
+			"powermetersDatabase": "powermeters",
+			"sensorsDatabase": "sensors"
+		},
+		"powermeterUpdateIntervalSec": 20,
+		"accessToken": "penis123"
+	}
 }