]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 7 Mar 2020 07:41:53 +0000 (08:41 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 7 Mar 2020 07:41:53 +0000 (08:41 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/lib/scenes.php
scripts/lib/weatherstation.php
style/weatherstation.css
style/weatherstation.less

index 6055e7e5aebf1179383782027f0b38fa7122d952..0387568c8572ed13b5c329bcd6cd331078f0220b 100644 (file)
@@ -3,10 +3,11 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/bureausun.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureausun.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.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/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/weatherstation.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.css" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/weatherstation.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.less" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1583062665588" duration="7000" />
       <workItem from="1583062693000" duration="3344000" />
       <workItem from="1583265992507" duration="1990000" />
-      <workItem from="1583403852883" duration="2592000" />
-    </task>
-    <task id="LOCAL-00261" summary=".">
-      <created>1577787688220</created>
-      <option name="number" value="00261" />
-      <option name="presentableId" value="LOCAL-00261" />
-      <option name="project" value="LOCAL" />
-      <updated>1577787688220</updated>
+      <workItem from="1583403852883" duration="5927000" />
     </task>
     <task id="LOCAL-00262" summary=".">
       <created>1578036926863</created>
       <option name="project" value="LOCAL" />
       <updated>1583309116308</updated>
     </task>
-    <option name="localTasksCounter" value="310" />
+    <task id="LOCAL-00310" summary=".">
+      <created>1583413557785</created>
+      <option name="number" value="00310" />
+      <option name="presentableId" value="LOCAL-00310" />
+      <option name="project" value="LOCAL" />
+      <updated>1583413557786</updated>
+    </task>
+    <option name="localTasksCounter" value="311" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </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="1583062669525" />
-    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1583309092022">
+    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1583486400909">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" width="1170" height="972" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1582220569877" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1583309092022" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1583486400909" />
     <state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1582798634411" />
-    <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1583403854097">
+    <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1583566899074">
       <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="1582201881167" />
-    <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583403854097" />
+    <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1583566899074" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1583064009120">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 3f254e88dd2a87da5c88c0df0e9b30b882251907..784af83ef16397cc5f3be17df63b6a3c866d5387 100644 (file)
@@ -175,13 +175,17 @@ function cronWeather($cronmin)
     if (!file_exists($cache) || filemtime($cache) < $limit) {
         copy('http://dataservice.accuweather.com/currentconditions/v1/' . $place . '?apikey=' . $apikey . '&language=fr-FR&details=true', $cache);
     }
+
+    $fp = explode("\n", trim(file_get_contents(ROOT . '/cache/flowerpower.txt')));
+    $outdoortemp = $fp[2];
+
     $res = [];
     $weather = json_decode(file_get_contents($cache), true);
     $weather = $weather[0];
     $res['temp'] = round(($weather['Temperature']['Metric']['Value']/* + getState('airtemperature')*/));
-    $res['outdoor_temp'] = toNumber(getDomoticzDeviceStatus(1030), 1);
-    $res['outdoor_humidity'] = toNumber(getDomoticzDeviceStatus(1031), true);
-    $res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1032), true);
+    $res['outdoor_temp'] = toNumber($outdoortemp, 1);
+    $res['outdoor_humidity'] = toNumber(getDomoticzDeviceStatus(1026), true);
+    $res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1027), true);
     $res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1025), 1);
     $res['backyard_humidity'] = toNumber(getDomoticzDeviceStatus(1026), true);
     $res['backyard_pressure'] = toNumber(getDomoticzDeviceStatus(1027), true);
@@ -191,6 +195,8 @@ function cronWeather($cronmin)
     $res['bedroom_humidity'] = toNumber(getDomoticzDeviceStatus(1357), true);
     $res['livingroom_temp'] = toNumber(getDomoticzDeviceStatus(1351), 1);
     $res['livingroom_humidity'] = toNumber(getDomoticzDeviceStatus(1352), true);
+    $res['kitchen_temp'] = toNumber(getDomoticzDeviceStatus(1030), 1);
+    $res['kitchen_humidity'] = toNumber(getDomoticzDeviceStatus(1031), true);
     $res['pressure'] = round($weather['Pressure']['Metric']['Value']);
     $res['pressureTendency'] = $weather['PressureTendency']['Code'];
     $res['precipitations24'] = round($weather['PrecipitationSummary']['Past24Hours']['Metric']['Value']);
