]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 27 Mar 2021 09:35:40 +0000 (10:35 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 27 Mar 2021 09:35:40 +0000 (10:35 +0100)
.idea/workspace.xml
scripts/lib/denon.php
scripts/lib/kodi.php
scripts/lib/scenes.php

index 8a2c9627a2bc59f46fdec1d5d377a6985707ebcd..5d1b19d9432bb76ed155b172ef86fcdf27e93cd3 100644 (file)
@@ -3,6 +3,8 @@
   <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/lib/denon.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/denon.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/kodi.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/kodi.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1615272627869" duration="1428000" />
       <workItem from="1615664533256" duration="84000" />
       <workItem from="1615664973136" duration="697000" />
-      <workItem from="1615881847886" duration="1197000" />
-    </task>
-    <task id="LOCAL-00409" summary=".">
-      <created>1606050006824</created>
-      <option name="number" value="00409" />
-      <option name="presentableId" value="LOCAL-00409" />
-      <option name="project" value="LOCAL" />
-      <updated>1606050006824</updated>
+      <workItem from="1615881847886" duration="1242000" />
+      <workItem from="1616096372227" duration="1452000" />
+      <workItem from="1616413943061" duration="808000" />
+      <workItem from="1616750847432" duration="1134000" />
     </task>
     <task id="LOCAL-00410" summary=".">
       <created>1606074001062</created>
       <option name="project" value="LOCAL" />
       <updated>1615881926506</updated>
     </task>
-    <option name="localTasksCounter" value="458" />
+    <task id="LOCAL-00458" summary=".">
+      <created>1615883286918</created>
+      <option name="number" value="00458" />
+      <option name="presentableId" value="LOCAL-00458" />
+      <option name="project" value="LOCAL" />
+      <updated>1615883286918</updated>
+    </task>
+    <option name="localTasksCounter" value="459" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index f1d86431c80a81ad1bff819edbf3babd1080bdd7..0136cf6a3b90ce5c0cef6d6225dc1c4232ea6b3c 100644 (file)
@@ -56,11 +56,11 @@ function denonAVRInput($input)
         usleep(1000000 * 0.5);
     }
 
-//    $volumes = ['Media Player' => 60, 'HEOS Music' => 50, 'CD' => 30, 'AUX' => 26];
-//    if (isset($volumes[$input])) {
-//        denonAVRVolume($volumes[$input], '');
-//        usleep(1000000 * 0.5);
-//    }
+    $volumes = ['Media Player' => 60, 'HEOS Music' => 50, 'CD' => 30, 'AUX' => 26];
+    if (isset($volumes[$input])) {
+        denonAVRVolume($volumes[$input], '');
+        usleep(1000000 * 0.5);
+    }
 
     //denonAVRSetSpeakerPreset(1);
 }
index 894073ce6e533f6ecf682a3bcb0ca666cf8fc026..595e0d0b7fdffc232d74973abfc5d54e0ba8f19d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 function getKodiDBConnection()
 {
-    return mysqli_connect('localhost', "kodi", "atacama", "MyVideos116");
+    return mysqli_connect('localhost', "kodi", "atacama", "MyVideos119");
 }
 
 function kodiSyncPlayedStatus()
index 54cf5b4509cf8c299a88d2d5f51941442717af26..eeb954f1fda5f20d164c960fac11ae14273b95ca 100644 (file)
@@ -384,7 +384,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
     ],
     'salon/media/off' => [
-        ['type' => 'function', 'function' => 'off','args'=> ['salon']],
+        ['type' => 'function', 'function' => 'off', 'args' => ['salon']],
     ],
     'salon/media/play' => [
 
@@ -555,13 +555,13 @@ $scenes = [
     'bureau/base/off' => [
         ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]],
         ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'],
+        ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'],
         ['type' => 'scene', 'scene' => 'bureau/sleeppc'],
     ],
     'bureau/off' => [
         ['type' => 'scene', 'scene' => 'bureau/base/off'],
         ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false, 'brightness' => 0)],
-        ['type' => 'domoticz', 'scene' => 41, 'command' => false, 'priority' => true],
-
+        ['type' => 'domoticz', 'scene' => 42, 'command' => false, 'priority' => true],
     ],
     'bureau/sound/on' => [
         ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => true, 'priority' => true],
@@ -609,7 +609,7 @@ $scenes = [
     'home/off' => [
         ['type' => 'scene', 'scene' => 'home/hueoff'],
         ['type' => 'ecomode', 'mode' => '2'],
-        ['type' => 'scene', 'scene' => 'cuisine/off'],
+        //['type' => 'scene', 'scene' => 'cuisine/off'],
         ['type' => 'scene', 'scene' => 'salon/off'],
         ['type' => 'scene', 'scene' => 'cour/off'],
         ['type' => 'scene', 'scene' => 'bureau/off'],
@@ -1138,14 +1138,12 @@ function wcVMCOff($timeout = 'auto')
 {
     if ($timeout === 'auto') {
         $d = time() - getState('lastVMCOn');
-        if ($d <= 60) {
-            $timeout = 0;
-        } else if ($d > 60 && $d <= 120) {
-            $timeout = 60;
+        if ($d <= 120) {
+            $timeout = 600;
         } else if ($d > 120 && $d <= 300) {
-            $timeout = 300;
+            $timeout = 900;
         } else {
-            $timeout = 600;
+            $timeout = 1200;
         }
     }
     $t = time() + $timeout;