From 4af14e000396298fc17deb3046b23d3482bd063e Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 1 Nov 2020 12:04:22 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 36 ++++++++++++++++++++---------------- config/bureau.php | 4 ++++ config/rooms.php | 3 ++- scripts/lib/scenes.php | 34 +++++++++++++++++++++++++--------- scripts/lib/shield.php | 9 ++++++++- scripts/shield.php | 2 ++ 6 files changed, 61 insertions(+), 27 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c89f585..baaccae 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,10 +3,10 @@ - - + + + - @@ -1283,12 +1283,16 @@ - + - + + + + + @@ -1297,10 +1301,10 @@ - + - + diff --git a/config/bureau.php b/config/bureau.php index 26d7dcc..c2e02c2 100644 --- a/config/bureau.php +++ b/config/bureau.php @@ -10,6 +10,10 @@ config('SCREENSAVER', 'suncurve'); config('SLEEPSCREEN', 15); config('VIDEOPLAYER_DEVICE', 'bureau'); config('HIDEMASK_TIMEOUT', 250); +// +config('TVPLAYER', 'shield'); +config('VIDEOPLAYER', 'shield'); + if (DISPLAYINTERFACE) { $c = bureau(); diff --git a/config/rooms.php b/config/rooms.php index 979a359..c7829d0 100644 --- a/config/rooms.php +++ b/config/rooms.php @@ -5,8 +5,9 @@ $rooms = array('home' => 'Maison', 'salon' => 'Salon', 'chambre' => 'Chambre', ' function chambre($additionnalfavorites = array()) { $favorites = [ - ['type' => 'light', 'scene' => 'home/aulit', 'label' => 'Au lit ★'], + ['type' => 'light', 'scene' => 'home/aulit', 'label' => 'Au lit ☽'], ['type' => 'light', 'scene' => 'chambre/matin', 'label' => 'Matin ★'], + ['type' => 'light', 'scene' => 'home/aulitoff', 'label' => 'Eteindre ☽'], ['type' => 'light', 'scene' => 'chambre/bed', 'label' => 'Au lit'], ['type' => 'light', 'scene' => 'chambre/sleep', 'label' => 'Nuit'], ['type' => 'light', 'scene' => 'chambre/moon', 'label' => 'Clair de lune'], diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index 2a046d1..db58dd3 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -57,16 +57,19 @@ $scenes = [ ['type' => 'function', 'function' => 'chambreAuto', 'args' => [true]], ], 'chambre/bed' => [ + ['type' => 'scene', 'scene' => 'chambre/bedbase'], + ['type' => 'scene', 'scene' => 'chambre/nightlights'], + ['type' => 'scene', 'scene' => 'sdb/nuit'], + ['type' => 'scene', 'scene' => 'chambre/cheminee'], + ], + 'chambre/bedbase' => [ ['type' => 'function', 'function' => 'chambreAuto', 'args' => [false]], ['type' => 'nightmode', 'mode' => '1'], ['type' => 'ecomode', 'mode' => '1'], ['type' => 'state', 'key' => 'chambre', 'value' => 0], ['type' => 'scene', 'scene' => 'chambre/rideaux/close'], ['type' => 'insteon', 'command' => '0?1131=I=0=0'], - ['type' => 'scene', 'scene' => 'chambre/nightlights'], - ['type' => 'scene', 'scene' => 'sdb/nuit'], ['type' => 'function', 'function' => 'bedbrightness', 'args' => [$bedlowscreenbrightness]], - ['type' => 'scene', 'scene' => 'chambre/cheminee'], ['type' => 'scene', 'scene' => 'chambre/planetarium/on'], // Planétarium on ['type' => 'scene', 'scene' => 'chambre/deshumidificateur/off'], ['type' => 'scene', 'scene' => 'chambre/raspberry/off'], @@ -124,6 +127,11 @@ $scenes = [ ['type' => 'function', 'function' => 'bedbrightness', 'args' => [255]], ['type' => 'scene', 'scene' => 'chambre/cheminee/cold'], ], + 'chambre/sleepoff' => [ + ['type' => 'scene', 'scene' => 'chambre/bedbase'], + ['type' => 'scene', 'scene' => 'sdb/off'], + ['type' => 'scene', 'scene' => 'sdb/off'], + ], 'chambre/sleepbase' => [ ['type' => 'nightmode', 'mode' => '1'], ['type' => 'ecomode', 'mode' => '1'], @@ -297,9 +305,17 @@ $scenes = [ ['type' => 'domoticz', 'device' => '392', 'command' => true, 'priority' => true], ], 'home/aulit' => [ + ['type' => 'scene', 'scene' => 'chambre/aulitbase'], + ['type' => 'scene', 'scene' => 'chambre/bed'], + ], + 'home/aulitoff'=>[ + ['type' => 'scene', 'scene' => 'chambre/aulitbase'], + ['type' => 'scene', 'scene' => 'chambre/off'], + ['type' => 'scene', 'scene' => 'sdb/off'], + ], + 'home/aulitbase' => [ ['type' => 'nightmode', 'mode' => '1'], ['type' => 'ecomode', 'mode' => '1'], - ['type' => 'scene', 'scene' => 'chambre/bed'], ['type' => 'scene', 'scene' => 'bureau/off'], ['type' => 'scene', 'scene' => 'salon/off'], ['type' => 'scene', 'scene' => 'cuisine/off'], @@ -493,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], diff --git a/scripts/lib/shield.php b/scripts/lib/shield.php index ca9275f..bc16aac 100644 --- a/scripts/lib/shield.php +++ b/scripts/lib/shield.php @@ -195,13 +195,20 @@ function shieldGetKeysToChannel($list, $channel, $perline = 4, $sendAfter = []) return $res; } -function shieldVLC($file) +function shieldKodi($file) { shieldHome(); $url = 'smb://Share:dcfyjbcyckwydtgufjx@192.168.13.4/Share/' . $file; _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . $url . '"\' -n org.xbmc.kodi/.Splash'); } +function shieldVLC($file) +{ + shieldHome(); + $url = 'smb://Share:dcfyjbcyckwydtgufjx@192.168.13.4/Share/' . $file; + _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . $url . '"\' -n org.videolan.vlc/.StartActivity'); +} + function shieldListApps() { shieldConnect(); diff --git a/scripts/shield.php b/scripts/shield.php index d92ec3a..068cc3c 100644 --- a/scripts/shield.php +++ b/scripts/shield.php @@ -21,5 +21,7 @@ if (isset($_GET['key'])) { shieldTv($_GET['replay'], 'replay'); } else if (isset($_GET['vlc'])) { shieldVLC($_GET['vlc']); +}else if (isset($_GET['kodi'])) { + shieldKodi($_GET['kodi']); } echo ''; \ No newline at end of file -- 2.39.5