From: Vincent Date: Mon, 16 Dec 2019 19:03:01 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=07c7d3c25dc5869dddce28373552a4f41cabcf1b;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e07c80a..a0a6646 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,11 @@ - - + + + + @@ -1183,11 +1186,11 @@ - + - + diff --git a/config/bureau.php b/config/bureau.php index 97da623..027ec82 100644 --- a/config/bureau.php +++ b/config/bureau.php @@ -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' => ''], - ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => ''], - ]; - $favoriteslights = array_merge($favoriteslights, $c['favorites']); + $c = bureau(); + $shortcuts['lights'] = $c['all']; + $favoriteslights = [ + ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => ''], + ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => ''], + ]; + $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 = ' + $nav = ' diff --git a/scripts/lib/lib.php b/scripts/lib/lib.php index a3e065c..6dbd4a1 100644 --- a/scripts/lib/lib.php +++ b/scripts/lib/lib.php @@ -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'); diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index bb9a60e..e22ac09 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -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'], diff --git a/scripts/lib/squeezebox.php b/scripts/lib/squeezebox.php index 8b86b47..81475bf 100644 --- a/scripts/lib/squeezebox.php +++ b/scripts/lib/squeezebox.php @@ -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)