]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Wed, 5 May 2021 09:38:04 +0000 (11:38 +0200)
committerVincent <vincent@enhydra.fr>
Wed, 5 May 2021 09:38:04 +0000 (11:38 +0200)
.idea/workspace.xml
config/cave.php [new file with mode: 0644]
config/global.php
config/rooms.php
images/rooms/medium/cave.jpg [new file with mode: 0644]
images/rooms/originaux/cave.jpg [new file with mode: 0644]
images/rooms/small/cave.jpg [new file with mode: 0644]
js/cordova.js
scripts/lib/scenes.php

index c83fb953c7f61b8b43e8c66cf955a02365545236..52133058b536ef80dea9780720db91d9ae772884 100644 (file)
@@ -2,10 +2,15 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change afterPath="$PROJECT_DIR$/config/cave.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/images/rooms/medium/cave.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/images/rooms/originaux/cave.jpg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/images/rooms/small/cave.jpg" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/js/cordova.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/cordova.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1553247665857" />
     <property name="dumpAutoload T:/Drive/Works/home/composer.json" value="--no-interaction --ansi --verbose --optimize" />
     <property name="editor.config.ad.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/images/rooms/small" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/config" />
     <property name="list.type.of.created.stylesheet" value="Less" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="T:\Drive\Works\home\config" />
       <recent name="T:\Drive\Works\home\images\rooms\small" />
       <recent name="T:\Drive\Works\home\images\rooms\medium" />
       <recent name="T:\Drive\Works\home\images" />
       <recent name="T:\Drive\Works\home\style\fonts\fontawesome" />
-      <recent name="T:\Drive\Works\home" />
     </key>
     <key name="MoveFile.RECENT_KEYS">
       <recent name="T:\Drive\Works\home\images" />
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
-      <option name="arquillianRunConfiguration">
-        <value>
-          <option name="containerStateName" value="" />
-        </value>
-      </option>
-      <option name="TEST_OBJECT" value="class" />
-      <method v="2">
-        <option name="Make" enabled="true" />
-      </method>
-    </configuration>
     <configuration default="true" type="ArquillianTestNG" factoryName="">
       <option name="arquillianRunConfiguration">
         <value>
       <workItem from="1619802300800" duration="355000" />
       <workItem from="1619888463622" duration="1227000" />
       <workItem from="1619952129836" duration="292000" />
-      <workItem from="1619952673812" duration="6968000" />
-    </task>
-    <task id="LOCAL-00431" summary=".">
-      <created>1610463457268</created>
-      <option name="number" value="00431" />
-      <option name="presentableId" value="LOCAL-00431" />
-      <option name="project" value="LOCAL" />
-      <updated>1610463457269</updated>
+      <workItem from="1619952673812" duration="9571000" />
+      <workItem from="1620155832676" duration="2964000" />
     </task>
     <task id="LOCAL-00432" summary=".">
       <created>1610463936245</created>
       <option name="project" value="LOCAL" />
       <updated>1619954224128</updated>
     </task>
-    <option name="localTasksCounter" value="480" />
+    <task id="LOCAL-00480" summary=".">
+      <created>1620028289049</created>
+      <option name="number" value="00480" />
+      <option name="presentableId" value="LOCAL-00480" />
+      <option name="project" value="LOCAL" />
+      <updated>1620028289049</updated>
+    </task>
+    <option name="localTasksCounter" value="481" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
diff --git a/config/cave.php b/config/cave.php
new file mode 100644 (file)
index 0000000..1c8bf1b
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+config('ROOM_NAME', 'Cave');
+config('ROOM', 'cave');
+config('SQUEEZEBOX_PLAYER', 'Cave');
+config('SLEEPSCREEN', 30);
+config('SCREENSAVER_BRIGHTNESS', 100);
+config('SLEEPTYPE', 'screensaver');
+config('SCREENSAVER','weatherstation');
+config('VIDEOPLAYER', 'mediarasp-small');
+config('TVPLAYER', 'mediarasp-small');
+config('VOLUME', 60);
+config('VOLUME_DEVICE', 'Squeezebox');
+config('VOLUME_STEP',5);
+config('HIDEMASK_TIMEOUT',250);
+config('THEME','#978270');
+
+if (DISPLAYINTERFACE) {
+    $c = cave();
+    $shortcuts['lights'] = $c['all'];
+    $nav=['home','lights','music','media','remote','switch','settings','alert','off'];
+
+       include_once ROOT . '/config/music.php';
+
+       $favoriteslights = [
+               ['type' => 'volume', 'volume' => '5%', 'increase' => '+', 'label' => '<i class="fa fa-volume-up"></i>'],
+               ['type' => 'volume', 'volume' => '5%', 'increase' => '-', 'label' => '<i class="fa fa-volume-down"></i>'],
+       ];
+       $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
index 2beaaf310525939597521cfbff890f7418d6a263..52ded1f35d86ddc3d1e90b21755d10ae87726838 100644 (file)
@@ -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'],
 ];
 
index 37415e4085889b013b59bd2e849c34de19f4e864..6667d542905cf825e7a5e2131b49e7daa6c6b308 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-$rooms = array('home' => '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 (file)
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 (file)
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 (file)
index 0000000..f08fa01
Binary files /dev/null and b/images/rooms/small/cave.jpg differ
index 11c98645e61b60c8e3452a6c9af008dea34f0925..03dd9b010410661a03b3202dde6d267aac74d333 100644 (file)
@@ -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
index 77f5db3539da644233197db6541370b3bac7541a..f77f49828cf6ca6a691d7a16f2cf082bf2c0e421 100644 (file)
@@ -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' => [