index d3ff37171f63b76b0b0fd8bcbe6ab2d0782580a1..0b8467bced988e59ce02e17740d62916fa72547b 100644 (file)
@@ -294,10 +294,10 @@ $scenes = [
         ['type' => 'hue', 'group' => $salon, 'scene' => 'Gte8sl76rzAD1wO'],
     ],
     'salon/off' => [
-        ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false, 'brightness' => 0)],
+        ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)],
         ['type' => 'insteon', 'command' => '0?133=I=0=0'],
         ['type' => 'function', 'function' => 'chemineeOff', 'args' => ['salon']],
-        ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false, 'brightness' => 0)],
+        ['type' => 'hue', 'group' => $salon, 'scene' => array('on' => false)],
     ],
     'salon/cinema' => [
         ['type' => 'hue', 'group' => $salon, 'scene' => 'AsU9eOyGsjEyz35'],
@@ -553,7 +553,6 @@ $scenes = [
         ['type' => 'domoticz', 'device' => '1439', 'command' => false, 'priority' => true],
     ],
     'ecomode/basic' => [
-        ['type' => 'scene', 'scene' => 'salon/freebox/off'],
         ['type' => 'scene', 'scene' => 'sdb/ampli/off'],
         ['type' => 'scene', 'scene' => 'chambre/raspberry/off'],
         ['type' => 'domoticz', 'device' => '1', 'switchtype' => 'scene', 'command' => false],
index 79fe5852251a44b2e21b3a50eee0aabc4be3228a..4a5b51300c39f3824496fc4e54fff9df94bafa8e 100644 (file)
@@ -24,6 +24,7 @@ function weatherStationScreenSaver()
     $res .= '<table class="house">';
     $res .= '<tr class="backyard"><td class="hicon"><i class="fa fa-flower-tulip"></i></td><td>' . $weather['backyard_temp'] . ' °C</td><td class="hicon hum"><i class="fa fa-tint"></i></td><td class="hum">' . $weather['backyard_humidity'] . '%</td></tr>';
     $res .= '<tr class="livingroom"><td class="hicon"><i class="fa fa-cocktail"></i></td><td>' . $weather['livingroom_temp'] . ' °C</td><td class="hicon hum"><i class="fa fa-tint"></i></td><td class="hum">' . $weather['livingroom_humidity'] . '%</td></tr>';
+    $res .= '<tr class="kitchen"><td class="hicon"><i class="fa fa-knife-kitchen"></i></td><td>' . $weather['kitchen_temp'] . ' °C</td><td class="hicon hum"><i class="fa fa-tint"></i></td><td class="hum">' . $weather['kitchen_humidity'] . '%</td></tr>';
     $res .= '<tr class="bedroom"><td class="hicon"><i class="fa fa-bed"></i></td><td>' . $weather['bedroom_temp'] . ' °C</td><td class="hicon hum"><i class="fa fa-tint"></i></td><td class="hum">' . $weather['bedroom_humidity'] . '%</td></tr>';
     $res .= '<tr class="bathroom"><td class="hicon"><i class="fa fa-bath"></i></td><td>' . $weather['bathroom_temp'] . ' °C</td><td class="hicon hum"><i class="fa fa-tint"></i></td><td class="hum">' . $weather['bathroom_humidity'] . '%</td></tr>';
     $res .= '</table>';
index 1aa54c9d22d8c624fdb8745fa7aae2c345996f7c..0a4409c12fd39824082a9a7c603a12d05c77c418 100644 (file)
@@ -60,7 +60,7 @@
 }
 #weatherstation .current .temps {
   position: relative;
-  margin-top: 20px;
+  margin-top: -10px;
 }
 #weatherstation .current .temps > div {
   display: inline-block;
 #weatherstation .house .bathroom {
   color: #4c9bd2;
 }
+#weatherstation .house .kitchen {
+  color: #ccc;
+}
 #weatherstation .house td {
   vertical-align: bottom;
   text-align: left;
index 9a816b1bbacdcd862a5af7b0b8411044d046981f..eb68907ba4ad27bf544e730017a2ff7d26e099e8 100644 (file)
@@ -68,7 +68,7 @@
 
     .temps {
       position: relative;
-      margin-top: 20px;
+      margin-top: -10px;
 
       > div {
         display: inline-block;
       color: #4c9bd2;
     }
 
+    .kitchen {
+      color: #ccc;
+    }
+
     td {
       vertical-align: bottom;
       text-align: left;