]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 1 Feb 2021 17:11:56 +0000 (18:11 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 1 Feb 2021 17:11:56 +0000 (18:11 +0100)
.idea/workspace.xml
scripts/lib/harmony.php
scripts/lib/scenes.php

index fb11009a82d3ac2b03dab0bd602a071c43449c17..5bd1505adcd3e66ed812015050223bbc307c2ca3 100644 (file)
@@ -3,7 +3,7 @@
   <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$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/harmony.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/harmony.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" />
       <workItem from="1611911107099" duration="542000" />
       <workItem from="1611951034456" duration="1202000" />
       <workItem from="1612025389189" duration="578000" />
-      <workItem from="1612099867183" duration="5529000" />
-    </task>
-    <task id="LOCAL-00396" summary=".">
-      <created>1605432287214</created>
-      <option name="number" value="00396" />
-      <option name="presentableId" value="LOCAL-00396" />
-      <option name="project" value="LOCAL" />
-      <updated>1605432287214</updated>
+      <workItem from="1612099867183" duration="8220000" />
     </task>
     <task id="LOCAL-00397" summary=".">
       <created>1605433424911</created>
       <option name="project" value="LOCAL" />
       <updated>1612025352669</updated>
     </task>
-    <option name="localTasksCounter" value="445" />
+    <task id="LOCAL-00445" summary=".">
+      <created>1612123146249</created>
+      <option name="number" value="00445" />
+      <option name="presentableId" value="LOCAL-00445" />
+      <option name="project" value="LOCAL" />
+      <updated>1612123146249</updated>
+    </task>
+    <option name="localTasksCounter" value="446" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index fc9ff9b5ad49abcd9a60a5b032ccd35c7b1bf1dd..521f90972a454e69a8976067c22636eff0fe5c59 100644 (file)
@@ -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)
index c56e6f44e17d198e0f775e5bf71cba21267aa78b..faf119f03d6020126568f0c7e223b80f0277a148 100644 (file)
@@ -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'],