<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/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/domoticz_status.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_status.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/domoticz.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/domoticz.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" />
<workItem from="1577358967357" duration="4847000" />
<workItem from="1577378088885" duration="2201000" />
<workItem from="1577380387468" duration="866000" />
- <workItem from="1577785483253" duration="1010000" />
- </task>
- <task id="LOCAL-00211" summary=".">
- <created>1566548210701</created>
- <option name="number" value="00211" />
- <option name="presentableId" value="LOCAL-00211" />
- <option name="project" value="LOCAL" />
- <updated>1566548210701</updated>
+ <workItem from="1577785483253" duration="2153000" />
</task>
<task id="LOCAL-00212" summary=".">
<created>1566551436129</created>
<option name="project" value="LOCAL" />
<updated>1577381108669</updated>
</task>
- <option name="localTasksCounter" value="260" />
+ <task id="LOCAL-00260" summary=".">
+ <created>1577786536734</created>
+ <option name="number" value="00260" />
+ <option name="presentableId" value="LOCAL-00260" />
+ <option name="project" value="LOCAL" />
+ <updated>1577786536735</updated>
+ </task>
+ <option name="localTasksCounter" value="261" />
<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="1577381105204">
- <screen x="0" y="0" width="1920" height="1040" />
+ <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1577786532749">
+ <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" 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="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1577786532749" />
<state x="1114" y="443" key="NewPhpFileDialog" timestamp="1577785958789">
<screen x="0" y="0" width="2560" height="1040" />
</state>
function toNumber($val, $round = false)
{
+ if ($val === false) {
+ return '--';
+ }
$val = preg_replace('/[^0-9-.]/', '', $val);
$val = floatval($val);
if ($round) {
$res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1032), true);
$res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1025), true);
$res['backyard_humidity'] = toNumber(getDomoticzDeviceStatus(1026), true);
+ $res['backyard_pressure'] = toNumber(getDomoticzDeviceStatus(1027), true);
$res['pressure'] = round($weather['Pressure']['Metric']['Value']);
$res['pressureTendency'] = $weather['PressureTendency']['Code'];
$res['precipitations24'] = round($weather['PrecipitationSummary']['Past24Hours']['Metric']['Value']);
$weather = json_decode(file_get_contents(ROOT . '/cache/weather.json'), true);
$pressureTendency = $weather['pressureTendency'] == 'F' ? 'down' : 'up';
+ $pressure = $weather['outdoor_pressure'] == '--' ? $weather['backyard_pressure'] : $weather['outdoor_pressure'];
$res = '<div id="weatherstation" class="screensaver">';
$res .= '<div class="time"></div>';
$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['backyard_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> ' . $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>';