]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Tue, 31 Dec 2019 10:02:16 +0000 (11:02 +0100)
committerVincent <vincent@enhydra.fr>
Tue, 31 Dec 2019 10:02:16 +0000 (11:02 +0100)
.idea/workspace.xml
scripts/cronweather.php [new file with mode: 0644]
scripts/lib/scenes.php
scripts/lib/weatherstation.php

index e717bec4587ada9069354b773897739de5144adc..b6983641e4b5e95761aa0483de2c7ed924cf0b6d 100644 (file)
@@ -2,8 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+      <change afterPath="$PROJECT_DIR$/scripts/cronweather.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1577298151244" duration="2270000" />
       <workItem from="1577358967357" duration="4847000" />
       <workItem from="1577378088885" duration="2201000" />
-      <workItem from="1577380387468" duration="711000" />
-    </task>
-    <task id="LOCAL-00210" summary=".">
-      <created>1566546729894</created>
-      <option name="number" value="00210" />
-      <option name="presentableId" value="LOCAL-00210" />
-      <option name="project" value="LOCAL" />
-      <updated>1566546729894</updated>
+      <workItem from="1577380387468" duration="866000" />
+      <workItem from="1577785483253" duration="1010000" />
     </task>
     <task id="LOCAL-00211" summary=".">
       <created>1566548210701</created>
       <option name="project" value="LOCAL" />
       <updated>1577380602449</updated>
     </task>
-    <option name="localTasksCounter" value="259" />
+    <task id="LOCAL-00259" summary=".">
+      <created>1577381108669</created>
+      <option name="number" value="00259" />
+      <option name="presentableId" value="LOCAL-00259" />
+      <option name="project" value="LOCAL" />
+      <updated>1577381108669</updated>
+    </task>
+    <option name="localTasksCounter" value="260" />
     <servers />
   </component>
   <component name="TodoView">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576479992407" />
-    <state x="701" y="114" key="CommitChangelistDialog2" timestamp="1577380598743">
+    <state x="701" y="114" key="CommitChangelistDialog2" timestamp="1577381105204">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577380598743" />
+    <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1575647157027" />
     <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1576522977384" />
-    <state x="836" y="443" key="NewPhpFileDialog" timestamp="1577363498855">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1577785958789">
+      <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="836" y="443" key="NewPhpFileDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577363498855" />
-    <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576493932196" />
-    <state x="732" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1577380394903">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1577785958789" />
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1577785483789">
+      <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576522032866" />
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1577785483789" />
     <state x="732" y="257" width="607" height="536" key="find.popup" timestamp="1577380471547">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
diff --git a/scripts/cronweather.php b/scripts/cronweather.php
new file mode 100644 (file)
index 0000000..3c9214a
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+require_once __DIR__ . '/cron/cron.php';
+cronWeather(5);
+echo '<pre>' . file_get_contents(ROOT . '/cache/weather.json') . '</pre>';
index 5f5d67cf5b20ab4fbeb8db33daa4a4e0b4c67fd4..789b6e2d46822400b8a4c2b9e2e76dffb6676188 100644 (file)
@@ -661,7 +661,6 @@ function execScene($name, $fromUserAction = false, $transitionTime = null)
                 $action['device'] = $action['scene'];
                 $action['switchtype'] = 'scene';
             }
-
             domoticzSwitch($action['device'], $action['command'], isset($action['switchtype']) ? $action['switchtype'] : 'light', isset($action['priority']) && $action['priority']);
         } else if ($action['type'] == 'ir') {
             irsend($action['room'], $action['device'], $action['command']);
index 5ec37a01b590a843bef07bb377ee35f756ad499d..50df817868bb095025d67c3845addb998983a816 100644 (file)
@@ -19,7 +19,7 @@ function weatherStationScreenSaver()
     $res .= '<div class="temp-max">' . $weather['max'] . '°C</div>';
     $res .= '</div>';
     $res .= '<div class="pp">';
-    $res .= '<i class="fas fa-cloud-rain"></i> ' . $weather['precipitations24'] . ' mm | <i class="fas fa-tachometer-alt"></i> ' . $weather['outdoor_pressure'] . ' hPa <i class="fa fa-arrow-circle-' . $pressureTendency . '"></i> | <i class="fa fa-tint"></i> ' . $weather['outdoor_humidity'] . '%<br>';
+    $res .= '<i class="fas fa-cloud-rain"></i> ' . $weather['precipitations24'] . ' mm | <i class="fas fa-tachometer-alt"></i> ' . $weather['backyard_pressure'] . ' hPa <i class="fa fa-arrow-circle-' . $pressureTendency . '"></i> | <i class="fa fa-tint"></i> ' . $weather['outdoor_humidity'] . '%<br>';
     $res .= '<br><span style="color:#008048;"><i class="fas fa-leaf"></i> ' . $weather['backyard_temp'] . ' °C | <i class="fa fa-tint"></i> ' . $weather['backyard_humidity'] . '%</span>';
     $res .= '</div>';
     $res .= '</div>';