]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Thu, 5 Mar 2020 13:05:56 +0000 (14:05 +0100)
committerVincent <vincent@enhydra.fr>
Thu, 5 Mar 2020 13:05:56 +0000 (14:05 +0100)
.idea/workspace.xml
config/bureau.php
config/bureausun.php
scripts/lib/lib.php
scripts/lib/scenes.php

index 199a50295f8d511006cf6c4287b1a51ff6c6df36..6055e7e5aebf1179383782027f0b38fa7122d952 100644 (file)
@@ -3,7 +3,10 @@
   <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/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/bureausun.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureausun.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.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" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1582798438958" duration="2008000" />
       <workItem from="1583062665588" duration="7000" />
       <workItem from="1583062693000" duration="3344000" />
-      <workItem from="1583265992507" duration="662000" />
-    </task>
-    <task id="LOCAL-00260" summary=".">
-      <created>1577786536734</created>
-      <option name="number" value="00260" />
-      <option name="presentableId" value="LOCAL-00260" />
-      <option name="project" value="LOCAL" />
-      <updated>1577786536735</updated>
+      <workItem from="1583265992507" duration="1990000" />
+      <workItem from="1583403852883" duration="2592000" />
     </task>
     <task id="LOCAL-00261" summary=".">
       <created>1577787688220</created>
       <option name="project" value="LOCAL" />
       <updated>1583065717347</updated>
     </task>
-    <option name="localTasksCounter" value="309" />
+    <task id="LOCAL-00309" summary=".">
+      <created>1583309116308</created>
+      <option name="number" value="00309" />
+      <option name="presentableId" value="LOCAL-00309" />
+      <option name="project" value="LOCAL" />
+      <updated>1583309116308</updated>
+    </task>
+    <option name="localTasksCounter" value="310" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1582798634411" />
-    <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1583309081650">
+    <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1583403854097">
       <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="1583309081650" />
+    <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583403854097" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1583064009120">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 027ec8283d60247d5e4cf11e4ce7d8c88a372544..601e5d072f5d516ebe24be8146918ee28b3391e1 100644 (file)
@@ -4,7 +4,7 @@ config('ROOM', 'bureau');
 config('SQUEEZEBOX_PLAYER', 'Bureau');
 config('VIDEOPLAYER', 'mediarasp');
 config('VOLUME', 0);
-config('VOLUME_DEVICE', 'auto');
+config('VOLUME_DEVICE', 'RaspberryPi');
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'suncurve');
 config('SLEEPSCREEN', 15);
index 75e2210973561533055e7e7f273707368659afed..35e677b34292e4317223b8cb8a66ebf7e80622d5 100644 (file)
@@ -1,4 +1,5 @@
 <?php
 include "bureau.php";
-config('VIDEOPLAYER_DEVICE','bureau');
-config('HIDEMASK_TIMEOUT',750);
\ No newline at end of file
+config('VIDEOPLAYER_DEVICE', 'bureau');
+config('HIDEMASK_TIMEOUT', 750);
+config('VOLUME_DEVICE', 'RaspberryPi:bureau');
\ No newline at end of file
index 2575b07017e5c16a9bab7d1b25fe21c092468b03..ef29f150c021349cfa1c83623995f71d8e14cfb6 100644 (file)
@@ -417,25 +417,11 @@ function volume($volume, $increase = '')
         $increase = '+';
     }
 
-    $device = config('DEVICE');
-    if ($d == 'auto') {
-        $playing = getPlaying();
-        $e = explode(':', $playing);
-        $p = $e[0];
-        if ($p == 'squeezebox') {
-            $d = 'SqueezeboxPlayer';
-            $player = config('SQUEEZEBOX_PLAYER');
-        } elseif ($p == 'mediarasp') {
-            $d = 'VLC';
-        }
-    }
-
-    echo $device . ' (' . $p . ') : ' . $d;
-
     $e = explode(':', $d);
