]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Tue, 3 Nov 2020 09:45:46 +0000 (10:45 +0100)
committerVincent <vincent@enhydra.fr>
Tue, 3 Nov 2020 09:45:46 +0000 (10:45 +0100)
13 files changed:
.idea/workspace.xml
config/media.php
scripts/cron/cron.php
scripts/domoticz_device_event.php
scripts/ecomode.php
scripts/lib/harmony.php
scripts/lib/mediarasp.php
scripts/lib/scenes.php
scripts/lib/shield.php
scripts/lib/squeezebox.php
scripts/pcgames.php
scripts/share.php
scripts/squeeze.php

index 7628581f82286b159c9cb665451d8868914cc54f..976b62d61572ad6100b6eace0e4a462702a2aed8 100644 (file)
@@ -3,10 +3,18 @@
   <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/settings.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/settings.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/ecomode.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.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/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.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/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/pcgames.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/pcgames.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/share.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/share.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/squeeze.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/squeeze.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1603958541180" duration="5032000" />
       <workItem from="1604042543878" duration="11137000" />
       <workItem from="1604152329376" duration="42646000" />
-      <workItem from="1604347943058" duration="4570000" />
-    </task>
-    <task id="LOCAL-00319" summary=".">
-      <created>1585899396649</created>
-      <option name="number" value="00319" />
-      <option name="presentableId" value="LOCAL-00319" />
-      <option name="project" value="LOCAL" />
-      <updated>1585899396650</updated>
+      <workItem from="1604347943058" duration="5502000" />
     </task>
     <task id="LOCAL-00320" summary=".">
       <created>1586519228613</created>
       <option name="project" value="LOCAL" />
       <updated>1604389791157</updated>
     </task>
-    <option name="localTasksCounter" value="368" />
+    <task id="LOCAL-00368" summary=".">
+      <created>1604390350662</created>
+      <option name="number" value="00368" />
+      <option name="presentableId" value="LOCAL-00368" />
+      <option name="project" value="LOCAL" />
+      <updated>1604390350662</updated>
+    </task>
+    <option name="localTasksCounter" value="369" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
     <state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
-    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604389742372">
+    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604390342755">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604307637401" />
     <state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
-    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1604389742372" />
+    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1604390342755" />
     <state x="635" y="216" key="FileChooserDialogImpl" timestamp="1604227698339">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="295" y="0" width="1290" height="907" key="dock-window-1/0.0.2560.1040@0.0.2560.1040" timestamp="1603274697406" />
-    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1604389892117">
+    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1604396363414">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="651" y="227" width="550" height="534" key="find.popup/0.0.1707.920@0.0.1707.920" timestamp="1604301949692" />
-    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1604389892117" />
+    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1604396363414" />
     <state x="512" y="211" key="run.anything.popup" timestamp="1604146410464">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
index e9381ea03ca231e723ba1243e0d3f905111e7e8b..476cc2212ff52f39d20c1052579f33fe96bccc2e 100644 (file)
@@ -11,7 +11,7 @@ if ($device == 'salon') {
     $shortcuts['media'][] = array('type' => 'netflix', 'url' => 'scripts/netflix.php?id=home', 'label' => '<img src="images/netflix.png">');
 }
 if ($device == 'salon' || $device == 'bureau') {
-    $shortcuts['media'][] = ['label' => 'Nintendo Switch', 'type' => 'harmonyactivity', 'activity' => 'nintendo-switch'];
+    $shortcuts['media'][] = ['label' => 'Nintendo Switch', 'type' => 'harmonyactivity', 'activity' => 'tv'];
     $shortcuts['media'][] = ['label' => 'Jeux PC', 'type' => 'ajax', 'url' => '/scripts/pcgames.php'];
     $shortcuts['media'][] = ['label' => 'Vidéo web', 'type' => 'raspberrycast'];
 }
