From 662c99dec7bf3bfd7d5943a42fc336a9f6187439 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sat, 27 Mar 2021 10:35:40 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 23 ++++++++++++++--------- scripts/lib/denon.php | 10 +++++----- scripts/lib/kodi.php | 2 +- scripts/lib/scenes.php | 18 ++++++++---------- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8a2c962..5d1b19d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,6 +3,8 @@ + + diff --git a/scripts/lib/denon.php b/scripts/lib/denon.php index f1d8643..0136cf6 100644 --- a/scripts/lib/denon.php +++ b/scripts/lib/denon.php @@ -56,11 +56,11 @@ function denonAVRInput($input) usleep(1000000 * 0.5); } -// $volumes = ['Media Player' => 60, 'HEOS Music' => 50, 'CD' => 30, 'AUX' => 26]; -// if (isset($volumes[$input])) { -// denonAVRVolume($volumes[$input], ''); -// usleep(1000000 * 0.5); -// } + $volumes = ['Media Player' => 60, 'HEOS Music' => 50, 'CD' => 30, 'AUX' => 26]; + if (isset($volumes[$input])) { + denonAVRVolume($volumes[$input], ''); + usleep(1000000 * 0.5); + } //denonAVRSetSpeakerPreset(1); } diff --git a/scripts/lib/kodi.php b/scripts/lib/kodi.php index 894073c..595e0d0 100644 --- a/scripts/lib/kodi.php +++ b/scripts/lib/kodi.php @@ -1,7 +1,7 @@ 'function', 'function' => 'chemineeOff', 'args' => ['salon']], ], 'salon/media/off' => [ - ['type' => 'function', 'function' => 'off','args'=> ['salon']], + ['type' => 'function', 'function' => 'off', 'args' => ['salon']], ], 'salon/media/play' => [ @@ -555,13 +555,13 @@ $scenes = [ 'bureau/base/off' => [ ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'], + ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'off'], ['type' => 'scene', 'scene' => 'bureau/sleeppc'], ], 'bureau/off' => [ ['type' => 'scene', 'scene' => 'bureau/base/off'], ['type' => 'hue', 'group' => $bureau, 'scene' => array('on' => false, 'brightness' => 0)], - ['type' => 'domoticz', 'scene' => 41, 'command' => false, 'priority' => true], - + ['type' => 'domoticz', 'scene' => 42, 'command' => false, 'priority' => true], ], 'bureau/sound/on' => [ ['type' => 'domoticz', 'device' => 24, 'switchtype' => 'scene', 'command' => true, 'priority' => true], @@ -609,7 +609,7 @@ $scenes = [ 'home/off' => [ ['type' => 'scene', 'scene' => 'home/hueoff'], ['type' => 'ecomode', 'mode' => '2'], - ['type' => 'scene', 'scene' => 'cuisine/off'], + //['type' => 'scene', 'scene' => 'cuisine/off'], ['type' => 'scene', 'scene' => 'salon/off'], ['type' => 'scene', 'scene' => 'cour/off'], ['type' => 'scene', 'scene' => 'bureau/off'], @@ -1138,14 +1138,12 @@ function wcVMCOff($timeout = 'auto') { if ($timeout === 'auto') { $d = time() - getState('lastVMCOn'); - if ($d <= 60) { - $timeout = 0; - } else if ($d > 60 && $d <= 120) { - $timeout = 60; + if ($d <= 120) { + $timeout = 600; } else if ($d > 120 && $d <= 300) { - $timeout = 300; + $timeout = 900; } else { - $timeout = 600; + $timeout = 1200; } } $t = time() + $timeout; -- 2.39.5