From: Vincent Date: Sat, 6 Jun 2020 10:02:36 +0000 (+0200) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0b3095b5043c599dd2807baebda7840e1d0f85a9;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c3508db..8d706cc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,14 @@ - + + + + + + + + @@ -1215,27 +1225,18 @@ - - - - - - - - - - + - - + + - + @@ -1251,12 +1252,10 @@ - - diff --git a/config/sdb.php b/config/sdb.php index 505f20a..2b7416e 100644 --- a/config/sdb.php +++ b/config/sdb.php @@ -9,7 +9,7 @@ config('SCREENSAVER','weatherstation'); config('VIDEOPLAYER', 'mediarasp-small'); config('TVPLAYER', 'mediarasp-small'); config('VOLUME', 60); -config('VOLUME_DEVICE', 'RaspberryPi'); +config('VOLUME_DEVICE', 'Squeezebox'); config('HIDEMASK_TIMEOUT',250); if (DISPLAYINTERFACE) { diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index fa65093..e3d4420 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -179,8 +179,12 @@ 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['kitchen_temp'] = toNumber(getDomoticzDeviceStatus(1506), 1); + $res['kitchen_humidity'] = toNumber(getDomoticzDeviceStatus(1507), true); + $res['wc_temp'] = toNumber(getDomoticzDeviceStatus(1501), 1); + $res['wc_humidity'] = toNumber(getDomoticzDeviceStatus(1502), true); + $res['office_temp'] = toNumber(getDomoticzDeviceStatus(1496), 1); + $res['office_humidity'] = toNumber(getDomoticzDeviceStatus(1497), true); $res['pressure'] = round($weather['Pressure']['Metric']['Value']); $res['pressureTendency'] = $weather['PressureTendency']['Code']; $res['precipitations24'] = round($weather['PrecipitationSummary']['Past24Hours']['Metric']['Value']); diff --git a/scripts/lib/domoticz.php b/scripts/lib/domoticz.php index c3ec15e..7ff1e20 100644 --- a/scripts/lib/domoticz.php +++ b/scripts/lib/domoticz.php @@ -42,14 +42,14 @@ function domoticzCmd($command, $priority = false) return true; } -function getDomoticzDeviceStatus($device) +function getDomoticzDeviceStatus($device,$force=false) { $res = runDomoticzCommand(['type' => 'devices', 'rid' => $device]); $res = json_decode($res->getBody(), true); try { $update = new DateTime($res['result'][0]['LastUpdate']); $now = new DateTime(); - if ($update->diff($now)->days > 0) { + if (!$force && $update->diff($now)->days > 0) { return false; } } catch (Exception $e) { diff --git a/scripts/lib/flowerpower.php b/scripts/lib/flowerpower.php index 59ee32c..a786917 100644 --- a/scripts/lib/flowerpower.php +++ b/scripts/lib/flowerpower.php @@ -8,7 +8,7 @@ function updateFlowerPower() $newValue = $fp[$k]; if ($v === 1467) { $newValue = (float)$newValue; - $currentValue = toNumber(getDomoticzDeviceStatus(1467), false); + $currentValue = toNumber(getDomoticzDeviceStatus(1467, true), false); if (abs($currentValue - $newValue) > 30 || $newValue == 0 || $newValue > 60 || $newValue < -50) { echo 'Out of bounds'; return; diff --git a/scripts/lib/lib.php b/scripts/lib/lib.php index 2eb3ef3..87e291c 100644 --- a/scripts/lib/lib.php +++ b/scripts/lib/lib.php @@ -432,6 +432,7 @@ function volume($volume, $increase = '') $cmd = 'amixer -c 0 -M -- sset PCM playback ' . round(max(0, min(100, $volume))) . '%' . $increase; return sshCommand($cmd, $device); case 'SqueezeboxPlayer': + case 'Squeezebox': return squeezeVolume($volume, $increase, config('SQUEEZEBOX_PLAYER')); case 'Harmony': if ($increase == '-') { diff --git a/scripts/lib/weatherstation.php b/scripts/lib/weatherstation.php index 4a5b513..ac74c4c 100644 --- a/scripts/lib/weatherstation.php +++ b/scripts/lib/weatherstation.php @@ -22,11 +22,13 @@ function weatherStationScreenSaver() $res .= '
'; $res .= ' ' . $weather['precipitations24'] . ' mm | ' . $pressure . ' hPa | ' . $weather['outdoor_humidity'] . '%'; $res .= ''; - $res .= ''; - $res .= ''; - $res .= ''; - $res .= ''; - $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; + $res .= ''; $res .= '
' . $weather['backyard_temp'] . ' °C' . $weather['backyard_humidity'] . '%
' . $weather['livingroom_temp'] . ' °C' . $weather['livingroom_humidity'] . '%
' . $weather['kitchen_temp'] . ' °C' . $weather['kitchen_humidity'] . '%
' . $weather['bedroom_temp'] . ' °C' . $weather['bedroom_humidity'] . '%
' . $weather['bathroom_temp'] . ' °C' . $weather['bathroom_humidity'] . '%
' . $weather['backyard_temp'] . ' °C' . $weather['backyard_humidity'] . '%' . $weather['kitchen_temp'] . ' °C' . $weather['kitchen_humidity'] . '%
' . $weather['livingroom_temp'] . ' °C' . $weather['livingroom_humidity'] . '%' . $weather['office_temp'] . ' °C' . $weather['office_humidity'] . '%
' . $weather['wc_temp'] . ' °C' . $weather['wc_humidity'] . '%' . $weather['bedroom_temp'] . ' °C' . $weather['bedroom_humidity'] . '%
' . $weather['bathroom_temp'] . ' °C' . $weather['bathroom_humidity'] . '%
'; $res .= '
'; $res .= ''; diff --git a/style/weatherstation.css b/style/weatherstation.css index 0a4409c..4fd0572 100644 --- a/style/weatherstation.css +++ b/style/weatherstation.css @@ -293,8 +293,11 @@ display: none; } #weatherstation .house { - width: 40%; - margin: 15px auto; + width: 60%; + margin: 40px auto; +} +#weatherstation .house .sep { + min-width: 25px; } #weatherstation .house .backyard { color: #009d60; @@ -306,11 +309,17 @@ color: orangered; } #weatherstation .house .bathroom { - color: #4c9bd2; + color: #d03bee; } #weatherstation .house .kitchen { color: #ccc; } +#weatherstation .house .wc { + color: #2472aa; +} +#weatherstation .house .office { + color: #051234; +} #weatherstation .house td { vertical-align: bottom; text-align: left; @@ -318,7 +327,9 @@ #weatherstation .house td.hicon { width: 0; padding-right: 5px; + padding-left: 10px; } #weatherstation .house td.hum { font-size: 80%; + padding-bottom: 2px; } diff --git a/style/weatherstation.less b/style/weatherstation.less index eb68907..942a72a 100644 --- a/style/weatherstation.less +++ b/style/weatherstation.less @@ -216,8 +216,12 @@ } .house { - width: 40%; - margin: 15px auto; + width: 60%; + margin: 40px auto; + + .sep { + min-width: 25px; + } .backyard { color: #009d60; @@ -232,13 +236,21 @@ } .bathroom { - color: #4c9bd2; + color: #d03bee; } .kitchen { color: #ccc; } + .wc { + color: #2472aa; + } + + .office { + color: #051234; + } + td { vertical-align: bottom; text-align: left; @@ -246,10 +258,12 @@ &.hicon { width: 0; padding-right: 5px; + padding-left: 10px; } &.hum { font-size: 80%; + padding-bottom: 2px; } } }