%s | %s %s°C %s%% %s |
%s | %s: %s min %s°C max %s°C |
%s |
%s |
%s°C %s%% |
%s |
%s | ', $width, WeatherIconIMGTag(ReadingsVal($d, "icon", ""))); for(my $i=1; $i<$items; $i++) { $ret .= sprintf('%s | ', $width, WeatherIconIMGTag(ReadingsVal($d, "${fc}${i}_icon", ""))); } $ret .= '
%s | ', ReadingsVal($d, "condition", "")); for(my $i=1; $i<$items; $i++) { $ret .= sprintf('%s: %s | ', ReadingsVal($d, "${fc}${i}_day_of_week", ""), ReadingsVal($d, "${fc}${i}_condition", "")); } $ret .= '
%s°C %s%% | ', ReadingsVal($d, "temp_c", ""), ReadingsVal($d, "humidity", "")); for(my $i=1; $i<$items; $i++) { $ret .= sprintf('min %s°C | ', ReadingsVal($d, "${fc}${i}_low_c", "")); } $ret .= '
%s | ', ReadingsVal($d, "wind_condition", "")); for(my $i=1; $i<$items; $i++) { $ret .= sprintf('max %s°C | ', ReadingsVal($d, "${fc}${i}_high_c", "")); } $ret .= "
apt-get install
libjson-perl
on Debian and derivatives.The Weather module works with various weather APIs:
define <name> Weather [API=<API>[,<apiotions>]] [apikey=<apikey>]
[location=<location>] [interval=<interval>] [lang=<lang>]
API | name of the weather API, e.g. DarkSkyAPI |
apioptions | indivual options for the chosen API |
apikey | key for the chosen API |
location | location for the weather forecast; e.g. coordinates, a town name or an ID, depending on the chosen API |
interval | duration in seconds between updates |
lang | language of the forecast: de ,
en , pl , fr , it or nl |
API | DarkSkyAPI |
apioptions | cachemaxage=<cachemaxage> duration in seconds to retrieve the forecast from the cache instead from the API |
location | <latitude,longitude> geographic coordinates in degrees of the location for which the weather is forecast; if missing, the values of the attributes of the global device are taken, if these exist. |
API | OpenWeatherMapAPI |
apioptions | cachemaxage=<cachemaxage> duration in seconds to retrieve the forecast from the cache instead from the API |
location | <latitude,longitude> geographic coordinates in degrees of the location for which the weather is forecast; if missing, the values of the attributes of the global device are taken, if these exist. |
.locense | license of the API provider, if available |
city | name of town returned for location |
code | current condition code |
condition | current condition |
current_date_time | last update of forecast on server |
fc?_code | forecast condition code |
fc?_condition | forecast condition |
fc?_day_of_week | day of week for day +? |
fc?_high_c | forecasted daily high in degrees centigrade |
fc?_icon | forecast icon |
fc?_low_c | forecasted daily low in degrees centigrade |
humidity | current humidity in % |
icon | relative path for current icon |
pressure | air pressure in hPa |
pressure_trend | air pressure trend (0= steady, 1= rising, 2= falling) |
pressure_trend_txt | textual representation of air pressure trend |
pressure_trend_sym | symbolic representation of air pressure trend |
temperature | current temperature in degrees centigrade |
temp_c | current temperature in degrees centigrade |
temp_f | current temperature in degrees Fahrenheit |
visibility | visibility in km |
wind | wind speed in km/h |
wind_chill | wind chill in degrees centigrade |
wind_condition | wind direction and speed |
wind_direction | direction wind comes from in degrees (0 = north wind) |
wind_speed | same as wind |
apt-get install
libjson-perl
kann es unter Debian und Derivaten installiert
werden.Das Weather-Modul arbeitet mit verschiedenen Wetter-APIs zusammen:
define <name> Weather [API=<API>[,<apiotions>]] [apikey=<apikey>]
[location=<location>] [interval=<interval>] [lang=<lang>]
API | Name des Wetter-APIs, z.B. DarkSkyAPI |
apioptions | Individuelle Optionen für das gewählte API |
apikey | Schlüssel für das gewählte API |
location | Ort, für den das Wetter vorhergesagt wird. Abhängig vom API z.B. die Koordinaten, ein Ortsname oder eine ID. |
interval | Dauer in Sekunden zwischen den einzelnen Aktualisierungen der Wetterdaten |
lang | Sprache der Wettervorhersage: de ,
en , pl , fr , it oder nl |
API | DarkSkyAPI |
apioptions | cachemaxage=<cachemaxage> Zeitdauer in Sekunden, innerhalb derer die Wettervorhersage nicht neu abgerufen sondern aus dem Cache zurück geliefert wird. |
location | <latitude,longitude> Geographische Breite und Länge des Ortes in Grad, für den das Wetter vorhergesagt wird. Bei fehlender Angabe werden die Werte aus den gleichnamigen Attributen des global -Device genommen, sofern vorhanden. |
API | OpenWeatherMapAPI |
apioptions | cachemaxage=<cachemaxage> Zeitdauer in
Sekunden, innerhalb derer die Wettervorhersage nicht neu abgerufen
sondern aus dem Cache zurück geliefert wird. |
location | <latitude,longitude> Geographische Breite
und Länge des Ortes in Grad, für den das Wetter vorhergesagt wird.
Bei fehlender Angabe werden die Werte aus den gleichnamigen Attributen
des global -Device genommen, sofern vorhanden. |
.license | Lizenz des jeweiligen API-Anbieters, sofern vorhanden |
city | Name der Stadt, der für die location übermittelt wird |
code | Code für die aktuellen Wetterverhältnisse |
condition | aktuelle Wetterverhältnisse |
current_date_time | Zeitstempel der letzten Aktualisierung der Wetterdaten vom Server |
fc?_code | Code für die vorhergesagten Wetterverhältnisse |
fc?_condition | vorhergesagte Wetterverhältnisse |
fc?_day_of_week | Wochentag des Tages, der durch ? dargestellt wird |
fc?_high_c | vorhergesagte maximale Tagestemperatur in Grad Celsius |
fc?_icon | Icon für Vorhersage |
fc?_low_c | vorhergesagte niedrigste Tagestemperatur in Grad Celsius |
humidity | gegenwärtige Luftfeuchtgkeit in % |
icon | relativer Pfad für das aktuelle Icon |
pressure | Luftdruck in hPa |
temperature | gegenwärtige Temperatur in Grad Celsius |
temp_c | gegenwärtige Temperatur in Grad Celsius |
temp_f | gegenwärtige Temperatur in Grad Celsius |
visibility | Sichtweite in km |
wind | Windgeschwindigkeit in km/h |
wind_condition | Windrichtung und -geschwindigkeit |
wind_direction | Gradangabe der Windrichtung (0 = Nordwind) |
wind_speed | Windgeschwindigkeit in km/h (mit wind identisch) |
validity | stale, wenn der Veröffentlichungszeitpunkt auf dem entfernten Server vor dem Zeitpunkt der aktuellen Daten (readings) liegt |