]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Wed, 4 Sep 2019 07:52:55 +0000 (09:52 +0200)
committerVincent <vincent@enhydra.fr>
Wed, 4 Sep 2019 07:52:55 +0000 (09:52 +0200)
.idea/workspace.xml
scripts/cron/cron.php
scripts/lib/insteon.php
scripts/lib/medialibrary.php
scripts/transcode.php
servers/insteon.php

index f9d1b2d9fe19378f3617802da0f4da93a0f64c34..186da783b5fa5c7b5a9a2a06111bccd0c62b3c8c 100644 (file)
@@ -3,8 +3,11 @@
   <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$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/insteon.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/insteon.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/tools/pop/pop.py" beforeDir="false" afterPath="$PROJECT_DIR$/tools/pop/pop.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/transcode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/transcode.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/servers/insteon.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/insteon.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1567261528772" duration="609000" />
       <workItem from="1567408023339" duration="2511000" />
       <workItem from="1567413752073" duration="11664000" />
-    </task>
-    <task id="LOCAL-00173" summary=".">
-      <created>1551175350566</created>
-      <option name="number" value="00173" />
-      <option name="presentableId" value="LOCAL-00173" />
-      <option name="project" value="LOCAL" />
-      <updated>1551175350567</updated>
+      <workItem from="1567582030869" duration="1366000" />
     </task>
     <task id="LOCAL-00174" summary=".">
       <created>1551255018831</created>
       <option name="project" value="LOCAL" />
       <updated>1567499513044</updated>
     </task>
-    <option name="localTasksCounter" value="222" />
+    <task id="LOCAL-00222" summary=".">
+      <created>1567582046066</created>
+      <option name="number" value="00222" />
+      <option name="presentableId" value="LOCAL-00222" />
+      <option name="project" value="LOCAL" />
+      <updated>1567582046067</updated>
+    </task>
+    <option name="localTasksCounter" value="223" />
     <servers />
   </component>
   <component name="TodoView">
index 21f4d51e6b484e69713f33c97bd4f82e53f25927..8a6e7ca6737eb4049b8030cee612700b20c4e8f8 100644 (file)
@@ -6,6 +6,7 @@ function cronOneLoop($cronmin)
 {
     set_time_limit(0);
     cronRooms($cronmin);
+    cronInsteon($cronmin);
 
     if ($cronmin % 5 == 0) {
         cronTraffic($cronmin, false);
@@ -37,6 +38,10 @@ function cronOneLoop($cronmin)
     cronHeartbeat($cronmin);
 }
 
+function cronInsteon($cronmin){
+    insteonCommand('knock');
+}
+
 function cronEcoMode($cronmin)
 {
     if ($cronmin % 5 != 0) {
index 3912422c3f234eea7f4dc556a119c2615e3fc5d7..a213dbe2c98c31f344d4849906bffe928bd9258b 100644 (file)
@@ -26,7 +26,7 @@ function runInsteonCommand($command, $attempts = 3)
     insteonClearBuffer();
     echo "\n" . '-- Command ' . $command . ' attempt #' . $attempts . ' --' . "\n";
     echo "command : " . _insteonCommand($command) . "\n";
-    for ($i = 1; $i <= 5; $i++) {
+    for ($i = 1; $i <= 3; $i++) {
         usleep(1000000 * 0.1);
         $buff = insteonBuffer();
         echo $buff . "\n";
index fc87d22969dbc7d7730eb92a4c5b5113442ee01d..79dbd715adc8c004927050e89490e180054e260f 100644 (file)
@@ -132,6 +132,8 @@ function transcodeOneVideo()
             continue;
         }
 
+        set_time_limit(0);
+        ignore_user_abort(true);
         $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension();
         print_r(sshCommand($cmd, 'avion'));
         return;
index 1b2d9461c5220c4954a414df57020c64c236158a..1f958edfa833d89ce6799615a9492a42f2288b2a 100644 (file)
@@ -1,3 +1,4 @@
 <?php
 require_once 'import.php';
+
 transcodeOneVideo();
\ No newline at end of file
index 0bef892b8d04b42f4c170dacde37fef8cf3af047..6693af9c90c597f30aa54651632a5da9f214c311 100644 (file)
@@ -38,6 +38,10 @@ function handleInsteonQueue()
         $command = array_shift($queue);
         $redis->igbset('insteon_queue', $queue);
         echo 'Run command ' . $command . "\n";
+        if ($command == 'knock') {
+            insteonKnock();
+            continue;
+        }
         runInsteonCommand($command);
         usleep(1000000 * 0.5);
     }