From: Vincent Date: Fri, 26 Feb 2021 20:11:08 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=97349ea7231b2e065eed89f12a2a71ba92fc6c06;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index aa442fa..b70ffe4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,9 @@ - + + + diff --git a/scripts/lib/denon.php b/scripts/lib/denon.php index 0df0cb2..0136cf6 100644 --- a/scripts/lib/denon.php +++ b/scripts/lib/denon.php @@ -62,7 +62,7 @@ function denonAVRInput($input) usleep(1000000 * 0.5); } - denonAVRSetSpeakerPreset(1); + //denonAVRSetSpeakerPreset(1); } function denonAVRGetVolume() @@ -141,10 +141,11 @@ function epson($on = true, $force = false) return; } $cmd = $on ? 'PowerOn' : 'PowerOff'; + echo 'Epson ' . $cmd . "\n"; sshCommand('/usr/local/bin/ir Epson ' . $cmd, 'salon'); setState('EpsonPowerState', $on ? '1' : '0'); if ($currentState !== $on && $on) { - sleep(15); + sleep(21); } } diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index a7965de..3fe6b09 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -384,7 +384,7 @@ $scenes = [ ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']], ], 'salon/media/off' => [ - ['type' => 'function', 'function' => 'off','args'=>['salon']], + ['type' => 'function', 'function' => 'off','args'=> ['salon']], ], 'salon/media/play' => [ @@ -581,7 +581,6 @@ $scenes = [ ['type' => 'ecomode', 'mode' => '2'], ['type' => 'scene', 'scene' => 'cuisine/off'], ['type' => 'scene', 'scene' => 'salon/off'], - ['type' => 'scene', 'scene' => 'salon/media/off'], ['type' => 'scene', 'scene' => 'cour/off'], ['type' => 'scene', 'scene' => 'bureau/off'], ['type' => 'scene', 'scene' => 'chambre/off'], @@ -595,6 +594,7 @@ $scenes = [ ['type' => 'scene', 'scene' => 'chambre/planetarium/off'], ['type' => 'ifttt', 'event' => 'coffee_off'], ['type' => 'scene', 'scene' => 'home/hueoff'], + ['type' => 'scene', 'scene' => 'salon/media/off'], ['type' => 'scene', 'scene' => 'salon/off', 'delay' => 2], //['type' => 'ifttt', 'event' => 'oven_off'], ], diff --git a/servers/logcat.php b/servers/logcat.php index 20b16a6..aa60bc9 100644 --- a/servers/logcat.php +++ b/servers/logcat.php @@ -11,11 +11,12 @@ ignore_user_abort(true); $cases = [ 'Going to sleep due to power button' => function () use ($device) { - echo 'sleep' . "\n"; + echo 'sleep ' . $device . "\n"; off($device); + execScene('salon/on'); }, 'Waking up from sleep' => function () use ($device) { - echo 'wakeup' . "\n"; + echo 'wakeup ' . $device . "\n"; if ($device == 'salon') { $state = 'maskShieldSalonWakeup'; $squeezePlayer = 'Salon'; @@ -28,18 +29,18 @@ $cases = [ } }, 'WindowManager: handleComboKeys keyCode: 25, keyAction: 1' => function () use ($device) { - echo 'volume-down' . "\n"; + echo 'volume-down ' . $device . "\n"; if ($device === 'bureau') { volume('3', '-', 'harmony'); - }else if($device==='salon'){ + } else if ($device === 'salon') { volume('2', '-', 'denonavr'); } }, 'WindowManager: handleComboKeys keyCode: 24, keyAction: 1' => function () use ($device) { - echo 'volume-up' . "\n"; + echo 'volume-up ' . $device . "\n"; if ($device === 'bureau') { volume('3', '+', 'harmony'); - }else if($device==='salon'){ + } else if ($device === 'salon') { volume('2', '+', 'denonavr'); } }