]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 9 Jan 2021 14:23:32 +0000 (15:23 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 9 Jan 2021 14:23:32 +0000 (15:23 +0100)
.idea/workspace.xml
config/chambre.php
config/music.php
scripts/ecomode.php
scripts/lib/ecomode.php
scripts/lib/redis.php

index c6d07f1ac4c3236c0979b1ffee2153ddb813ef44..b56480039335eef22e7a568c3bf13c83adaa6af0 100644 (file)
@@ -3,7 +3,11 @@
   <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$/scripts/lib/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/music.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/music.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/redis.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/redis.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1608294874717" duration="62000" />
       <workItem from="1608294975826" duration="1188000" />
       <workItem from="1609367639356" duration="870000" />
-      <workItem from="1609595112361" duration="2602000" />
-    </task>
-    <task id="LOCAL-00379" summary=".">
-      <created>1605092224515</created>
-      <option name="number" value="00379" />
-      <option name="presentableId" value="LOCAL-00379" />
-      <option name="project" value="LOCAL" />
-      <updated>1605092224515</updated>
+      <workItem from="1609595112361" duration="3201000" />
+      <workItem from="1609698147260" duration="38000" />
+      <workItem from="1609950754201" duration="3352000" />
+      <workItem from="1610050680817" duration="1480000" />
     </task>
     <task id="LOCAL-00380" summary=".">
       <created>1605093966322</created>
       <option name="project" value="LOCAL" />
       <updated>1609675360474</updated>
     </task>
-    <option name="localTasksCounter" value="428" />
+    <task id="LOCAL-00428" summary=".">
+      <created>1609681610454</created>
+      <option name="number" value="00428" />
+      <option name="presentableId" value="LOCAL-00428" />
+      <option name="project" value="LOCAL" />
+      <updated>1609681610454</updated>
+    </task>
+    <option name="localTasksCounter" value="429" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 24072a020ff2e3c90de554c1bca0f6e886c72446..6efb0e0a16bc1d177f94c95d6fc20b9b7a42ad86 100644 (file)
@@ -6,9 +6,9 @@ config('SLEEPSCREEN', 15);
 config('SCREENSAVER_BRIGHTNESS', 100);
 config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
-config('VOLUME_DEVICE', 'RaspberryPi:lit');
+config('VOLUME_DEVICE', 'SqueezeboxPlayer');
 config('HIDEMASK_TIMEOUT', 250);
-config('THEME','#5c4736');
+config('THEME', '#5c4736');
 
 if (DISPLAYINTERFACE) {
     if (!isset($shortcuts)) {
@@ -20,5 +20,5 @@ if (DISPLAYINTERFACE) {
     $favoriteslights = $c['favorites'];
 
     include "default.php";
-    $nav = ['home', 'lights', 'music','remote', 'coffee', 'switch', 'settings', 'alert', 'off'];
+    $nav = ['home', 'lights', 'music', 'remote', 'coffee', 'switch', 'settings', 'alert', 'off'];
 }
\ No newline at end of file
index c389206513aec42df91eb7a11addb5170a9d3ced..aee8a22aa5f3b5b0fa2df48fc727fae9ad918fca 100644 (file)
@@ -4,8 +4,8 @@ $allmusics = array();
 squeezeFavorites(connectRedis()->igbget('squeezebox_favorites'), $shortcuts);
 profile('Got Music favorites', __FILE__, __LINE__);
 $podcasts = connectRedis()->igbget('squeezebox_podcasts');
-podcastDir($podcasts, 'Podcasts', 'podcasts', $shortcuts);
-profile('Got podcasts', __FILE__, __LINE__);
+//podcastDir($podcasts, 'Podcasts', 'podcasts', $shortcuts);
+//profile('Got podcasts', __FILE__, __LINE__);
 
 function squeezeFavorites($favorites, &$shortcuts)
 {
index 0dfb7c7187f1678c7f2b0495bd4aca2eba861b05..ead63bf5e816218cde4b80a670c635a132acaeeb 100644 (file)
@@ -14,8 +14,9 @@ if (isset($_GET['action'])) {
 ob_end_clean();
 
 $res = getEcoMode();
+
 if (!$res && in_array(config('DEVICE'), ['bureau', 'bureausun'])) {
-    $res = getDomoticzDeviceStatus(391) === 'Closed';
+    $res = getDomoticzDeviceStatus(391) === 'Closed' ? '1' : '0';
 }
 
 die($res);
index fb8348a74ee6eaa47c2c133cf1dbc1a17435dc30..7c13c22d176344fcb5c8e740f283bdcfdec3edb4 100644 (file)
@@ -37,9 +37,9 @@ function getNightMode()
 
 function getEcoMode()
 {
-    $res = getState('ecomode');
+    $res = getState('ecomode','0');
     if ($res == '0' && getState('night') == '1') {
         $res = '1';
     }
-    return $res;
+    return (string)$res;
 }
\ No newline at end of file
index 9a42c94049de5847c4a4fb9de88ca3b331886d73..76cf99a2fa80465364f8550b179613251401044d 100644 (file)
@@ -6,7 +6,7 @@ class StringSetIb
     extends Predis\Command\StringSet
 {
 
-    protected function filterArguments(Array $arguments)
+    protected function filterArguments(array $arguments)
     {
         $arguments[1] = serialize($arguments[1]);
         return $arguments;
@@ -17,7 +17,7 @@ class StringSetexIb
     extends Predis\Command\StringSetExpire
 {
 
-    protected function filterArguments(Array $arguments)
+    protected function filterArguments(array $arguments)
     {
         $arguments[2] = serialize($arguments[2]);
         return $arguments;
@@ -43,7 +43,6 @@ function connectRedis()
 
     if (!isset($redis)) {
         $redis = getRedisClient();
-
     }
     return $redis;
 }
@@ -72,8 +71,7 @@ function redisEventListener($channel, $callback)
     // Create a dispatcher loop instance and attach a bunch of callbacks.
     $dispatcher = new Predis\PubSub\DispatcherLoop($pubsub);
 
-    $events = new class($callback)
-    {
+    $events = new class($callback) {
         protected $_callback;
         protected $_running = false;