-    $rpiDevice = null;
+
+    $device = config('DEVICE');
     if (isset($e[1])) {
-        $rpiDevice = $e[1];
+        $device = $e[1];
         $d = $e[0];
     }
 
@@ -443,9 +429,9 @@ function volume($volume, $increase = '')
         case 'Raspberry':
         case 'RaspberryPi':
             $cmd = 'amixer -c 0 -M -- sset PCM playback ' . round(max(0, min(100, $volume))) . '%' . $increase;
-            return sshCommand($cmd, $rpiDevice);
+            return sshCommand($cmd, $device);
         case 'SqueezeboxPlayer':
-            return squeezeVolume($volume, $increase, $player);
+            return squeezeVolume($volume, $increase, config('SQUEEZEBOX_PLAYER'));
         case 'Harmony':
             if ($increase == '-') {
                 return harmonyRequest('commands/volume-down', 'POST');
index 53305d7f099959bad5646ac2697bf1284967e4a7..d3ff37171f63b76b0b0fd8bcbe6ab2d0782580a1 100644 (file)
@@ -291,13 +291,16 @@ $scenes = [
         ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO'],
         ['type' => 'insteon', 'command' => '0?113=I=0=0'],
         ['type' => 'scene', 'scene' => 'salon/cheminee', 'delay' => 1],
+        ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO'],
     ],
     'salon/off' => [
         ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false, 'brightness' => 0)],
         ['type' => 'insteon', 'command' => '0?133=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
+        ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false, 'brightness' => 0)],
     ],
     'salon/cinema' => [
+        ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35'],
         ['type' => 'ecomode', 'mode' => '0'],
         ['type' => 'insteon', 'command' => '0?1111=I=0=0'],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35'],
@@ -307,11 +310,13 @@ $scenes = [
         ['type' => 'hue', 'group' => $salon, 'scene' => 'RbjnIcLtcDuHbfU'],
         ['type' => 'insteon', 'command' => '0?1130=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.8]],
+        ['type' => 'hue', 'group' => $salon, 'scene' => 'RbjnIcLtcDuHbfU'],
     ],
     'salon/lecturenocture' => [
         ['type' => 'hue', 'group' => $salon, 'scene' => 'HZiYyM6hMUMkmiY'],
         ['type' => 'insteon', 'command' => '0?1113=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 0.25]],
+        ['type' => 'hue', 'group' => $salon, 'scene' => 'HZiYyM6hMUMkmiY'],
     ],
     'salon/cheminee' => [
         ['type' => 'function', 'function' => 'chemineeOn', 'args' => ['salon', 'fire', 1]],
@@ -511,10 +516,10 @@ $scenes = [
         ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 65]],
     ],
     'sdb/ampli/on' => [
-        ['type' => 'domoticz', 'device' => '477', 'command' => true, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1438', 'command' => true, 'priority' => true],
     ],
     'sdb/ampli/off' => [
-        ['type' => 'domoticz', 'device' => '477', 'command' => false, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1438', 'command' => false, 'priority' => true],
     ],
     'sdb/off' => [
         ['type' => 'state', 'key' => 'sdb', 'value' => 0],
@@ -542,10 +547,10 @@ $scenes = [
         ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['Salle de bains'], 65]],
     ],
     'salon/freebox/on' => [
-        ['type' => 'domoticz', 'device' => '478', 'command' => true, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1439', 'command' => true, 'priority' => true],
     ],
     'salon/freebox/off' => [
-        ['type' => 'domoticz', 'device' => '478', 'command' => false, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1439', 'command' => false, 'priority' => true],
     ],
     'ecomode/basic' => [
         ['type' => 'scene', 'scene' => 'salon/freebox/off'],
@@ -713,7 +718,7 @@ function wcOn($vmc = true)
     }
 }
 
-function planetarium($on)0
+function planetarium($on)
 {
     setState('planetarium', $on ? '1' : '0');
     checkPlanetarium(false);