From: Vincent Date: Sat, 9 Jan 2021 14:23:32 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c82fe4618ade045cac6168cf745bfbebc427b015;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c6d07f1..b564800 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,11 @@ - + + + + + diff --git a/config/chambre.php b/config/chambre.php index 24072a0..6efb0e0 100644 --- a/config/chambre.php +++ b/config/chambre.php @@ -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 diff --git a/config/music.php b/config/music.php index c389206..aee8a22 100644 --- a/config/music.php +++ b/config/music.php @@ -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) { diff --git a/scripts/ecomode.php b/scripts/ecomode.php index 0dfb7c7..ead63bf 100644 --- a/scripts/ecomode.php +++ b/scripts/ecomode.php @@ -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); diff --git a/scripts/lib/ecomode.php b/scripts/lib/ecomode.php index fb8348a..7c13c22 100644 --- a/scripts/lib/ecomode.php +++ b/scripts/lib/ecomode.php @@ -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 diff --git a/scripts/lib/redis.php b/scripts/lib/redis.php index 9a42c94..76cf99a 100644 --- a/scripts/lib/redis.php +++ b/scripts/lib/redis.php @@ -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;