]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 16 Dec 2019 19:03:01 +0000 (20:03 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 16 Dec 2019 19:03:01 +0000 (20:03 +0100)
.idea/workspace.xml
config/bureau.php
scripts/lib/lib.php
scripts/lib/scenes.php
scripts/lib/squeezebox.php

index e07c80a8073480ec6539a9d016666ba2ec27d52b..a0a66468e5d3c4a1a03c78e6fe37cc7f4738780b 100644 (file)
@@ -2,9 +2,11 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change afterPath="$PROJECT_DIR$/scripts/backyard.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/lib/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.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" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1575646996012" duration="72000" />
       <workItem from="1575647085982" duration="668000" />
       <workItem from="1576479934693" duration="252000" />
-      <workItem from="1576480199671" duration="2743000" />
-    </task>
-    <task id="LOCAL-00204" summary=".">
-      <created>1566128716085</created>
-      <option name="number" value="00204" />
-      <option name="presentableId" value="LOCAL-00204" />
-      <option name="project" value="LOCAL" />
-      <updated>1566128716085</updated>
+      <workItem from="1576480199671" duration="3374000" />
+      <workItem from="1576522031507" duration="940000" />
     </task>
     <task id="LOCAL-00205" summary=".">
       <created>1566379769047</created>
       <option name="project" value="LOCAL" />
       <updated>1576492913476</updated>
     </task>
-    <option name="localTasksCounter" value="253" />
+    <task id="LOCAL-00253" summary=".">
+      <created>1576494269432</created>
+      <option name="number" value="00253" />
+      <option name="presentableId" value="LOCAL-00253" />
+      <option name="project" value="LOCAL" />
+      <updated>1576494269432</updated>
+    </task>
+    <option name="localTasksCounter" value="254" />
     <servers />
   </component>
   <component name="TodoView">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576493932196" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1576480418011">
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1576522032866">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576480418011" />
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576522032866" />
     <state x="976" y="257" width="607" height="526" key="find.popup" timestamp="1576492890263">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 97da623a57d81428fcb73a24ac8b758afdaba226..027ec8283d60247d5e4cf11e4ce7d8c88a372544 100644 (file)
@@ -4,26 +4,27 @@ config('ROOM', 'bureau');
 config('SQUEEZEBOX_PLAYER', 'Bureau');
 config('VIDEOPLAYER', 'mediarasp');
 config('VOLUME', 0);
+config('VOLUME_DEVICE', 'auto');
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'suncurve');
 config('SLEEPSCREEN', 15);
-config('VIDEOPLAYER_DEVICE','bureau');
-config('HIDEMASK_TIMEOUT',250);
+config('VIDEOPLAYER_DEVICE', 'bureau');
+config('HIDEMASK_TIMEOUT', 250);
 
 if (DISPLAYINTERFACE) {
-       $c = bureau();
-       $shortcuts['lights'] = $c['all'];
-       $favoriteslights = [
-               ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
-               ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
-       ];
-       $favoriteslights = array_merge($favoriteslights, $c['favorites']);
+    $c = bureau();
+    $shortcuts['lights'] = $c['all'];
+    $favoriteslights = [
+        ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+        ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+    ];
+    $favoriteslights = array_merge($favoriteslights, $c['favorites']);
 
-       include_once "remote.php";
-       include "default.php";
-       include ROOT . "/config/media.php";
+    include_once "remote.php";
+    include "default.php";
+    include ROOT . "/config/media.php";
 
-       $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
+    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
     <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
     <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
     <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
index a3e065c96e21dc5d13d0b94560c03758152671d6..6dbd4a1c0fa8878441281714c03192256db3cc31 100644 (file)
@@ -423,6 +423,7 @@ function volume($volume, $increase = '')
         $p = $e[0];
         if ($p == 'squeezebox') {
             $d = 'SqueezeboxPlayer';
+            $player = config('SQUEEZEBOX_PLAYER');
         } elseif ($p == 'raspberrycast') {
             $d = 'RaspberryCast';
         } elseif ($p == 'mediarasp') {
@@ -438,7 +439,7 @@ function volume($volume, $increase = '')
             $cmd = 'amixer -c 0 -M -- sset PCM playback ' . round(max(0, min(100, $volume))) . '%' . $increase;
             return sshCommand($cmd);
         case 'SqueezeboxPlayer':
-            return squeezeVolume($volume, $increase);
+            return squeezeVolume($volume, $increase, $player);
         case 'Harmony':
             if ($increase == '-') {
                 return harmonyRequest('commands/volume-down', 'POST');
index bb9a60e2a0f6307d94c6f066587f9c997a515767..e22ac0985f0ed9ebb3fcaa9b399106adaf8ed28f 100644 (file)
@@ -37,10 +37,10 @@ $scenes = [
         ['type' => 'ifttt', 'event' => 'coffee_on'],
     ],
     'chambre/deshumidificateur/on' => [
-
+        ['type' => 'domoticz', 'device' => '1063', 'command' => true, 'priority' => true],
     ],
     'chambre/deshumidificateur/off' => [
-
+        ['type' => 'domoticz', 'device' => '1063', 'command' => false, 'priority' => true],
     ],
     'chambre/raspberry/on' => [
         ['type' => 'insteon', 'command' => '0?1138=I=0=0'],
@@ -64,7 +64,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'bedbrightness', 'args' => [$bedlowscreenbrightness]],
         ['type' => 'scene', 'scene' => 'chambre/cheminee'],
         ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on
-//        ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/off'],
+        ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/off'],
         ['type' => 'scene', 'scene' => 'chambre/raspberry/off'],
         ['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Va Au Lit'],
     ],
@@ -464,7 +464,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'stopHarmony'],
         ['type' => 'function', 'function' => 'stopAllSqueezebox'],
         ['type' => 'function', 'function' => 'offAllOMX'],
-//        ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/on'],
+        ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/on'],
         ['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Stop All Sounds'],
         ['type' => 'scene', 'scene' => 'chambre/planetarium/off'],
         ['type' => 'ifttt', 'event' => 'coffee_off'],
index 8b86b47f39ad3660a3e1aaf2e60453afe6f915c5..81475bf01ea112e821a59554513b2a5341e24bf4 100644 (file)
@@ -128,7 +128,9 @@ function _player($player = null)
 
 function squeezeVolume($volume, $increase = '', $player = null)
 {
-    return squeezeRequest('mixer volume ' . $increase . max(0, min(100, intval($volume))), $player);
+    $cmd='mixer volume ' . $increase . max(0, min(100, intval($volume)));
+    echo $cmd;
+    return squeezeRequest($cmd, $player);
 }
 
 function isMacAddress($mac)