From: Vincent Date: Wed, 5 May 2021 09:38:04 +0000 (+0200) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8d393c50e5945e198aa7edad771039f123abed1f;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c83fb95..5213305 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,15 @@ + + + + - + + - + + - @@ -281,17 +286,6 @@ diff --git a/config/cave.php b/config/cave.php new file mode 100644 index 0000000..1c8bf1b --- /dev/null +++ b/config/cave.php @@ -0,0 +1,32 @@ + 'volume', 'volume' => '5%', 'increase' => '+', 'label' => ''], + ['type' => 'volume', 'volume' => '5%', 'increase' => '-', 'label' => ''], + ]; + $favoriteslights[] = array_merge($allmusics['France Info'], array('volume' => 50)); + $favoriteslights = array_merge($favoriteslights, $c['favorites']); + include "media.php"; + include "default.php"; +} \ No newline at end of file diff --git a/config/global.php b/config/global.php index 2beaaf3..52ded1f 100644 --- a/config/global.php +++ b/config/global.php @@ -41,16 +41,21 @@ $squeezeboxPlayers = array( $phones = [ 'vincent' => [ - 'ip' => '192.168.13.31', + 'ip' => '192.168.13.20', 'key' => 'APA91bHeWfPc86eVpVzYDfQHdolELsdHdlNou2a2YoMWhBuAG9odAlfZLBjve9zDBq4U04e_zd2tA864El8Z2NfUh7XJktOHbU4F1mdmAVczklg5ZFRClvhX4f8fqfZ9YLG94NdBQbGn', 'password' => '4pyA?Rnyeyc1$44M' ], 'cuisine' => [ - 'ip' => '192.168.13.32', + 'ip' => '192.168.13.31', 'key' => 'dmGYolpN-k4:APA91bEcMcfkZ0jZViEvyqyVWoT71-vQko9DE0wwg-vzPkZ5-lHwiVJDH38dXfIoWrHWTrtEiMsv-6TrebFR-dNOLhVoVUb3rCsehmLi-Ew17lkP75Yqds3KsWEiyF_yx-i-9dc_4ewV', 'password' => '4pyA?Rnyeyc1$44M' ], 'salon' => [ + 'ip' => '192.168.13.30', + 'key' => 'dmGYolpN-k4:APA91bEcMcfkZ0jZViEvyqyVWoT71-vQko9DE0wwg-vzPkZ5-lHwiVJDH38dXfIoWrHWTrtEiMsv-6TrebFR-dNOLhVoVUb3rCsehmLi-Ew17lkP75Yqds3KsWEiyF_yx-i-9dc_4ewV', + 'password' => '4pyA?Rnyeyc1$44M' + ], + 'sdb' => [ 'ip' => '192.168.13.32', 'key' => 'dmGYolpN-k4:APA91bEcMcfkZ0jZViEvyqyVWoT71-vQko9DE0wwg-vzPkZ5-lHwiVJDH38dXfIoWrHWTrtEiMsv-6TrebFR-dNOLhVoVUb3rCsehmLi-Ew17lkP75Yqds3KsWEiyF_yx-i-9dc_4ewV', 'password' => '4pyA?Rnyeyc1$44M' @@ -78,10 +83,11 @@ $devices = [ 'chambre' => ['id' => 'chambre', 'host' => '192.168.13.65', 'user' => 'pi', 'password' => 'atacama'], 'salon' => ['id' => 'salon', 'host' => '192.168.13.66', 'shield' => '192.168.13.40', 'user' => 'pi', 'password' => 'atacama'], 'bureau' => ['id' => 'bureau', 'shield' => '192.168.13.41'], - 'wc' => ['id' => 'wc', 'host' => '192.168.13.67','user' => 'pi', 'password' => 'raspberry'], - 'cuisine' => ['id' => 'cuisine', 'host' => '192.168.13.68', 'user' => 'pi', 'password' => 'atacama'], + 'wc' => ['id' => 'wc', 'host' => '192.168.13.67', 'user' => 'pi', 'password' => 'raspberry'], + 'cuisine' => ['id' => 'cuisine', 'host' => '192.168.13.68', 'shield' => '192.168.13.31', 'user' => 'pi', 'password' => 'atacama'], 'bureausun' => ['id' => 'bureausun', 'host' => '192.168.13.70', 'shield' => '192.168.13.41', 'user' => 'pi', 'password' => 'atacama'], 'lit' => ['id' => 'lit', 'host' => '192.168.13.69', 'user' => 'pi', 'password' => 'atacama'], + 'sdb' => ['id' => 'sdb', 'shield' => '192.168.13.32'], 'avion' => ['id' => 'avion', 'host' => '192.168.13.5', 'user' => 'Tortuga', 'password' => 's77vpo*wu', 'mac' => 'E0:D5:5E:68:67:B9'], ]; diff --git a/config/rooms.php b/config/rooms.php index 37415e4..6667d54 100644 --- a/config/rooms.php +++ b/config/rooms.php @@ -1,6 +1,6 @@ 'Maison', 'salon' => 'Salon', 'chambre' => 'Chambre', 'bureau' => 'Bureau', 'sdb' => 'Salle de bain', 'cour' => 'Cour', 'wc' => 'WC', 'cuisine' => 'Cuisine'); +$rooms = array('home' => 'Maison', 'salon' => 'Salon', 'chambre' => 'Chambre', 'bureau' => 'Bureau', 'sdb' => 'Salle de bain', 'cour' => 'Cour', 'wc' => 'WC', 'cuisine' => 'Cuisine', 'cave' => 'Cave'); function chambre($additionnalfavorites = array()) { @@ -136,6 +136,17 @@ function sdb() return array('all' => $all, 'favorites' => $favorites); } +function cave() +{ + $favorites = [ + + ]; + $all = array_merge($favorites, [ + + ]); + return array('all' => $all, 'favorites' => $favorites); +} + function wc() { $favorites = [ diff --git a/images/rooms/medium/cave.jpg b/images/rooms/medium/cave.jpg new file mode 100644 index 0000000..509f34b Binary files /dev/null and b/images/rooms/medium/cave.jpg differ diff --git a/images/rooms/originaux/cave.jpg b/images/rooms/originaux/cave.jpg new file mode 100644 index 0000000..de2d084 Binary files /dev/null and b/images/rooms/originaux/cave.jpg differ diff --git a/images/rooms/small/cave.jpg b/images/rooms/small/cave.jpg new file mode 100644 index 0000000..f08fa01 Binary files /dev/null and b/images/rooms/small/cave.jpg differ diff --git a/js/cordova.js b/js/cordova.js index 11c9864..03dd9b0 100644 --- a/js/cordova.js +++ b/js/cordova.js @@ -10,6 +10,7 @@ if (window.cordova) { document.addEventListener('deviceready', _onDeviceReady, false); } + function _onDeviceReady() { console.log('_onDeviceReady'); if (JQUERY_READY) { @@ -19,11 +20,6 @@ function _onDeviceReady() { } } -// setTimeout(function () { -// console.log('trigger _onDeviceReady'); -// _onDeviceReady(); -// }, 6000); - $(function () { console.log('jquery ready'); JQUERY_READY = true; @@ -34,6 +30,10 @@ $(function () { function onDeviceReady() { console.log('onDeviceReady'); + if (window.cordova) { + initCordova(); + return; + } cordovaInitInterval = setInterval(function () { console.log('check cordova'); if (window.cordova) { @@ -73,6 +73,6 @@ function initCordova() { document.addEventListener('volumedownbutton', volumeDown, false); document.addEventListener('volumedownbutton', volumeUp, false); } catch (e) { - + console.log(e); } } \ No newline at end of file diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index 77f5db3..f77f498 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -308,6 +308,7 @@ $scenes = [ 'home/alert' => [ ['type' => 'domoticz', 'device' => '4207', 'command' => true, 'priority' => true], ['type' => 'hue', 'group' => $alert, 'scene' => ['alert' => 'lselect']], + ['type' => 'hue', 'group' => $alert, 'delay' =>3, 'scene' => ['alert' => 'none']], ['type' => 'phonetask', 'phone' => 'vincent', 'task' => 'Tortuga Alerte'], ], 'home/aulit' => [