]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Mar 2026 13:16:49 +0000 (14:16 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Mar 2026 13:16:49 +0000 (14:16 +0100)
.idea/workspace.xml
config/rooms.php
scripts/cron/cron.php
scripts/insteon.php [deleted file]
scripts/lib/automodes.php
scripts/lib/homeassistant.php
scripts/lib/scenes.php

index 7d373bfdf7eceda3ed3b0c6f338cc842ce40a4dd..b7b401fdf66ad5ace60a40438b8f9838672789a4 100644 (file)
@@ -6,16 +6,12 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/homeassistant_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/homeassistant_device_event.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/insteon.php" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/automodes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/automodes.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/homeassistant.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/homeassistant.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/nightmode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/nightmode.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/pop.php" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/wcvmc.php" beforeDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1774028822942" duration="792000" />
       <workItem from="1774430967346" duration="6359000" />
       <workItem from="1774441121722" duration="7518000" />
-      <workItem from="1774603188976" duration="327000" />
+      <workItem from="1774603188976" duration="4395000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="648" />
+    <option name="localTasksCounter" value="649" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index af7a520aeab821224a2d4aadac0fe448961dc443..7e94afc410bd641784f463a72d14566ea413a35c 100644 (file)
@@ -217,11 +217,6 @@ function cour()
 function balcon()
 {
     $favorites = [
-//        ['type' => 'light', 'scene' => 'cour/on', 'label' => 'Allumer'],
-//        ['type' => 'light', 'scene' => 'cour/off', 'label' => 'éteindre'],
-//        ['type' => 'separator', 'label' => 'Projecteurs'],
-//        ['type' => 'light', 'scene' => 'cour/projecteurs/on', 'label' => 'Allumer'],
-//        ['type' => 'light', 'scene' => 'cour/projecteurs/off', 'label' => 'éteindre'],
     ];
     $all = array_merge($favorites, [
 
index 05095306fd824e1e25003cd95ad0b1dd27abaac7..bc1552137654da58357389cfa87404a741682068 100644 (file)
@@ -72,9 +72,6 @@ function cronRooms($cronmin)
     _logSection('Chambre');
     updateChambreAuto();
 
-    _logSection('Cour');
-    updateCourAuto();
-
     _logSection('Salon');
     updateSalonAuto();
 
diff --git a/scripts/insteon.php b/scripts/insteon.php
deleted file mode 100644 (file)
index 8b7d727..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-require_once "import.php";
-header('Content-Type: text/plain');
-insteonCommand('0?113=I=0=0');
-insteonCommand('0?1121=I=0=0');
-insteonCommand('0?1132=I=0=0');
-insteonCommand('0?133=I=0=0');
-insteonCommand('0?1321=I=0=0');
-insteonCommand('0?1332=I=0=0');
index fbae4ddd5620e1df9d878411e308da87f00e6262..9618be6d52258df208c4ea6573c27de11cb3974a 100644 (file)
@@ -25,9 +25,6 @@ function autoRooms()
         if (getState('chambreAutoMode') == '1') {
             updateChambreAuto();
         }
-        if (getState('courAutoMode') == '1') {
-            updateCourAuto();
-        }
         if (getState('salonAutoMode') == '1') {
             updateSalonAuto();
         }
@@ -79,30 +76,6 @@ function updateCuisine()
     }
 }
 
-function updateCourAuto()
-{
-    if (!isAutoModeEnabled()) {
-        return;
-    }
-    $h = date('H');
-    if ($h >= 7 && $h <= 21) {
-        execScene('cour/projecteurs/off');
-    }
-    if (getState('courOff') == '1') {
-        execScene('cour/off');
-        return;
-    }
-    if (getState('courAutoMode') != '1') {
-        return;
-    }
-    if (isDay()) {
-        $scene = 'daylight';
-    } else {
-        $scene = 'lumineux';
-    }
-    execScene('cour/' . $scene);
-}
-
 function salonAuto($on = true)
 {
     if ($on) {
@@ -135,16 +108,6 @@ function bureauAuto($on = true)
     }
 }
 
-function courAuto($on = true)
-{
-    if ($on) {
-        setState('courAutoMode', '1');
-        updateCourAuto();
-    } else {
-        setState('courAutoMode', '0');
-    }
-}
-
 function updateSalonAuto()
 {
     if (!isAutoModeEnabled()) {
index 653bdd893f09cecd447d0eeef95ceb036dfd7fe6..ff0d812f8cf1af4ca76e844f18183e8843f7ae48 100644 (file)
@@ -10,7 +10,6 @@ const HA_ECO_BASIC = 'switch.ecomode_basic';
 const HA_ECO_SUPER = 'switch.ecomode_super';
 const HA_HOTTE = 'switch.hotte';
 const HA_BAR = 'switch.bar';
-const HA_GROW_LAMPS = 'switch.0x00124b0025e24358';
 
 const HA_OFFICE_CURTAIN = 'input_boolean.rideaux_bureau';
 const HA_OFFICE_SCREEN = 'cover.office_screen';
index bb293f2f6dd64a73d663693e338c67ae1bb9076b..aa2c9228ae7d8c137796328b9bf3abfb949f0299 100644 (file)
@@ -9,7 +9,6 @@ $salon = 3;
 $cuisine = 8;
 $bureau = 13;
 $sdb = 14;
-$cour = 11;
 
 $freebox = 19;
 
@@ -218,10 +217,8 @@ $scenes = [
         ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 20, 'hue' => 0, 'saturation' => 255, 'transitionTime' => 1)],
     ],
     'chambre/vincent/crepuscule' => [
-        // ['type' => 'insteon', 'command' => '3?0262261ED00F1300=I=3'],
         ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 60, 'hue' => '0', 'saturation' => 255, 'transitionTime' => 10)],
         ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => false, 'brightness' => 0, 'transitionTime' => 10 * 60)],
