]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 2 Nov 2020 08:12:47 +0000 (09:12 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 2 Nov 2020 08:12:47 +0000 (09:12 +0100)
.idea/workspace.xml
config/bureau.php
config/media.php
config/remote.php
config/salon.php
config/tv.php
js/home.js
scripts/lib/mediarasp.php
scripts/lib/scenes.php
scripts/lib/shield.php

index 8971d94cf346d80d8769cd803811f13419786de9..37ab502c94639116a5981ebd63bc2c5cc391aea8 100644 (file)
@@ -2,20 +2,16 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change afterPath="$PROJECT_DIR$/scripts/netflix.php" 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/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/remote.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/remote.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.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/freeboxchannel.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/freeboxchannel.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/bricks.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/bricks.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/freebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/freebox.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$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" 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/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/remoteinfos.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/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1603811262372" duration="1988000" />
       <workItem from="1603958541180" duration="5032000" />
       <workItem from="1604042543878" duration="11137000" />
-      <workItem from="1604152329376" duration="35013000" />
-    </task>
-    <task id="LOCAL-00313" summary=".">
-      <created>1583689851384</created>
-      <option name="number" value="00313" />
-      <option name="presentableId" value="LOCAL-00313" />
-      <option name="project" value="LOCAL" />
-      <updated>1583689851384</updated>
+      <workItem from="1604152329376" duration="39185000" />
     </task>
     <task id="LOCAL-00314" summary=".">
       <created>1584002002804</created>
       <option name="project" value="LOCAL" />
       <updated>1604237480617</updated>
     </task>
-    <option name="localTasksCounter" value="362" />
+    <task id="LOCAL-00362" summary=".">
+      <created>1604253174045</created>
+      <option name="number" value="00362" />
+      <option name="presentableId" value="LOCAL-00362" />
+      <option name="project" value="LOCAL" />
+      <updated>1604253174045</updated>
+    </task>
+    <option name="localTasksCounter" value="363" />
     <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="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604237478231">
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604253167008">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
-    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604237478231" />
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604253167008" />
     <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="1603961854066" />
     <state x="635" y="216" key="FileChooserDialogImpl" timestamp="1604227698339">
       <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="1603559077781">
-      <screen x="0" y="0" width="2560" height="1040" />
+    <state x="651" y="227" width="550" height="534" key="find.popup" timestamp="1604301949692">
+      <screen x="0" y="0" width="1707" height="920" />
     </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="1603559077781" />
     <state x="512" y="211" key="run.anything.popup" timestamp="1604146410464">
       <screen x="0" y="0" width="1707" height="920" />
index c2e02c2d29f4d9a0e8535d24654de9de42bbc01d..2490a299a859fb316b057ca54c7de80a2d0ab021 100644 (file)
@@ -11,8 +11,8 @@ config('SLEEPSCREEN', 15);
 config('VIDEOPLAYER_DEVICE', 'bureau');
 config('HIDEMASK_TIMEOUT', 250);
 //
-config('TVPLAYER', 'shield');
-config('VIDEOPLAYER', 'shield');
+//config('TVPLAYER', 'shield');
+//config('VIDEOPLAYER', 'shield');
 
 
 if (DISPLAYINTERFACE) {
index ed4c6913ee352c93d8b6482d14c4ca6ed1e120e3..e9381ea03ca231e723ba1243e0d3f905111e7e8b 100644 (file)
@@ -8,7 +8,7 @@ $shortcuts['media'] = [['label' => 'TV', 'type' => 'sub', 'sub' => 'tv'], ['labe
 $shortcuts['media'][] = ['label' => 'Séries TV', 'type' => 'sub', 'sub' => 'seriestv'];
 $shortcuts['media'][] = ['label' => 'Films', 'type' => 'sub', 'sub' => 'movies'];
 if ($device == 'salon') {
-    $shortcuts['media'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?menu=netflix', 'label' => '<img src="images/netflix.png">');
+    $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'];
index a48a27b1eb6327c86d71f1030b9f05dab19cd123..a2e0adbecb733c818f56bbf2b3fdf6e9001cf638 100644 (file)
@@ -37,6 +37,23 @@ $bricksShield = ['type' => 'shield', 'width' => 4, 'height' => 4, 'bricks' => [
     ['type' => 'remote-shield-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
 ]];
 
+$bricksShieldMedia = ['type' => 'shieldMedia', 'width' => 5, 'height' => 4, 'bricks' => [
+    ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 1, 'left' => 0],
+    ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 0],
+    ['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 1],
+    ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 3],
+    ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 3],
+    ['type' => 'remote-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 2],
+    ['type' => 'remote-left', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 1],
+    ['type' => 'remote-down', 'width' => 1, 'height' => 1, 'top' => 3, 'left' => 2],
+    ['type' => 'remote-right', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 3],
+    ['type' => 'remote-shield-back', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 1],
+    ['type' => 'remote-shield-menu', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1],
+    ['type' => 'remote-shield-home', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1 + 2],
+    ['type' => 'remote-shield-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
+]];
+
+
 $bricksSqueezebox = ['type' => 'squeezebox', 'width' => 6, 'height' => 4, 'bricks' => [
     ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 0],
     ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 1],
index 0315f2e971e9a144b51c8f5fa20dbb97638f14e2..35af00e32ff0dca68bdfb320180df944dc1e98d7 100644 (file)
@@ -2,31 +2,31 @@
 config('ROOM_NAME', 'Salon');
 config('ROOM', 'salon');
 config('SQUEEZEBOX_PLAYER', 'Salon');
-config('VIDEOPLAYER', 'mediarasp');
-config('TVPLAYER', 'freebox');
-config('VOLUME_DEVICE', 'Harmony');
-config('VIDEOPLAYER_DEVICE','salon');
-config('HIDEMASK_TIMEOUT',250);
+config('VIDEOPLAYER', 'shield');
+config('TVPLAYER', 'shield');
+config('VOLUME_DEVICE', 'shield');
+config('VIDEOPLAYER_DEVICE', 'salon');
+config('HIDEMASK_TIMEOUT', 250);
 
 if (DISPLAYINTERFACE) {
-       $c = salon();
-       $shortcuts['lights'] = $c['all'];
-       $favoriteslights = [
-               ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
-               ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
-       ];
-       $favoriteslights = array_merge($favoriteslights, $c['favorites']);
+    $c = salon();
+    $shortcuts['lights'] = $c['all'];
+    $favoriteslights = [
+        ['type' => 'volume', 'volume' => '3%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+        ['type' => 'volume', 'volume' => '3%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+    ];
+    $favoriteslights = array_merge($favoriteslights, $c['favorites']);
 
-       include_once "remote.php";
-       include "default.php";
-       include ROOT . "/config/media.php";
+    include_once "remote.php";
+    include "default.php";
+    include ROOT . "/config/media.php";
 
-       $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
+    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
     <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
     <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
     <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
     <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <a href="/scripts/light.php?scene=salon/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>
+    <!--<a href="/scripts/light.php?scene=salon/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>-->
     <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
     <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
     <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
index ff0ddf7257568ba98f80800df8c0e95280163085..9fdb0b73c4187acb7a7e0e794e0e448d44ab8af4 100644 (file)
@@ -65,6 +65,9 @@ foreach ($tv as $name => $service) {
         if ($tvplayer === 'shield') {
             if (isset($service['shield'])) {
                 $e = explode(':', $service['shield'], 2);
+                if ($name === 'netflix') {
+                    $name = '<img src="images/netflix.png">';
+                }
                 $shortcuts['sub-tv'][] = array('type' => 'shield', 'url' => 'scripts/shield.php?' . $e[0] . '=' . $e[1], 'label' => $name);
             }
         } else if ($tvplayer == 'freebox') {
index 7bfe269c2db1571a9bce07232197307a35e6d774..3d5581b36cfe7a69588c5ffcf67dab3bdbcfdb3b 100644 (file)
@@ -821,7 +821,7 @@ function resize() {
 
     // Resize bar
     var nbicons = $("header a").length;
-    var fz = hh / nbicons / 1.4;
+    var fz = hh / nbicons / 1.58;
     $("header").css('fontSize', fz);
 
     var baseCellWidth = 6.4;
index 78cd4ab58f7076f527d8f9c9521338d22b2ebce6..1150ef8dd23f153de73a38dd3deeaa7c5e8d51dd 100644 (file)
@@ -327,7 +327,7 @@ function mediaRaspCommons($device)
         if (!isAlive('bureau')) {
             sleep(60);
         }
-        //irsend('bureau', 'Projector', 'PowerOn');
+        irsend('bureau', 'Projector', 'PowerOn');
         sshRunCommand('/usr/local/bin/soundtohdmi', 'bureau', true, true);
     } else if ($device == 'sdb') {
         execScene('sdb/ampli/on');
index db58dd3d88eca6f3cb0fca1a51f5d7d7300cc816..d716daa086f4de95759210d1af1e29e8118eca40 100644 (file)
@@ -386,7 +386,7 @@ $scenes = [
         ['type' => 'domoticz', 'device' => '478', 'command' => 'Toggle', 'priority' => true],
     ],
 
-    'bureau/wakeuppc' => [
+    'wakeuppc' => [
         ['type' => 'function', 'function' => 'wakeupPC', 'args' => ['avion']],
     ],
     'bureau/sleeppc' => [
@@ -509,11 +509,11 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'bureau/sleepPC'],
     ],
     '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' => 'bureau', 'device' => 'Projector', 'command' => 'PowerOn'],
+        ['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' => 'bureau', 'device' => 'Projector', 'command' => 'PowerOn'],
     ],
     'bureau/screen/down' => [
         ['type' => 'domoticz', 'device' => '1', 'command' => true, 'priority' => true],
index 2c65d77ba55b5fe3783e1fc9a74e71f8d0a266cd..49bc2c586cc01751ff8fb25d8bef1c1e1eeb0606 100644 (file)
@@ -1,13 +1,18 @@
 <?php
 define('SHIELD_HOST', '192.168.13.40');
+
 $shieldConnect = false;
 
 function shieldConnect()
 {
     global $shieldConnect;
-    if (!$shieldConnect) {
+    $lastConnect = getState('shield_lastconnect', null);
+    $limit = time() - 3600;
+    if (!$shieldConnect && ($lastConnect === null || $lastConnect < $limit)) {
+
         $shieldConnect = true;
-        //_adb('connect', SHIELD_HOST);
+        _adb('connect', SHIELD_HOST);
+        $lastConnect = getState('shield_lastconnect', time());
     }
 }