]> _ Git - tortuga-home.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 26 Jul 2024 07:25:41 +0000 (09:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 26 Jul 2024 07:25:41 +0000 (09:25 +0200)
13 files changed:
.idea/dataSources.local.xml
.idea/workspace.xml
config/bureau.php
config/litvincent.php
config/media.php
config/rooms.php
config/switch.php
config/tv.php
scripts/lib/denon.php
scripts/lib/lib.php
scripts/lib/shield.php
scripts/lib/simplemode.php [new file with mode: 0644]
scripts/shield.php

index a7db01c4b3a00d30461c3f6c5ebb5995fa643668..f0de5c5621ae3b079d20cea9f2ff0c343c008571 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="dataSourceStorageLocal" created-in="IU-241.17890.1">
+  <component name="dataSourceStorageLocal" created-in="IU-241.18034.62">
     <data-source name="LFY(3).db" uuid="e5a3291d-855f-44b2-be41-76fe6b0c2136">
       <database-info product="SQLite" version="3.25.1" jdbc-version="2.1" driver-name="SQLite JDBC" driver-version="3.25.1" dbms="SQLITE" exact-version="3.25.1" exact-driver-version="3.25">
         <identifier-quote-string>&quot;</identifier-quote-string>
index 9d7ba8e81e13f30997591b3cae667ea49047bf3e..0ada1b8a30506798dd6d6b73434ed96d76f95611 100644 (file)
@@ -5,8 +5,19 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/.docker/config/php/php.ini" beforeDir="false" afterPath="$PROJECT_DIR$/.docker/config/php/php.ini" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/scripts/lib/simplemode.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/dataSources.local.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources.local.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/litvincent.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litvincent.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/switch.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/switch.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/tv.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/tv.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/denon.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/denon.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.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/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/shield.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
   <component name="SharedIndexes">
     <attachedChunks>
       <set>
-        <option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.17890.1" />
-        <option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.17890.1" />
+        <option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.18034.62" />
+        <option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.18034.62" />
       </set>
     </attachedChunks>
   </component>
       <workItem from="1718880511423" duration="3678000" />
       <workItem from="1718889258103" duration="4434000" />
       <workItem from="1718896067904" duration="2628000" />
-      <workItem from="1718921308389" duration="849000" />
+      <workItem from="1718921308389" duration="1420000" />
+      <workItem from="1721025519094" duration="4050000" />
+      <workItem from="1721977403266" duration="1275000" />
     </task>
     <task id="LOCAL-00502" summary=".">
       <created>1641726946298</created>
       <option name="project" value="LOCAL" />
       <updated>1687259667913</updated>
     </task>
-    <option name="localTasksCounter" value="619" />
+    <option name="localTasksCounter" value="620" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 198881afbdf41723fb3747877b2aabc15a15ff1e..93e88fc6ee19fb70f9ecbd76309b524cffa4d2a2 100644 (file)
@@ -19,11 +19,15 @@ config('THEME', '#051039');
 if (DISPLAYINTERFACE) {
     $c = bureau();
     $shortcuts['lights'] = $c['all'];
-    $favoriteslights = [
-        ['type' => 'volume', 'volume' => config('VOLUME_STEP') . '%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
-        ['type' => 'volume', 'volume' => config('VOLUME_STEP') . '%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
-    ];
-    $favoriteslights = array_merge($favoriteslights, $c['favorites']);
+    if (!isSimpleMode()) {
+        $favoriteslights = [
+            ['type' => 'volume', 'volume' => config('VOLUME_STEP') . '%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+            ['type' => 'volume', 'volume' => config('VOLUME_STEP') . '%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+        ];
+        $favoriteslights = array_merge($favoriteslights, $c['favorites']);
+    } else {
+        $favoriteslights =  $c['favorites'];
+    }
 
     include_once "remote.php";
     include "default.php";
index 2ea7a4644c21174f6cc0ccc58f3f6ee19fe1ffaf..4fd31729316f4ad2a5b46487a5713974ef598f86 100644 (file)
@@ -14,9 +14,7 @@ config('THEME', '#a62634');
 
 if (DISPLAYINTERFACE) {
     $additionnalfavorites = [
-        ['type' => 'separator', 'label' => 'Réveil'],
-        ['type' => 'phone', 'phone' => 'vincent', 'task' => 'Réveil 0715', 'label' => 'Réveil 0715', 'screenoff' => 1],
-        ['type' => 'phone', 'phone' => 'vincent', 'task' => 'Réveil 0815', 'label' => 'Réveil 0815', 'screenoff' => 1]
+
     ];
 
     include "lit.php";
index a8cf6547b5bacbbf011cf6375c0e3bb71016926e..095f86935f7ca4f6d73201e6bc556878176b9a55 100644 (file)
@@ -4,53 +4,50 @@ include 'tv.php';
 $media = connectRedis()->igbget('medialibrary');
 $device = config('DEVICE');
 
-$shortcuts['media'] = [['label' => 'TV', 'type' => 'sub', 'sub' => 'tv'], ['label' => 'Ajoutés récemment', 'type' => 'sub', 'sub' => 'mediarecent']];
-$shortcuts['media'][] = ['label' => 'Séries TV', 'type' => 'sub', 'sub' => 'seriestv'];
-$shortcuts['media'][] = ['label' => 'Films', 'type' => 'sub', 'sub' => 'movies'];
+$shortcuts['media'] = [['label' => 'TV', 'type' => 'sub', 'sub' => 'tv']/*, ['label' => 'Ajoutés récemment', 'type' => 'sub', 'sub' => 'mediarecent']*/];
+//$shortcuts['media'][] = ['label' => 'Séries TV', 'type' => 'sub', 'sub' => 'seriestv'];
+//$shortcuts['media'][] = ['label' => 'Films', 'type' => 'sub', 'sub' => 'movies'];
 if ($device == 'salon' || $device == 'bureau' || $device == 'bureausun') {
     $shortcuts['media'][] = array('type' => 'netflix', 'url' => 'scripts/netflix.php?id=home', 'label' => '<img src="images/netflix.png">');
     $shortcuts['media'][] = array('type' => 'amazonprime', 'url' => 'scripts/shield.php?amazonprime=home', 'label' => '<img src="images/amazonprime.png">');
-    $shortcuts['media'][] = array('type' => 'nintendoswitch', 'url' => 'scripts/switch.php', 'label' => '<img src="images/switch.png">');
-    $shortcuts['media'][] = ['label' => 'Vidéo web', 'type' => 'raspberrycast'];
-}
-if ($device == 'bureau' || $device == 'bureausun') {
-    $shortcuts['media'][] = ['label' => '<img style="width: 100%;transform: scale(1.1);" src="images/switch.png">', 'type' => 'ajax', 'url' => '/scripts/switch.php'];
+    //$shortcuts['media'][] = array('type' => 'nintendoswitch', 'url' => 'scripts/switch.php', 'label' => '<img src="images/switch.png">');
+    //$shortcuts['media'][] = ['label' => 'Vidéo web', 'type' => 'raspberrycast'];
 }
 
 
-$tvshows = getTVShows();
-if (is_array($tvshows)) {
-    $shortcuts['sub-seriestv'] = $tvshows['shortcuts'];
-    $shortcuts = array_merge($shortcuts, $tvshows['subs']);
-    profile('Got TV Shows', __FILE__, __LINE__);
-}
+//$tvshows = getTVShows();
+//if (is_array($tvshows)) {
+//    $shortcuts['sub-seriestv'] = $tvshows['shortcuts'];
+//    $shortcuts = array_merge($shortcuts, $tvshows['subs']);
+//    profile('Got TV Shows', __FILE__, __LINE__);
+//}
+//
+//$movies = getMovies();
+//if (is_array($movies)) {
+//    $shortcuts['sub-movies'] = $movies['shortcuts'];
+//    $shortcuts = array_merge($shortcuts, $movies['subs']);
+//    profile('Got movies', __FILE__, __LINE__);
+//}
+//
+//$recent = getMediaRecentAdded();
+//if (is_array($recent)) {
+//    $shortcuts['sub-mediarecent'] = $recent['shortcuts'];
+//    $shortcuts = array_merge($shortcuts, $recent['subs']);
+//    profile('Got recents', __FILE__, __LINE__);
+//}
 
-$movies = getMovies();
-if (is_array($movies)) {
-    $shortcuts['sub-movies'] = $movies['shortcuts'];
-    $shortcuts = array_merge($shortcuts, $movies['subs']);
-    profile('Got movies', __FILE__, __LINE__);
-}
-
-$recent = getMediaRecentAdded();
-if (is_array($recent)) {
-    $shortcuts['sub-mediarecent'] = $recent['shortcuts'];
-    $shortcuts = array_merge($shortcuts, $recent['subs']);
-    profile('Got recents', __FILE__, __LINE__);
-}
-
-if (is_array($media)) {
-    foreach ($media as $id => $mediagroup) {
-        if ($id == 'x' && (!isset($_GET['x']) || $_GET['x'] != 'x')) {
-            continue;
-        }
-        $parentId = 'media-' . $id;
-        $shortcuts['media'][] = array('label' => $mediagroup['name'], 'type' => 'sub', 'sub' => $parentId);
-        $shortcuts = array_merge($shortcuts, getMediaFolderShortcuts($mediagroup, $parentId));
-    }
-}
+//if (is_array($media)) {
+//    foreach ($media as $id => $mediagroup) {
+//        if ($id == 'x' && (!isset($_GET['x']) || $_GET['x'] != 'x')) {
+//            continue;
+//        }
+//        $parentId = 'media-' . $id;
+//        $shortcuts['media'][] = array('label' => $mediagroup['name'], 'type' => 'sub', 'sub' => $parentId);
+//        $shortcuts = array_merge($shortcuts, getMediaFolderShortcuts($mediagroup, $parentId));
+//    }
+//}
 
-$shortcuts['media'][] = ['label' => 'Recharger', 'type' => 'url', 'href' => '/scripts/tmdb.php'];
+//$shortcuts['media'][] = ['label' => 'Recharger', 'type' => 'url', 'href' => '/scripts/tmdb.php'];
 
 function getMediaFolderShortcuts($mediagroup, $parentId)
 {
index 030095a0f03c25634c8047ee26929b0e08d43f62..b1e2f305c1eccd52bce9c617e86bebb8eceed158 100644 (file)
@@ -4,17 +4,24 @@ $rooms = array('home' => 'Maison', 'salon' => 'Salon', 'chambre' => 'Chambre', '
 
 function chambre($additionnalfavorites = array())
 {
-    $favorites = [
-        ['type' => 'light', 'scene' => 'home/aulit', 'label' => 'Au lit ☽'],
-        ['type' => 'light', 'scene' => 'chambre/matin', 'label' => 'Matin ★'],
-        ['type' => 'light', 'scene' => 'home/aulitoff', 'label' => 'Eteindre ☽'],
-        ['type' => 'light', 'scene' => 'chambre/bed', 'label' => 'Au lit'],
-        ['type' => 'light', 'scene' => 'chambre/sleep', 'label' => 'Nuit'],
-        ['type' => 'light', 'scene' => 'chambre/moon', 'label' => 'Clair de lune'],
-        ['type' => 'light', 'scene' => 'chambre/full', 'label' => 'Plein feu'],
-        ['type' => 'light', 'scene' => 'chambre/reading', 'label' => 'Lecture'],
-        ['type' => 'light', 'scene' => 'chambre/off', 'label' => 'Off'],
-    ];
+    if (isSimpleMode()) {
+        $favorites = [
+            ['type' => 'light', 'scene' => 'chambre/matin', 'label' => 'Matin ★'],
+            ['type' => 'light', 'scene' => 'chambre/bedoff', 'label' => 'Au lit ☽'],
+        ];
+    } else {
+        $favorites = [
+            ['type' => 'light', 'scene' => 'home/aulit', 'label' => 'Au lit ☽'],
+            ['type' => 'light', 'scene' => 'chambre/matin', 'label' => 'Matin ★'],
+            ['type' => 'light', 'scene' => 'home/aulitoff', 'label' => 'Eteindre ☽'],
+            ['type' => 'light', 'scene' => 'chambre/bed', 'label' => 'Au lit'],
+            ['type' => 'light', 'scene' => 'chambre/sleep', 'label' => 'Nuit'],
+            ['type' => 'light', 'scene' => 'chambre/moon', 'label' => 'Clair de lune'],
+            ['type' => 'light', 'scene' => 'chambre/full', 'label' => 'Plein feu'],
+            ['type' => 'light', 'scene' => 'chambre/reading', 'label' => 'Lecture'],
+            ['type' => 'light', 'scene' => 'chambre/off', 'label' => 'Off'],
+        ];
+    }
 
     $all = array_merge($favorites, [
         ['type' => 'light', 'scene' => 'chambre/boreal', 'label' => 'Matin boréal'],
@@ -45,6 +52,18 @@ function lit($additionnalfavorites = array())
 
 function home()
 {
+    if (isSimpleMode()) {
+        $favorites = [
+            ['type' => 'light', 'scene' => 'home/welcome', 'label' => 'Bienvenue'],
+            ['type' => 'light', 'scene' => 'home/off', 'label' => 'éteindre'],
+        ];
+    } else {
+        $favorites = [
+            ['type' => 'light', 'scene' => 'home/welcome/eco', 'label' => 'Bienvenue&nbsp;🌿', 'confirm' => ['message' => 'Quelqu\'un dort peut-être. Veuillez confirmer votre action.', 'conditions' => ['night' => '1']]],
+            ['type' => 'light', 'scene' => 'home/off', 'label' => 'éteindre'],
+            ['type' => 'light', 'scene' => 'home/welcome', 'label' => 'Bienvenue&nbsp;★', 'confirm' => ['message' => 'Quelqu\'un dort peut-être. Veuillez confirmer votre action.', 'conditions' => ['night' => '1']]],
+        ];
+    }
     $favorites = [
         ['type' => 'light', 'scene' => 'home/welcome/eco', 'label' => 'Bienvenue&nbsp;🌿', 'confirm' => ['message' => 'Quelqu\'un dort peut-être. Veuillez confirmer votre action.', 'conditions' => ['night' => '1']]],
         ['type' => 'light', 'scene' => 'home/off', 'label' => 'éteindre'],
@@ -58,19 +77,24 @@ function home()
 
 function salon()
 {
+
     $favorites = [
         ['type' => 'light', 'scene' => 'salon/auto', 'label' => 'Allumer'],
         ['type' => 'light', 'scene' => 'salon/off', 'label' => 'éteindre'],
-        ['type' => 'light', 'scene' => 'salon/day', 'label' => 'journée'],
-        ['type' => 'light', 'scene' => 'salon/lumineux', 'label' => 'lumineux'],
         ['type' => 'light', 'scene' => 'salon/cinema', 'label' => 'cinéma'],
-        ['type' => 'light', 'scene' => 'salon/cineclub', 'label' => 'cinéma de minuit'],
-        ['type' => 'light', 'scene' => 'salon/tamise', 'label' => 'Tamisé'],
-        ['type' => 'light', 'scene' => 'salon/lecturenocture', 'label' => 'Lecture nocturne'],
-        ['type' => 'light', 'scene' => 'salon/cheminee', 'label' => 'Cheminée'],
-        ['type' => 'light', 'scene' => 'salon/theatre', 'label' => 'Théâtre'],
-        ['type' => 'light', 'scene' => 'salon/bar/toggle', 'label' => 'Bar'],
     ];
+
+    if (!isSimpleMode()) {
+        $favorites = array_merge($favorites, ['type' => 'light', 'scene' => 'salon/day', 'label' => 'journée'],
+            ['type' => 'light', 'scene' => 'salon/lumineux', 'label' => 'lumineux'],
+            ['type' => 'light', 'scene' => 'salon/cineclub', 'label' => 'cinéma de minuit'],
+            ['type' => 'light', 'scene' => 'salon/tamise', 'label' => 'Tamisé'],
+            ['type' => 'light', 'scene' => 'salon/lecturenocture', 'label' => 'Lecture nocturne'],
+            ['type' => 'light', 'scene' => 'salon/cheminee', 'label' => 'Cheminée'],
+            ['type' => 'light', 'scene' => 'salon/theatre', 'label' => 'Théâtre'],
+            ['type' => 'light', 'scene' => 'salon/bar/toggle', 'label' => 'Bar'],);
+    }
+
     $all = array_merge($favorites, [['type' => 'separator', 'label' => 'Projecteur'],
         ['type' => 'light', 'scene' => 'salon/projector/on', 'label' => 'Allumer'],
         ['type' => 'light', 'scene' => 'salon/projector/off', 'label' => 'éteindre']]);
@@ -83,12 +107,15 @@ function bureau()
         ['type' => 'light', 'scene' => 'bureau/auto', 'label' => 'Allumer'],
         ['type' => 'light', 'scene' => 'bureau/off', 'label' => 'éteindre'],
         ['type' => 'light', 'scene' => 'bureau/cinema', 'label' => 'Cinéma'],
-        ['type' => 'light', 'scene' => 'bureau/lumineux', 'label' => 'Lumineux'],
-        ['type' => 'light', 'scene' => 'bureau/lounge', 'label' => 'Lounge'],
-        ['type' => 'light', 'scene' => 'bureau/tamise', 'label' => 'Tamise'],
-        ['type' => 'light', 'scene' => 'bureau/veilleuse', 'label' => 'Veilleuse'],
     ];
 
+    if (!isSimpleMode()) {
+        $favorites = array_merge($favorites, ['type' => 'light', 'scene' => 'bureau/lumineux', 'label' => 'Lumineux'],
+            ['type' => 'light', 'scene' => 'bureau/lounge', 'label' => 'Lounge'],
+            ['type' => 'light', 'scene' => 'bureau/tamise', 'label' => 'Tamise'],
+            ['type' => 'light', 'scene' => 'bureau/veilleuse', 'label' => 'Veilleuse']);
+    }
+
     $all = array_merge($favorites, [
         ['type' => 'light', 'scene' => 'bureau/boreal', 'label' => 'Aurore boréale'],
         ['type' => 'light', 'scene' => 'bureau/tchernobyl', 'label' => 'Чорнобиль'],
@@ -131,11 +158,14 @@ function cuisine()
 function sdb()
 {
     $favorites = [
-        ['type' => 'light', 'scene' => 'sdb/on', 'label' => 'Allumer'],
-        ['type' => 'light', 'scene' => 'sdb/off', 'label' => 'éteindre'],
-        ['type' => 'light', 'scene' => 'sdb/spa', 'label' => 'spa'],
-        ['type' => 'light', 'scene' => 'sdb/nuit', 'label' => 'nuit'],
+
     ];
+    if (!isSimpleMode()) {
+        $favorites = array_merge($favorites, ['type' => 'light', 'scene' => 'sdb/on', 'label' => 'Allumer'],
+            ['type' => 'light', 'scene' => 'sdb/off', 'label' => 'éteindre'],
+            ['type' => 'light', 'scene' => 'sdb/spa', 'label' => 'spa'],
+            ['type' => 'light', 'scene' => 'sdb/nuit', 'label' => 'nuit'],);
+    }
     $all = array_merge($favorites, [
 
     ]);
@@ -172,17 +202,22 @@ function wc()
 
 function cour()
 {
-    $favorites = [
-        ['type' => 'light', 'scene' => 'cour/auto', 'label' => 'Allumer'],
-        ['type' => 'light', 'scene' => 'cour/off', 'label' => 'éteindre'],
-        ['type' => 'light', 'scene' => 'cour/lumineux', 'label' => 'lumineux'],
-        ['type' => 'light', 'scene' => 'cour/daylight', 'label' => 'jour'],
-        ['type' => 'light', 'scene' => 'cour/grow', 'label' => 'croissance'],
-        ['type' => 'light', 'scene' => 'cour/tropical', 'label' => 'crépuscule tropical'],
-        ['type' => 'separator', 'label' => 'Projecteurs'],
-        ['type' => 'light', 'scene' => 'cour/projecteurs/on', 'label' => 'Allumer'],
-        ['type' => 'light', 'scene' => 'cour/projecteurs/off', 'label' => 'éteindre'],
-    ];
+    $favorites = [];
+    if (!isSimpleMode()) {
+        $favorites = [
+            ['type' => 'light', 'scene' => 'cour/auto', 'label' => 'Allumer'],
+            ['type' => 'light', 'scene' => 'cour/off', 'label' => 'éteindre'],
+            ['type' => 'light', 'scene' => 'cour/lumineux', 'label' => 'lumineux'],
+            ['type' => 'light', 'scene' => 'cour/daylight', 'label' => 'jour'],
+            ['type' => 'light', 'scene' => 'cour/grow', 'label' => 'croissance'],
+            ['type' => 'light', 'scene' => 'cour/tropical', 'label' => 'crépuscule tropical'],
+            ['type' => 'separator', 'label' => 'Projecteurs'],
+            ['type' => 'light', 'scene' => 'cour/projecteurs/on', 'label' => 'Allumer'],
+            ['type' => 'light', 'scene' => 'cour/projecteurs/off', 'label' => 'éteindre'],
+        ];
+    }
+
+
     $all = array_merge($favorites, [
 
     ]);
index ffa373853c703abdb77eda2e09efb157738c7bb6..edee8391ae7a3e808f3b71450837580ab0714f24 100644 (file)
@@ -2,7 +2,7 @@
 $shortcuts['switch'] = [];
 $shortcuts['switchshare'] = [];
 $share = ['salon', 'bureau', 'sdb', 'cuisine', 'chambre'];
-$rooms = ['salon' => 'Salon', 'bureau' => 'Bureau', 'entree' => 'Entrée', 'cuisine' => 'Cuisine', 'chambre' => 'Chambre', 'litvincent' => 'Lit Vincent', 'litjerome' => 'Lit Jérôme', 'sdb' => 'Salle de bain', 'cour' => 'Cour', 'balcon' => 'Balcon', 'wc' => 'WC'];
+$rooms = ['salon' => 'Salon', 'bureau' => 'Bureau', 'entree' => 'Entrée', 'cuisine' => 'Cuisine', 'chambre' => 'Chambre', 'litvincent' => 'Lit Droite', 'litjerome' => 'Lit Gauche', 'sdb' => 'Salle de bain', 'wc' => 'WC'];
 foreach ($rooms as $room => $label) {
     if (config('DEVICE') === $room) {
         continue;
index caec7ddfc6d02ac4197e97dd57aa43cc029c63fa..2659870b9b46c76846b439a159405f2fcfff6658 100644 (file)
@@ -46,17 +46,10 @@ foreach ($replays as $name => $replay) {
 }
 
 $tv = array(
-    'Connexion MyCanal' => array('freebox' => 'replay', 'shield' => 'mycanal:connect:home'),
+    //'Connexion MyCanal' => array('freebox' => 'replay', 'shield' => 'mycanal:connect:home'),
     'Replay' => array('freebox' => 'replay', 'shield' => 'mycanal:replay:home'),
     'Netflix' => array('freebox' => 'netflix', 'shield' => 'netflix:home'),
     'Amazon Prime' => array('shield' => 'amazonprime:home'),
-    'Infos',
-    'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27, 'shield' => 'mycanal:live:670', 'logo' => '41072782'),
-    'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16, 'shield' => 'mycanal:live:480', 'logo' => '64698936'),
-    'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15, 'shield' => 'mycanal:live:633', 'logo' => '34766177'),
-    'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347, 'shield' => 'mycanal:live:645', 'logo' => '54239635'),
-    'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26, 'shield' => 'mycanal:live:553', 'logo' => '66747521'),
-    'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345, 'shield' => 'mycanal:live:324', 'logo' => '36581437'),
     'Généralistes',
     'TF1' => array('stream' => 'tvheadend:TF1', 'channel' => 1, 'shield' => 'mycanal:live:312', 'logo' => '66746746'),
     'France 2' => array('stream' => 'tvheadend:France 2', 'channel' => 2, 'shield' => 'mycanal:live:26', 'logo' => '67032119'),
@@ -82,6 +75,13 @@ $tv = array(
     'TV Breizh' => array('shield' => 'mycanal:live:586', 'logo' => '93561480'),
     '6ter' => array('stream' => 'tvheadend:6ter', 'channel' => 22, 'shield' => 'mycanal:live:521', 'logo' => '16598429'),
     'TF1 Séries Films' => array('stream' => 'tvheadend:TF1 Séries Films', 'channel' => 20, 'shield' => 'mycanal:live:526', 'logo' => '66747478'),
+    'Infos',
+    'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27, 'shield' => 'mycanal:live:670', 'logo' => '41072782'),
+    'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16, 'shield' => 'mycanal:live:480', 'logo' => '64698936'),
+    'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15, 'shield' => 'mycanal:live:633', 'logo' => '34766177'),
+    'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347, 'shield' => 'mycanal:live:645', 'logo' => '54239635'),
+    'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26, 'shield' => 'mycanal:live:553', 'logo' => '66747521'),
+    'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345, 'shield' => 'mycanal:live:324', 'logo' => '36581437'),
     'Monde',
     'TV5 Monde' => array('stream' => 'fbx:206:sd', 'channel' => 1, 'shield' => 'mycanal:live:520', 'logo' => '14279265'),
     'France 24' => array('stream' => 'tvheadend:France 24', 'channel' => 340, 'shield' => 'mycanal:live:310', 'logo' => '18810794'),
@@ -100,7 +100,7 @@ foreach ($tv as $name => $service) {
         $name = '<img class="logo" style="margin-top:12%;" alt="' . $name . '" src="' . cacheMedia('http://thumb.canalplus.pro/bddpe/unsafe/' . $service['logo'], 'webp') . '">';
     } elseif ($name === 'Netflix') {
         $name = '<img class="logo" alt="' . $name . '" src="/images/netflix.png">';
-    }else if($name==='Amazon Prime'){
+    } else if ($name === 'Amazon Prime') {
         $name = '<img class="logo" alt="' . $name . '" src="/images/amazonprime.png">';
     }
 
@@ -108,11 +108,13 @@ foreach ($tv as $name => $service) {
         $shortcuts['sub-tv'][] = array('type' => 'separator', 'label' => $service);
     } else {
         if ($tvplayer === 'shield') {
-            if (isset($service['shield'])) {
+            if (isset($service['channel'])) {
+                $shortcuts['sub-tv'][] = array('type' => 'shield', 'url' => 'scripts/shield.php?oqee=' . $service['channel'], 'label' => $name);
+            } else if (isset($service['shield'])) {
                 $e = explode(':', $service['shield'], 2);
                 if ($name === 'netflix') {
                     $name = '<img src="images/netflix.png">';
-                } else if($name==='amazonprime'){
+                } else if ($name === 'amazonprime') {
                     $name = '<img src="images/amazonprime.png">';
                 }
                 $shortcuts['sub-tv'][] = array('type' => 'shield', 'url' => 'scripts/shield.php?' . $e[0] . '=' . $e[1], 'label' => $name);
index b87dca6be6c8a81b4c52ff4902a9d9af34f13881..5e804c761fe1fc68864c9c2b2e3ea0b01bbdfd10 100644 (file)
@@ -34,10 +34,13 @@ function denonAVRVolume($volume, $increase = '')
 
 function denonAVROn($input = 'Media Player', $force = false)
 {
+    $setVolume = false;
     if ($force || !denonAVRGetPowerState()) {
+        $setVolume = true;
         _denonTelnet('ZMON');
     }
-    denonAVRInput($input, true);
+
+    denonAVRInput($input, $setVolume);
 }
 
 function denonAVRInput($input, $setvolume = false)
index fba0d8478f42b0f20951e6b839964c07b11fc525..792cd70f86ba408cce8f49c85b41a6df0780814e 100644 (file)
@@ -6,6 +6,7 @@ $endQueue = [];
 require_once ROOT . '/vendor/autoload.php';
 require_once ROOT . "/config/global.php";
 require_once ROOT . '/config/rooms.php';
+require_once ROOT . '/scripts/lib/simplemode.php';
 require_once ROOT . '/scripts/lib/automodes.php';
 require_once ROOT . '/scripts/lib/homeassistant.php';
 require_once ROOT . '/scripts/lib/redis.php';
@@ -301,12 +302,12 @@ function shortcut($s, $hash)
 <ul class="issy"><li class="car"></li><li class="subway"></li><li class="bike"></li></ul>
 <div class="total_jams"><span class="jams"></span> de bouchons</div>';
 
-    } else if($s['type']==='lock'){
+    } else if ($s['type'] === 'lock') {
         $attrs['class'] = $s['type'] . ' info';
         $attrs['data-init'] = "0";
         $attrs['data-init-function'] = "updateLocks";
-        $s['label']='<div class="icon"></div>';
-    }elseif ($s['type'] == 'velib') {
+        $s['label'] = '<div class="icon"></div>';
+    } elseif ($s['type'] == 'velib') {
         $attrs['class'] = $s['type'] . ' info';
         $attrs['data-init'] = "0";
         $attrs['data-init-function'] = "updateVelib";
index 63dfc8f99dcf728e79545f0ef4c6a48a34198233..aeb2f3619ae26317d9431f963d3b0c10d1c6aa45 100644 (file)
@@ -155,6 +155,11 @@ function shieldAmazonPrime($id = null, $device = null)
     shieldLaunchApp('com.amazon.amazonvideo.livingroom/com.amazon.ignition.IgnitionActivity', $device);
 }
 
+function shieldOqee($channel, $device = null)
+{
+    shieldLaunchApp('oqee', $device);
+}
+
 function shieldRemoteCommand($cmd, $device = null)
 {
     shieldKey([$cmd], $device);
@@ -189,6 +194,7 @@ function shieldLaunchApp($activity, $device = null)
 
 function shieldMyCanalConnect($device = null, $force = false)
 {
+    return;
     $d = getDevice($device);
     $state = 'mycanallastconnect_' . $d['id'];
     $limit = time() - 3600 * 24 * 16;
@@ -239,8 +245,8 @@ function shieldMyCanal($channel = false, $type = 'live', $device = null)
     }
 
     setPlaying('mycanal', $device);
-    shieldKill('mycanal', $device);
-    shieldHome($device);
+    //shieldKill('mycanal', $device);
+    //shieldHome($device);
     return shieldCommand('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.mycanal.legacy.DeepLinkActivity', $device);
 }
 
@@ -253,6 +259,14 @@ function shieldKodi($file, $device = null)
     shieldCommand('shell am start', '-a android.intent.action.VIEW  -d \'"' . $url . '"\' -n org.xbmc.kodi/.Splash', $device);
 }
 
+function shielOqee($channel, $device = null)
+{
+    $url = shieldNormalizeURL('https://oq.ee/channel/' . $channel . '/play');
+    shieldRunActivity($device);
+    shieldKill('oqee', $device);
+    shieldCommand('shell am start', '-a android.intent.action.VIEW  -d \'"' . $url . '"\' -n net.oqee.androidtv.store/net.oqee.androidtv.ui.player.LivePlayerActivity', $device);
+}
+
 function shieldNormalizeURL($input)
 {
     if (strpos($input, '/nas') === 0) {
@@ -315,6 +329,7 @@ function shieldGetApps()
         'squeezeplayer' => 'de.bluegaspode.squeezeplayer',
         'tortuga' => 'fr.enhydra.tortuga.home',
         'amazonprime' => 'com.amazon.amazonvideo.livingroom',
+        'oqee' => 'net.oqee.androidtv.store',
     ];
 }
 
diff --git a/scripts/lib/simplemode.php b/scripts/lib/simplemode.php
new file mode 100644 (file)
index 0000000..2d8444a
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+function isSimpleMode()
+{
+    return true;
+}
\ No newline at end of file
index 9da6f0bc2f226393d42cba819bfab1210813aacd..651aa59ea0aabe2511c4aab20465c6b43bd0dd6c 100644 (file)
@@ -31,5 +31,7 @@ if (isset($_GET['key'])) {
     echo shieldClearAppData($_GET['clear'], $device);
 } else if (isset($_GET['amazonprime'])) {
     shieldAmazonPrime($_GET['amazonprime'], $device);
+} else if (isset($_GET['oqee'])) {
+    shielOqee($_GET['oqee'], $device);
 }
 echo '</pre>';
\ No newline at end of file