]> _ Git - tortuga-home.git/commitdiff
.
authorvincent <vincent@enhydra.fr>
Wed, 13 Apr 2022 08:10:06 +0000 (10:10 +0200)
committervincent <vincent@enhydra.fr>
Wed, 13 Apr 2022 08:10:06 +0000 (10:10 +0200)
.idea/misc.xml
.idea/workspace.xml
config/entree.php
config/rooms.php
install.md
scripts/domoticz_device_event.php
scripts/lib/scenes.php

index 3b6d90811ed7f8194443c0fefb7303693d4f1a9a..c32f38ae80de2664930caeb71e95751092f79e62 100644 (file)
@@ -64,4 +64,9 @@
     <option name="languageLevel" value="ES6" />
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android API 30 Platform" project-jdk-type="Android SDK" />
+  <component name="SwUserDefinedSpecifications">
+    <option name="specTypeByUrl">
+      <map />
+    </option>
+  </component>
 </project>
\ No newline at end of file
index 9e279d8d9747b99a36939417d4b28c5847a35458..dae97d80510f8f7aed46d092997988b7dfc89c74 100644 (file)
@@ -2,9 +2,13 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/install.md" beforeDir="false" afterPath="$PROJECT_DIR$/install.md" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent">
-    <property name="DatabaseDriversLRU" value="sqlite" />
-    <property name="DefaultHtmlFileTemplate" value="HTML File" />
-    <property name="JavaScriptWeakerCompletionTypeGuess" value="true" />
-    <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
-    <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
-    <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
-    <property name="WebServerToolWindowFactoryState" value="true" />
-    <property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" />
-    <property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" />
-    <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
-    <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
-    <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
-    <property name="add_unversioned_files" value="true&#10;T:/CloudStation/Drive/Works/home/log/profile.log" />
-    <property name="aspect.path.notification.shown" 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$" />
-    <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" />
-    <property name="node.js.path.for.package.eslint" value="project" />
-    <property name="node.js.path.for.package.tslint" value="project" />
-    <property name="node.js.selected.package.eslint" value="(autodetect)" />
-    <property name="node.js.selected.package.tslint" value="(autodetect)" />
-    <property name="nodejs_package_manager_path" value="npm" />
-    <property name="project.structure.last.edited" value="Problems" />
-    <property name="project.structure.proportion" value="0.15" />
-    <property name="project.structure.side.proportion" value="0.2" />
-    <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
-    <property name="vue.rearranger.settings.migration" value="true" />
-  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "WebServerToolWindowFactoryState": "true",
+    "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
+    "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
+    "WebServerToolWindowPanel.toolwindow.show.date": "false",
+    "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
+    "WebServerToolWindowPanel.toolwindow.show.size": "false",
+    "nodejs_package_manager_path": "npm",
+    "ruby.rails.projectView.checked": "true",
+    "vue.rearranger.settings.migration": "true"
+  }
+}]]></component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="T:\Drive\Works\home" />
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration default="true" type="Application" factoryName="Application">
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <method v="2">
-        <option name="Make" enabled="true" />
-      </method>
-    </configuration>
     <configuration default="true" type="GrailsRunConfigurationType" factoryName="Grails">
       <setting name="vmparams" value="" />
       <setting name="cmdLine" value="run-app" />
       <setting name="depsClasspath" value="false" />
       <method v="2" />
     </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
+    </configuration>
     <configuration default="true" type="JUnit" factoryName="JUnit">
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
       <workItem from="1645812379443" duration="615000" />
       <workItem from="1646485258542" duration="4468000" />
       <workItem from="1647437683316" duration="79000" />
-      <workItem from="1649747856888" duration="2104000" />
-    </task>
-    <task id="LOCAL-00471" summary=".">
-      <created>1618989464530</created>
-      <option name="number" value="00471" />
-      <option name="presentableId" value="LOCAL-00471" />
-      <option name="project" value="LOCAL" />
-      <updated>1618989464530</updated>
+      <workItem from="1649747856888" duration="2527000" />
+      <workItem from="1649833630727" duration="738000" />
+      <workItem from="1649835938314" duration="1333000" />
     </task>
     <task id="LOCAL-00472" summary=".">
       <created>1619248801662</created>
       <option name="project" value="LOCAL" />
       <updated>1646749626317</updated>
     </task>