index 5ca5e3a5454aa520683736649950a6edf9bada1d..06865ffa8799dca081588958d62fffa2fd583e04 100644 (file)
@@ -352,12 +352,11 @@ function cronHarmony($cronmin)
     }
 
     if ($currentActivity == 'tv') {
-        setPlaying('freebox', 'salon');
-    } else if ($currentActivity == 'musique-radio') {
+        setPlaying('mycanal', 'salon');
+    } else if ($currentActivity == 'musique') {
         setPlaying('squeezebox', 'salon');
     } else if ($currentActivity == 'poweroff' || $currentActivity == 'off') {
-        setPlaying('freebox', 'salon');
-    } else if ($currentActivity == 'media') {
+        setPlaying('mycanal', 'salon');
     }
 }
 
index 025e5bbaf8951491dabf75076eb01e672f4e8374..a7209f7d14017a05e95b2dbd191fb8f66d502017 100644 (file)
@@ -33,7 +33,7 @@ if ($_GET['device'] == 480) {
             off('salon');
             break;
         case 'Move':
-            if (getCurrentHarmonyActivity() != 'musique-radio') {
+            if (getCurrentHarmonyActivity() != 'musique') {
                 _remoteCmd('pause', 'salon');
             }
             break;
@@ -46,7 +46,7 @@ if ($_GET['device'] == 480) {
         case 'Tap':
             if (getCurrentHarmonyActivity() == 'poweroff') {
                 squeezePlayByName('FIP', $squeezeboxPlayers['Salon']);
-            } else if (getCurrentHarmonyActivity() == 'musique-radio') {
+            } else if (getCurrentHarmonyActivity() == 'musique') {
                 stopHarmony();
             }
             break;
index 27adc5da38d9e0255bfe2e37eddfcef858d9af04..0dfb7c7187f1678c7f2b0495bd4aca2eba861b05 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 require_once "import.php";
 if (isset($_GET['action'])) {
-    if ($_GET['action'] = 'disablesuper') {
+    if ($_GET['action'] == 'disablesuper') {
         disableSuperEcoMode();
     } else if ($_GET['action'] == 'fix') {
         ecoMode(null, true);
-        header('/');
+        header('Location: /');
         exit;
     }
 } else {
index d8166fa32609d645de2689dce076b72d8ad68229..e810aec47214da7670f1a3812b7a726fe8f21f19 100644 (file)
@@ -30,7 +30,7 @@ function harmonyRequest($uri, $method = 'GET', $hub = 'salon')
 
 function harmonyActivity($activity)
 {
-    if ($activity == 'tv' || $activity == 'shield' || $activity == 'poweroff' || $activity == 'off') {
+    if ($activity == 'tv' $activity == 'poweroff' || $activity == 'off') {
         setPlaying('mycanal', 'salon');
     }
     $wait = 0;
@@ -47,7 +47,7 @@ function harmonyActivity($activity)
     if ($wait > 0) {
         sleep($wait);
     }
-    if ($activity == 'tv' || $activity == 'media' || $activity == 'shield') {
+    if ($activity == 'tv' ) {
         runAtEnd('sleep(5);harmonyDeviceCommand(\'videoprojecteur-epson\', \'power-on\');');
     }
     return $res;
index 1150ef8dd23f153de73a38dd3deeaa7c5e8d51dd..b81626141b3afc9b4ede108743407d73c380026e 100644 (file)
@@ -320,7 +320,7 @@ function mediaRaspCommons($device)
     global $squeezeboxPlayers;
     if ($device == 'salon') {
         stopSqueezebox('Salon');
-        harmonyActivity('media');
+        harmonyActivity('tv');
     } else if ($device == 'bureau') {
         execScene('bureau/media/play');
         stopSqueezebox($squeezeboxPlayers['Bureau']);
index e2453baa841120498027c707575fffdeba42d2ee..7b1a97a02c586d7dcc89fccc7948229ba2b00458 100644 (file)
@@ -378,7 +378,7 @@ $scenes = [
         ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
     ],
     'salon/media/play' => [
-        ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ['media']],
+        ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ['tv']],
     ],
     'salon/fan/on' => [
         ['type' => 'domoticz', 'device' => '478', 'command' => true],
@@ -572,7 +572,7 @@ $scenes = [
         ['type' => 'hue', 'group' => 17, 'scene' => ['on' => false, 'brightness' => 0, 'effect' => 'none']],
     ],
     'sdb/radio/sync/salon' => [
-        ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ["musique-radio"]],
+        ['type' => 'function', 'function' => 'harmonyActivity', 'args' => ["musique"]],
         ['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['sync ' . $squeezeboxPlayers['Salon'], $squeezeboxPlayers['Salle de bains']], 'wait' => 1],
         ['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['power 1', $squeezeboxPlayers['Salon']]],
         ['type' => 'function', 'function' => 'squeezeRequest', 'args' => ['play', $squeezeboxPlayers['Salon']]]
index 3f4394553729c99dc1588d6ff2532a1d52dd6ccd..0f22b8541851093a58a0444eb05b74839791fabe 100644 (file)
@@ -84,7 +84,7 @@ function shieldNetflix($id = null, $device = null)
 
     $device=getDevice($device);
     if($device==='salon'){
-        harmonyActivity('shield');
+        harmonyActivity('tv');
     }
 
     $url = 'http://www.netflix.com/';
@@ -160,7 +160,7 @@ function shieldMyCanal($channel = false, $type = 'live', $device = null)
     }
     $device=getDevice($device);
     if($device==='salon'){
-        harmonyActivity('shield');
+        harmonyActivity('tv');
     }
     setPlaying('mycanal', $device);
     _adb('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.app.common.legacy.DeepLinkActivity');
@@ -171,7 +171,7 @@ function shieldKodi($file,$device=null)
     shieldHome();
     $device=getDevice($device);
     if($device==='salon'){
-        harmonyActivity('shield');
+        harmonyActivity('tv');
     }
     _adb('shell am start', '-a android.intent.action.VIEW  -d \'"' . shieldNormalizeURL($file) . '"\' -n org.xbmc.kodi/.Splash');
 }
index 81a65616779cd7627f86f95ce8a2051e71abdcb0..f0666593b5006e232d639ecfc06ad7b69b550615 100644 (file)
@@ -92,7 +92,7 @@ function squeezePlayByName($musicName, $player, $volume = null, $playIfSync = tr
     }
 
     if ($player == $squeezeboxPlayers['Salon']) {
-        harmonyActivity('musique-radio');
+        harmonyActivity('musique');
     }
     if ($player == $squeezeboxPlayers['Salle de bains']) {
         execScene('sdb/ampli/on');
@@ -152,7 +152,7 @@ function isMacAddress($mac)
 
 function synchroSoiree()
 {
-    harmonyActivity('musique-radio');
+    harmonyActivity('musique');
 
     $devices = ['WC', 'Chambre', 'Bureau', 'Cuisine'];
     $salon = _player('Salon');
index 856df2c2efb301a760b79e21e59bf1ef0c34f128..bc2418eecb2ef5e8c7f721b5510d55856cee3b02 100644 (file)
@@ -2,7 +2,7 @@
 require_once "import.php";
 
 if (config('DEVICE') == 'salon') {
-    harmonyActivity('media');
+    harmonyActivity('tv');
 }
 
 sshCommand('killall fbi', null, false, true);
index 2ad2b083199fc0c81dc1298ef3a8f24514666fb5..df77d88ddd5ac9b6ec3fe347c0f53bc1e74a30cc 100644 (file)
@@ -13,7 +13,7 @@ function shareIntent($content, $device = null)
         $u = parse_url($content);
         if ($u['host'] == 'open.spotify.com') {
             if ($device == 'salon') {
-                harmonyActivity('musique-radio');
+                harmonyActivity('musique');
             }
             $p = explode('/', trim($u['path'], '/'));
             $spotify = 'spotify:' . implode(':', $p);
index 5629c10d1cf24b11768aa0668a1da1783fa4d5a3..5341b25e2b897333e4f63df645997ce9d86f50fa 100644 (file)
@@ -8,7 +8,7 @@ if (isset($_GET['requests'])) {
 
 if (!in_array('stop', $requests) || isset($_GET['name'])) {
     if ($_GET['player'] == 'Salon') {
-        print_r(harmonyActivity("musique-radio"));
+        print_r(harmonyActivity("musique"));
     } elseif ($_GET['player'] == 'Salle de bains') {
         execScene('sdb/ampli/on');
     }