From: Vincent Date: Mon, 1 Feb 2021 17:11:56 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=febc27a680bf2e205c866cf61f5bc7312cbc3b72;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index fb11009..5bd1505 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,7 @@ - + diff --git a/scripts/lib/harmony.php b/scripts/lib/harmony.php index fc9ff9b..521f909 100644 --- a/scripts/lib/harmony.php +++ b/scripts/lib/harmony.php @@ -36,7 +36,7 @@ function harmonyActivity($activity) $wait = 0; $current = getCurrentHarmonyActivity(); if ($current == 'off' || $current == 'poweroff' || !$current) { - if ($activity == 'media' || $activity == 'shield' || $activity == 'tv') { + if ($activity == 'tv') { $wait = 10; } } @@ -47,6 +47,8 @@ function harmonyActivity($activity) shieldWakeup('bureau'); } $res = harmonyRequest('activities/' . $activity, 'POST'); + $map = ['musique' => 2200, 'tv' => 2199, 'off' => 2198]; + domoticzSwitch($map[$activity], true, 'light', false); if ($wait > 0) { sleep($wait); } @@ -68,7 +70,9 @@ function getCurrentHarmonyActivity() function stopHarmony() { - return harmonyRequest('off', 'PUT'); + $res = harmonyRequest('off', 'PUT'); + domoticzSwitch(2198, true, 'light', false); + return $res; } function harmonyDeviceCommand($device, $command) diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index c56e6f4..faf119f 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -612,19 +612,19 @@ $scenes = [ ], 'wc/morning' => [ ['type' => 'hue', 'group' => $wc, 'scene' => 'NC5ejamHGUNURj8'], - ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP', $squeezeboxPlayers['WC'], 90, false]], + ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP-LOFI', $squeezeboxPlayers['WC'], 90, false]], ], 'wc/day' => [ ['type' => 'hue', 'group' => $wc, 'scene' => 'qfuu8z5QaJ6J26W'], - ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP', $squeezeboxPlayers['WC'], 90, false]], + ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP-LOFI', $squeezeboxPlayers['WC'], 90, false]], ], 'wc/evening' => [ ['type' => 'hue', 'group' => $wc, 'scene' => 'h82j28eNu6ZHVhM'], - ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP', $squeezeboxPlayers['WC'], 90, false]], + ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP-LOFI', $squeezeboxPlayers['WC'], 90, false]], ], 'wc/late' => [ ['type' => 'hue', 'group' => $wc, 'scene' => 'IGo4F5jRQXc1H95'], - ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP', $squeezeboxPlayers['WC'], 90, false]], + ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['FIP-LOFI', $squeezeboxPlayers['WC'], 90, false]], ], 'wc/night' => [ ['type' => 'hue', 'group' => $wc, 'scene' => 'eJy09JTEzCiIL1P'], @@ -643,6 +643,7 @@ $scenes = [ 'wc/spa' => [ ['type' => 'hue', 'group' => $wc, 'scene' => ['effect' => 'colorloop', 'on' => true, 'brightness' => 128]], ['type' => 'function', 'function' => 'squeezePlayByName', 'args' => ['Rivière', $squeezeboxPlayers['WC'], 100]], + ['type' => 'function', 'function' => 'wcVMCOff'], ], 'wc/vmc/on' => [ ['type' => 'function', 'function' => 'wcVMCOn'],