Seite 1 von 1
Weather binding in sitemap
Verfasst: 31. Mai 2020 19:18
von SIDE22
Hallo,
Ich bin aktuell dabei das Weather binding in meine sitemap zubekommen mit dem html ein Teil wird auch angezeigt aber mit diesem forecast(1) oder so geht das wohl nicht
Habe ein screen mal hinzugefügt
Lg
Florian
Re: Weather binding in sitemap
Verfasst: 31. Mai 2020 20:49
von udo1toni
Welchen Wetterdienst nutzt Du denn mit dem weather1-Binding?
Gesendet von meinem SM-G973F mit Tapatalk
Re: Weather binding in sitemap
Verfasst: 31. Mai 2020 21:18
von SIDE22
Ich nutze Openweathermap
Lg
Florian
Re: Weather binding in sitemap
Verfasst: 1. Jun 2020 02:43
von SIDE22
so habe es nun hinbekommen
allerdings sind die wochentage auf englisch wie würde ich das den einstellen das es in deutsch angezeigt wird ?
habe das ganze mal auf "Hamweather" ungestellt
hier mal meine daten
die .html
Code: Alles auswählen
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="static/weather-data/layouts/example.css"/>
<script type="text/javascript" src="static/weather-data/layouts/example.js"></script>
</head>
<body id="weather-body" onload="formatIframe()">
<div id="weather-location-name">${config:name}, ${weather:condition.observationTime(%1$td.%1$tm.%1$tY %1$tH:%1$tM)}</div>
<table id="weather-table">
<tr>
<td rowspan="2"><img id="weather-icon" src="static/weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>
<td id="weather-temp">${weather:temperature.current(%.1f)}</td>
<td id="weather-temp-sign">ºC</td>
</tr>
<tr>
<td colspan="2">
<table id="weather-table-details">
<tr>
<td>Luftfeuchtigkeit:</td>
<td>${weather:atmosphere.humidity} %</td>
</tr>
<tr>
<td>Luftdruck:</td>
<td>${weather:atmosphere.pressure(%.1f)} hPa</td>
</tr>
<tr>
<td>Wind:</td>
<td>${weather:wind.speed(%.1f)} km/h aus ${weather:wind.direction}</td>
</tr>
</table>
</td>
</tr>
</table>
<table id="weather-forecast-table">
<tr>
<td>Heute</td>
<td>${forecast(1):condition.observationTime(%1$tA)}</td>
<td>${forecast(2):condition.observationTime(%1$tA)}</td>
</tr>
<tr>
<td><img src="static/weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>
</tr>
<tr>
<td class="temp-max">${forecast(0):temperature.max(%.1f ºC)}</td>
<td class="temp-max">${forecast(1):temperature.max(%.0f ºC)}</td>
<td class="temp-max">${forecast(2):temperature.max(%.0f ºC)}</td>
</tr>
<tr>
<td class="temp-min">${forecast(0):temperature.min(%.1f ºC)}</td>
<td class="temp-min">${forecast(1):temperature.min(%.0f ºC)}</td>
<td class="temp-min">${forecast(2):temperature.min(%.0f ºC)}</td>
</tr>
</table>
</body>
</html>
und hier einmal die .items
Code: Alles auswählen
// atmosphere
Number Humidity "Humidity [%d %%]" {weather="locationId=Hagen2, type=atmosphere, property=humidity"}
Number Visibility "Visibility [%.2f km]" {weather="locationId=Hagen2, type=atmosphere, property=visibility"}
Number Pressure "Pressure [%.2f mb]" {weather="locationId=Hagen2, type=atmosphere, property=pressure"}
// clouds
Number Clouds "Clouds [%.0f %%]" {weather="locationId=Hagen2, type=clouds, property=percent"}
// condition
String Condition "Condition [%s]" {weather="locationId=Hagen2, type=condition, property=text"}
String Condition_ID "Condition id [%s]" {weather="locationId=Hagen2, type=condition, property=id"}
DateTime ObservationTime "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=Hagen2, type=condition, property=observationTime"}
DateTime LastUpdate "Last update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=Hagen2, type=condition, property=lastUpdate"}
String CommonId "Common id [MAP(weather_de.map):%s]" {weather="locationId=Hagen2, type=condition, property=commonId"}
// precipitation
Number Rain "Rain [%.2f mm/h]" {weather="locationId=Hagen2, type=precipitation, property=rain"}
Number Snow "Snow [%.2f mm/h]" {weather="locationId=Hagen2, type=precipitation, property=snow"}
// temperature
Number Temperature "Temperature [%.2f °C]" {weather="locationId=Hagen2, type=temperature, property=current"}
Number Temp_Feel "Temperature feel [%.2f °C]" {weather="locationId=Hagen2, type=temperature, property=feel"}
Number Temp_Dewpoint "Dewpoint [%.2f °C]" {weather="locationId=Hagen2, type=temperature, property=dewpoint"}
// min and max values only available in forecasts
Number Temp_Min "Temperature min [%.2f °C]" {weather="locationId=Hagen2, type=temperature, property=min"}
Number Temp_Max "Temperature max [%.2f °C]" {weather="locationId=Hagen2, type=temperature, property=max"}
String Temp_MinMax "Min/Max [%s °C]" {weather="locationId=Hagen2, type=temperature, property=minMax"}
// wind
Number Wind_Speed "Windspeed [%.2f km/h]" {weather="locationId=Hagen2, type=wind, property=speed"}
String Wind_Direction "Wind direction [%s]" {weather="locationId=Hagen2, type=wind, property=direction"}
Number Wind_Gust "Wind gust [%.2f km/h]" {weather="locationId=Hagen2, type=wind, property=gust"}
Number Wind_Chill "Wind chill [%.2f °C]" {weather="locationId=Hagen2, type=wind, property=chill"}
lg
Florian
Re: Weather binding in sitemap
Verfasst: 3. Jun 2020 09:52
von SIDE22
Weiß da keiner bescheid wie man die auf deutsch stellen kann?
Lg
Florian
Re: Weather binding in sitemap
Verfasst: 3. Jun 2020 10:04
von udo1toni
Gewöhnlich sollten die automatisch korrekt sein, es sei denn, das System läuft nicht mit deutschen Locales.
Gesendet von meinem SM-G973F mit Tapatalk
Re: Weather binding in sitemap
Verfasst: 3. Jun 2020 15:39
von SIDE22
So hab nun das System mal auf deutsch umgestellt
Allerdings zeigt er jetzt das Datum an.. Und nicht den Tag Namen
Re: Weather binding in sitemap
Verfasst: 3. Jun 2020 15:56
von SIDE22
Sry war mein Fehler nun wird es richtig angezeigt danke mit dem tip der system einstellung
Lg
Florian
Re: Weather binding in sitemap
Verfasst: 22. Jul 2020 10:05
von Volker
Hallo und guten Morgen,
ich habe das selbe Problem mit der Ansicht der kommenden Tage wenn ich Openweathermap benutze.
Hamweather scheint aber nicht mehr kostenlos zu sein.
Wie habt ihr das jetzt gelöst?
Das Weather Binding läuft bei mir auf Openhab 2.5.6-2.
LG
Volker
Re: Weather binding in sitemap
Verfasst: 3. Mai 2021 19:53
von HABuserJM
Hallo, ich bin zwar erst beim Item, nutze das wunderground Thing weathercompany und bekomme beim Regen einen Wert von 0.000254 m angezeigt.
Wie kann ich das denn skalieren, um mm angezeigt zu bekommen? Über state description kann ich nur die Kommastellen bestimmen und weiteren Text dazu schreiben.
lg Jürgen