ctucx.git: nixfiles

ctucx' nixfiles

commit 803906f0b85f64235e5172bfadf21368dcb3ec59
parent 23778e5a67e6074252b33d2d3231ef5090dccc92
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 1 Feb 2022 11:31:13 +0100

machines/lollo/smarthome: add new smartplug, update links in webapp
2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/machines/lollo/smarthome/smartied.nix b/machines/lollo/smarthome/smartied.nix
@@ -124,9 +124,14 @@ let
         deviceName = "ikea_control_outlet_l_bed";
       };
 
-      "tradfri-co-i-desk" = {
+      "tradfri-co-i-desk-l" = {
         type       = "Zigbee2MqttRelay";
-        deviceName = "ikea_control_outlet_i_desk";
+        deviceName = "ikea_control_outlet_i_desk_l";
+      };
+
+      "tradfri-co-i-desk-r" = {
+        type       = "Zigbee2MqttRelay";
+        deviceName = "ikea_control_outlet_i_desk_r";
       };
 
       "tradfri-button-l-desk" = {

@@ -207,8 +212,13 @@ let
                 relay  = 0;
               }
               {
-                name   = "Desk";
-                device = "tradfri-co-i-desk";
+                name   = "Desk (L)";
+                device = "tradfri-co-i-desk-l";
+                relay  = 0;
+              }
+              {
+                name   = "Desk (R)";
+                device = "tradfri-co-i-desk-r";
                 relay  = 0;
               }
             ];

@@ -291,14 +301,14 @@ let
             name        = "Grafana-Dashboard";
             icon        = "multiline_chart";
             type        = "redirect";
-            destination = "https://grafana.ctu.cx";
+            destination = "https://grafana.ctu.cx/d/FRDYqjEGz/smarthome-influx";
           }
           {
-            url         = "fahrrad";
-            name        = "Fahrradkarte";
-            icon        = "directions_bike";
+            url         = "zigbee2mqtt";
+            name        = "Zigbee2MQTT Dashboard";
+            icon        = "home";
             type        = "redirect";
-            destination = "https://www.nextbike.de/de/kielregion/";
+            destination = "http://10.0.0.1:8422/#/dashboard";
           }
           {
             url        = "settings";
diff --git a/machines/lollo/smarthome/zigbee2mqtt.nix b/machines/lollo/smarthome/zigbee2mqtt.nix
@@ -78,7 +78,9 @@ in {
           "0x0c4314fffe194a18".friendly_name = "ikea_remote_hallway";
           "0x0c4314fffe194ca3".friendly_name = "ikea_remote_i_desk";
 
-          "0xcc86ecfffe8bf621".friendly_name = "ikea_control_outlet_i_desk";
+          "0xcc86ecfffe8bf621".friendly_name = "ikea_control_outlet_i_desk_r";
+          "0x588e81fffebcdc1e".friendly_name = "ikea_control_outlet_i_desk_l";
+
           "0xec1bbdfffeca67bb".friendly_name = "ikea_control_outlet_l_bed";
 
           "0x847127fffecd89b6".friendly_name = "ikea_motionsensor";

@@ -137,7 +139,8 @@ in {
             transition    = 2;
             optimistic    = true;
             devices = [
-              "ikea_control_outlet_i_desk"
+              "ikea_control_outlet_i_desk_r"
+              "ikea_control_outlet_i_desk_l"
             ];
           };
         };