From: Vincent Date: Wed, 9 Dec 2020 20:41:33 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b756b52615c9ccab198f90ef6ab67ec63d47e74a;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index bb16407..ecd02cd 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,10 @@ - - + + + @@ -271,6 +272,17 @@ diff --git a/config/global.php b/config/global.php index a55cc15..1549b8f 100644 --- a/config/global.php +++ b/config/global.php @@ -16,7 +16,8 @@ define('LONGITUDE', 2.3422104); $squeezeboxPlayers = array( 'Salle de bains' => 'b8:27:eb:ab:b4:50', //'Salon' => 'dc:a6:32:02:47:c1', - 'Salon' => 'cc:cc:2d:15:82:0e', + //'Salon' => 'cc:cc:2d:15:82:0e', + 'Salon' => '5a:a1:4c:5c:e7:5e', 'Chambre' => 'b8:27:eb:31:e1:44', 'WC' => '00:04:20:2a:05:2e', 'Cuisine' => 'b8:27:eb:ec:71:34', diff --git a/scripts/lib/flowerpower.php b/scripts/lib/flowerpower.php index a786917..719dd8c 100644 --- a/scripts/lib/flowerpower.php +++ b/scripts/lib/flowerpower.php @@ -1,9 +1,13 @@ 1467, 0 => 1468]; + $map = [1 => 1467, 0 => 1468]; foreach ($map as $k => $v) { $newValue = $fp[$k]; if ($v === 1467) { diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index e61fe14..0a03301 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -487,18 +487,26 @@ $scenes = [ ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'], ['type' => 'scene', 'scene' => 'bureau/sleeppc'], ], + 'bureau/sound/on' => [ + ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => true, 'priority' => true], + ], + 'bureau/sound/off' => [ + ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => false], + ], 'bureau/media/play' => [ ['type' => 'scene', 'scene' => 'bureau/screen/down'], ['type' => 'scene', 'scene' => 'bureau/rideaux/close'], ['type' => 'scene', 'scene' => 'bureau/off'], ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]], ['type' => 'ir', 'room' => 'bureausun', 'device' => 'Projector', 'command' => 'PowerOn'], + ['type' => 'scene', 'scene' => 'bureau/sound/on'], ], 'bureau/media/stop' => [ ['type' => 'scene', 'scene' => 'bureau/screen/up'], ['type' => 'scene', 'scene' => 'bureau/rideaux/open'], ['type' => 'scene', 'scene' => 'bureau/auto'], ['type' => 'ir', 'room' => 'bureausun', 'device' => 'Projector', 'command' => 'PowerOff'], + ['type' => 'scene', 'scene' => 'bureau/sound/off'], ], 'bureau/screen/down' => [ ['type' => 'domoticz', 'device' => '1', 'command' => true, 'priority' => true], diff --git a/scripts/lib/squeezebox.php b/scripts/lib/squeezebox.php index e14bd84..63efbaa 100644 --- a/scripts/lib/squeezebox.php +++ b/scripts/lib/squeezebox.php @@ -106,6 +106,7 @@ function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = tr } else if ($player == $squeezeboxPlayers['Salle de bains']) { execScene('sdb/ampli/on'); } else if ($player == $squeezeboxPlayers['Bureau']) { + exec('bureau/sound/on'); setState('maskShieldBureauWakeup', '1'); } else if ($player == $squeezeboxPlayers['Chambre']) { denon(true); @@ -160,6 +161,7 @@ function isMacAddress($mac) function synchroSoiree() { harmonyActivity('musique'); + exec('bureau/sound/on'); $devices = ['WC', 'Chambre', 'Bureau', 'Cuisine']; $salon = _player('Salon'); diff --git a/servers/logcat.php b/servers/logcat.php index 2371967..7ec1334 100644 --- a/servers/logcat.php +++ b/servers/logcat.php @@ -28,6 +28,8 @@ $cases = [ } else { if (!getSqueezePlayerStatus($squeezePlayer)) { shieldRunActivity($device); + } else { + execScene('bureau/sound/on'); } } },