-    <option name="localTasksCounter" value="520" />
+    <task id="LOCAL-00520" summary=".">
+      <created>1649833131469</created>
+      <option name="number" value="00520" />
+      <option name="presentableId" value="LOCAL-00520" />
+      <option name="project" value="LOCAL" />
+      <updated>1649833131470</updated>
+    </task>
+    <option name="localTasksCounter" value="521" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index ea40852ff09efdb3b71042a78e8de010943da77e..155dda461a893fcf5da3e05f39e4b6dcbd892c92 100644 (file)
@@ -19,7 +19,7 @@ if (DISPLAYINTERFACE) {
        $c = home();
        $shortcuts['lights'] = $c['all'];
        $favoriteslights = $c['favorites'];
-       array_splice($favoriteslights, 2, 0, [['type' => 'velib'], ['type' => 'traffic']]);
+       array_splice($favoriteslights, 3, 0, [['type' => 'velib'], ['type' => 'traffic']]);
 
     $nav=['home','lights','music','coffee','switch','settings','alert','off'];
 
index ddfea6ac995648d89724b2ac40f4b73d1d70c92e..2735361c1f44ad9ee6819b5e963bd8ac671d6f16 100644 (file)
@@ -46,8 +46,9 @@ function lit($additionnalfavorites = array())
 function home()
 {
     $favorites = [
-        ['type' => 'light', 'scene' => 'home/welcome', 'label' => 'Bienvenue', 'confirm' => ['message' => 'Quelqu\'un dort peut-être. Veuillez confirmer votre action.', 'conditions' => ['night' => '1']]],
+        ['type' => 'light', 'scene' => 'home/welcome/eco', 'label' => 'Bienvenue&nbsp;🌿'],
         ['type' => 'light', 'scene' => 'home/off', 'label' => 'éteindre'],
+        ['type' => 'light', 'scene' => 'home/welcome', 'label' => 'Bienvenue&nbsp;★', 'confirm' => ['message' => 'Quelqu\'un dort peut-être. Veuillez confirmer votre action.', 'conditions' => ['night' => '1']]],
     ];
     $all = array_merge($favorites, [
 
index aaf2cbf97cc68902201ce74bafa37186367c4b3e..88206537d546eed8ff100902188d25eb6a894233 100644 (file)
@@ -1,6 +1,6 @@
 `sudo add-apt-repository ppa:ondrej/php;sudo add-apt-repository ppa:ondrej/apache2;sudo apt-get update`
 
-`apt update;apt install composer python3-certbot-apache wakeonlan adb lynx at redis php7.4-fpm php7.4-opcache php7.4-json php7.4-xml php7.4-curl php7.4-redis php7.4-igbinary php7.4-ssh2 php7.4-soap php7.4-sockets php7.4-mysql php7.4-gd php7.4-exif php7.4-imap php7.4-mbstring xplanet`
+`apt update;apt install composer python3-certbot-apache wakeonlan adb lynx at redis php7.4-fpm php7.4-opcache php7.4-json php7.4-xml php7.4-curl php7.4-redis php7.4-igbinary php7.4-ssh2 php7.4-soap php7.4-sockets php7.4-mysql php7.4-gd php7.4-exif php7.4-imap php7.4-mbstring xplanet fonts-noto-color-emoji`
 
 `useradd --gid www-data --shell /bin/bash tortugahome`
 `mkdir -p /var/log/tortugahome/profiles/;chown -R tortugahome:www-data /var/log/tortugahome`
index 701fa9d915d9a75bb8e4606b4b025da8ceeeb0d1..c8d337290cac3d0c3810b0bbf3112e00f4948dc4 100644 (file)
@@ -31,7 +31,7 @@ if ($_GET['device'] == 480) {
             execScene('salon/cinema');
             break;
         case 'Flip_180':
-            execScene('salon/on');
+            execScene('salon/auto');
             break;
         case 'Free_Fall':
             off('salon');
index c27713ab365d2dae917db67697918bb33dc49164..d74960244fc8cc497e153dbf7f3f7c3f1feaef3d 100644 (file)
@@ -348,7 +348,12 @@ $scenes = [
     'salon/projector/off' => [
         ['type' => 'function', 'function' => 'epson', 'args' => [false, true]],
     ],
-    'salon/on' => [
+
+    'salon/auto' => [
+        ['type' => 'function', 'function' => 'salonAuto', 'args' => [true]],
+    ],
+
+    'salon/day' => [
         ['type' => 'domoticz', 'scene' => 45, 'command' => true, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO', 'repeat' => 2],
         ['type' => 'state', 'key' => 'salon', 'value' => 'on'],
@@ -363,6 +368,7 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'salon/cheminee', 'delay' => 1],
     ],
     'salon/off' => [
+        ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
         ['type' => 'domoticz', 'scene' => 45, 'command' => false, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)],
         ['type' => 'state', 'key' => 'salon', 'value' => 'off'],
@@ -378,6 +384,7 @@ $scenes = [
         // ['type' => 'insteon', 'command' => '0?1111=I=0=0'],
     ],
     'salon/cineclub' => [
+        ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
         ['type' => 'domoticz', 'scene' => 46, 'command' => true, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'xpCjXtV3u7O1kYu', 'repeat' => 2],
         ['type' => 'scene', 'scene' => 'salon/cinemabase'],
@@ -386,6 +393,7 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'cuisine/tamise', 'repeat' => 2],
     ],
     'salon/cinema' => [
+        ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
         ['type' => 'domoticz', 'scene' => 47, 'command' => true, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35', 'repeat' => 2],
         ['type' => 'scene', 'scene' => 'salon/cinemabase'],
@@ -394,6 +402,7 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'cuisine/tamise', 'repeat' => 2],
     ],
     'salon/tamise' => [
+
         ['type' => 'ecomode', 'mode' => '0'],
         ['type' => 'domoticz', 'scene' => 48, 'command' => true, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'RbjnIcLtcDuHbfU', 'repeat' => 2],
@@ -403,6 +412,7 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'cuisine/on', 'repeat' => 2],
     ],
     'salon/lecturenocture' => [
+        ['type' => 'function', 'function' => 'salonAuto', 'args' => [false]],
         ['type' => 'domoticz', 'scene' => 49, 'command' => true, 'priority' => true],
         ['type' => 'hue', 'group' => $salon, 'scene' => 'HZiYyM6hMUMkmiY'],
         ['type' => 'state', 'key' => 'salon', 'value' => 'tamise'],
@@ -673,10 +683,15 @@ $scenes = [
         ['type' => 'scene', 'scene' => 'salon/off', 'delay' => 2],
         ['type' => 'function', 'key' => 'hotwaterAutoMode', 'args' => ['1']],
     ],
-    'home/welcome' => [
+
+    'home/welcome/eco' => [
         ['type' => 'scene', 'scene' => 'cuisine/on'],
-        ['type' => 'scene', 'scene' => 'cuisine/hotte/on'],
-        ['type' => 'scene', 'scene' => 'salon/on'],
+        ['type' => 'scene', 'scene' => 'salon/auto'],
+        ['type' => 'ecomode', 'mode' => '0'],
+    ],
+
+    'home/welcome' => [
+        ['type' => 'scene', 'scene' => 'home/welcome/eco'],
         ['type' => 'scene', 'scene' => 'bureau/auto'],
         ['type' => 'scene', 'scene' => 'chambre/auto'],
         ['type' => 'scene', 'scene' => 'sdb/on'],
@@ -901,6 +916,8 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
             bureauAuto(false);
         } else if ($e[0] == 'cour') {
             courAuto(false);
+        } else if ($e[0] == 'salon') {
+            salonAuto(false);
         }
     }
 
@@ -1145,6 +1162,17 @@ function bedbrightness($brightness)
     sshCommand($cmd, 'litjerome');
 }
 
+function salonAuto($on = true)
+{
+    if ($on) {
+
+        setState('salonAutoMode', '1');
+        updateSalonAuto();
+    } else if (getState('salonAutoMode') === '1') {
+        setState('salonAutoMode', '0');
+    }
+}
+
 function chambreAuto($on = true, $transitionTime = null)
 {
     if ($on) {
@@ -1176,6 +1204,19 @@ function courAuto($on = true)
     }
 }
 
+function updateSalonAuto()
+{
+    $hours = intval(date('H'));
+    if ($hours <= 9) {
+        $scene = 'tamise';
+    } else if ($hours <= 22) {
+        $scene = 'day';
+    } else {
+        $scene = 'tamise';
+    }
+    execScene('salon/' . $scene, false);
+}
+
 function updateChambreAuto($transitionTime = null)
 {
     $hours = intval(date('H'));