]> _ Git - tortuga-home.git/commitdiff
.
authorvincent <vincent@enhydra.fr>
Sat, 18 Dec 2021 14:33:01 +0000 (15:33 +0100)
committervincent <vincent@enhydra.fr>
Sat, 18 Dec 2021 14:33:01 +0000 (15:33 +0100)
.idea/workspace.xml
scripts/lib/scenes.php
scripts/lib/wol.php
scripts/wcvmc.php [new file with mode: 0644]

index 72f4855ca83a74b20485dcba769265ec6f5b85b8..b702e1076808c886ff98bc6483c4db49aaa89930 100644 (file)
@@ -2,9 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change afterPath="$PROJECT_DIR$/scripts/wcvmc.php" afterDir="false" />
       <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/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.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/wol.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/wol.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1622787397330" duration="3950000" />
       <workItem from="1638959846647" duration="5250000" />
       <workItem from="1638973361360" duration="1389000" />
-      <workItem from="1639125380760" duration="7763000" />
-    </task>
-    <task id="LOCAL-00444" summary=".">
-      <created>1612025352669</created>
-      <option name="number" value="00444" />
-      <option name="presentableId" value="LOCAL-00444" />
-      <option name="project" value="LOCAL" />
-      <updated>1612025352669</updated>
+      <workItem from="1639125380760" duration="7979000" />
+      <workItem from="1639836343662" duration="1578000" />
     </task>
     <task id="LOCAL-00445" summary=".">
       <created>1612123146249</created>
       <option name="project" value="LOCAL" />
       <updated>1639205467698</updated>
     </task>
-    <option name="localTasksCounter" value="493" />
+    <task id="LOCAL-00493" summary=".">
+      <created>1639302540066</created>
+      <option name="number" value="00493" />
+      <option name="presentableId" value="LOCAL-00493" />
+      <option name="project" value="LOCAL" />
+      <updated>1639302540067</updated>
+    </task>
+    <option name="localTasksCounter" value="494" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index e513067f2be4cee7f883f06b46fe97dd61bee9ad..d48b855584526b31884e6e7328695cad921db956 100644 (file)
@@ -1213,6 +1213,8 @@ function checkWCVMC()
 {
     $offtime = getState('wcVMCOff', -1);
     $time = time();
+    echo 'on : ' . getState('lastVMCOn') . '<br>';
+    echo 'off : ' . $offtime . '<br>now :  ' . $time . ' ';
     if ($offtime == -1 || $offtime > $time || getState('lastVMCOn') > $offtime) {
         return;
     }
@@ -1238,7 +1240,7 @@ function alert()
     if (getNightMode()) {
         return;
     }
-    
+
     execScene('home/doalert');
 
     $rep = 1 * 2;
index c5fbd81a89b6e8c67240b2d6b73b9e89c0d2035b..97c207e79f40f3c2b849a6a358f78e4ae8a1ee5a 100644 (file)
@@ -7,5 +7,10 @@ function wol($device)
     $mac = $devices[$device]['mac'];
     `wakeonlan -i $ip $mac`;
 
-    freeboxWOL($mac);
+    try {
+        freeboxWOL($mac);
+    }catch (Exception $e){
+
+    }
+
 }
\ No newline at end of file
diff --git a/scripts/wcvmc.php b/scripts/wcvmc.php
new file mode 100644 (file)
index 0000000..6450f2e
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+include "import.php";
+checkWCVMC();
\ No newline at end of file