]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 7 Mar 2020 07:53:52 +0000 (08:53 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 7 Mar 2020 07:53:52 +0000 (08:53 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/lib/ecomode.php

index 0387568c8572ed13b5c329bcd6cd331078f0220b..c09de2fbb8e78b0b93c4dcb6141a189000e564e3 100644 (file)
@@ -4,10 +4,7 @@
     <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$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.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/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.less" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1583062693000" duration="3344000" />
       <workItem from="1583265992507" duration="1990000" />
       <workItem from="1583403852883" duration="5927000" />
-    </task>
-    <task id="LOCAL-00262" summary=".">
-      <created>1578036926863</created>
-      <option name="number" value="00262" />
-      <option name="presentableId" value="LOCAL-00262" />
-      <option name="project" value="LOCAL" />
-      <updated>1578036926863</updated>
+      <workItem from="1583566881341" duration="609000" />
     </task>
     <task id="LOCAL-00263" summary=".">
       <created>1578039845044</created>
       <option name="project" value="LOCAL" />
       <updated>1583413557786</updated>
     </task>
-    <option name="localTasksCounter" value="311" />
+    <task id="LOCAL-00311" summary=".">
+      <created>1583566913948</created>
+      <option name="number" value="00311" />
+      <option name="presentableId" value="LOCAL-00311" />
+      <option name="project" value="LOCAL" />
+      <updated>1583566913949</updated>
+    </task>
+    <option name="localTasksCounter" value="312" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583062669525" />
-    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1583486400909">
+    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1583566907024">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" width="1170" height="972" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1582220569877" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1583486400909" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1583566907024" />
     <state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1582201881167" />
     <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583566899074" />
-    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1583064009120">
+    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1583567602832">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="257" width="607" height="536" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1577380471547" />
     <state x="733" y="287" width="607" height="598" key="find.popup/0.0.1920.1160@0.0.1920.1160" timestamp="1582125776502" />
-    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1583064009120" />
+    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1583567602832" />
     <state x="936" y="240" key="run.anything.popup" timestamp="1578386519646">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 784af83ef16397cc5f3be17df63b6a3c866d5387..e5047a98661a3bd6cf566bd28b9c287c7ce63227 100644 (file)
@@ -32,9 +32,9 @@ function cronOneLoop($cronmin)
         cronXPlanet($cronmin);
         cronPodcasts($cronmin);
     }
-    cronEcoMode($cronmin);
-//include "flight.php";
-    //cronFlowerPower($cronmin);
+    if ($cronmin == 0) {
+        cronEcoMode($cronmin);
+    }
     if ($cronmin % 5 == 0) {
         cronTranscode($cronmin);
     }
@@ -62,9 +62,6 @@ function cronInsteon($cronmin)
 
 function cronEcoMode($cronmin)
 {
-    if ($cronmin !== 0) {
-        return;
-    }
     $ecomode = (int)getEcoMode();
     $scenes = [0 => 'off', 1 => 'on', 2 => 'super'];
     execScene('ecomode/' . $scenes[$ecomode]);
@@ -120,12 +117,6 @@ function cronTmdb($cronmin)
     parseMoviesLibrary();
 }
 
-function cronFlowerPower($cronmin)
-{
-    return;
-    getFlowerPowerData();
-}
-
 function cronPing($cronmin)
 {
     global $devices;
@@ -358,7 +349,7 @@ function cronHeartbeat($cronmin)
     if ($cronmin % 5 != 0) {
         return;
     }
-    $devices = ['entree', 'sdb', 'litvincent', 'litjerome', 'bureausun'];
+    $devices = ['entree', 'sdb', 'litvincent', 'litjerome', 'bureausun','chambre'];
     foreach ($devices as $device) {
         if (isAlive($device) === 0) {
             sshCommand('/bin/echo "/usr/local/bin/tortugahome" | /usr/bin/at now', $device, false);
index 14a8ca5f17850e7daeab5d7815a3773dfeb1640e..202e1d49524fac3a0f71b46db704bad369241a78 100644 (file)
@@ -5,13 +5,8 @@ function ecoMode($mode)
 
     setState('ecomode', $mode);
     $mode = getEcoMode();
-    if ($mode == '2') {
-        execScene('ecomode/super');
-    } else if ($mode == '1') {
-        execScene('ecomode/on');
-    } else {
-        execScene('ecomode/off');
-    }
+    $scenes = [0 => 'off', 1 => 'on', 2 => 'super'];
+    execScene('ecomode/' . $scenes[$mode]);
 
 //    $server = new \Hoa\Eventsource\Server();
 //    $server->ecomode->send($mode);