-        //['type' => 'insteon', 'command' => '3?0262261ED00F11FF=I=3'],
     ],
     'chambre/vincent/aube' => [
         ['type' => 'hue', 'light' => $litvincent, 'scene' => array('on' => true, 'brightness' => 0, 'hue' => '46920', 'saturation' => 255, 'transitionTime' => 0)],
@@ -302,17 +299,10 @@ $scenes = [
         ['type' => 'ha', 'device' => 'scene.salon_off'],
         ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)],
         ['type' => 'state', 'key' => 'salon', 'value' => 'off'],
-        //['type' => 'insteon', 'command' => '0?133=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
         ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)],
         ['type' => 'scene', 'scene' => 'salon/bar/off'],
     ],
-    'salon/cinemabase' => [
-
-        // ['type' => 'scene', 'scene' => 'cuisine/tamise'],
-        //        ['type' => 'ecomode', 'mode' => '0'],
-        // ['type' => 'insteon', 'command' => '0?1111=I=0=0'],
-    ],
     'salon/cineclub' => [
         ['type' => 'scene', 'scene' => 'salon/bar/off'],
         ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
@@ -344,7 +334,6 @@ $scenes = [
         ['type' => 'ecomode', 'mode' => '0'],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'xWNIeznSzek8dKS', 'repeat' => 2],
         ['type' => 'state', 'key' => 'salon', 'value' => 'theatre'],
-        // ['type' => 'insteon', 'command' => '0?1130=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.8]],
         ['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2],
     ],
@@ -353,7 +342,6 @@ $scenes = [
         ['type' => 'ha', 'device' => 'scene.salon_lecturenocturne'],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'HZiYyM6hMUMkmiY'],
         ['type' => 'state', 'key' => 'salon', 'value' => 'tamise'],
-        // ['type' => 'insteon', 'command' => '0?1113=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.25]],
         ['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2],
         ['type' => 'scene', 'scene' => 'salon/bar/off'],
@@ -571,9 +559,6 @@ $scenes = [
     'bureau/rideaux/toggle' => [
         ['type' => 'function', 'function' => 'bureauRideau', 'args' => ['toggle']],
     ],
-    'insteon/off' => [
-        // ['type' => 'insteon', 'command' => '0?135=I=0=0'],
-    ],
     'home/off' => [
         ['type' => 'scene', 'scene' => 'home/hueoff'],
         ['type' => 'ecomode', 'mode' => '2'],
@@ -687,30 +672,6 @@ $scenes = [
     'cuisine/coffee/off' => [
         ['type' => 'ha', 'device' => HA_COFFEE, 'command' => 'turn_off'],
     ],
-    'cour/auto' => [
-        ['type' => 'function', 'function' => 'courAuto', 'args' => [true]],
-    ],
-    'cour/daylight' => [
-        ['type' => 'ha', 'device' => 'scene.cour_daylight'],
-    ],
-    'cour/lumineux' => [
-        ['type' => 'ha', 'device' => 'scene.cour_light'],
-    ],
-    'cour/tropical' => [
-        ['type' => 'ha', 'device' => 'scene.cour_tropical'],
-    ],
-    'cour/grow' => [
-        ['type' => 'ha', 'device' => 'scene.cour_grow'],
-    ],
-    'cour/off' => [
-        ['type' => 'ha', 'device' => 'scene.cour_off'],
-    ],
-    'cour/projecteurs/on' => [
-        ['type' => 'ha', 'device' => HA_GROW_LAMPS],
-    ],
-    'cour/projecteurs/off' => [
-        ['type' => 'ha', 'device' => HA_GROW_LAMPS, 'command' => 'turn_off'],
-    ],
     'ecomode/basic' => [
         ['type' => 'ha', 'device' => HA_ECO_BASIC, 'command' => 'turn_off'],
     ],
@@ -765,7 +726,7 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
 
     $e = explode('/', $name);
 
-    $autoRooms = ['bureau', 'chambre', 'salon', 'cour'];
+    $autoRooms = ['bureau', 'chambre', 'salon'];
 
     if (in_array($e[0], $autoRooms) && count($e) == 2) {
         setState($e[0] . 'Off', $e[1] === 'off' ? '1' : '0');