If i can help… i did exactly the same yesterday to fix my weather items. if you copy paste the following, it should get you started.
i just adapted the wiki page to my need
You don’t have to use a webview. i had to add a / to the path of the example.html file of the webview to get it works.
YOUR OPENHAB.CFG
################################### Weather Binding ###################################
#https://github.com/openhab/openhab/wiki/Weather-Binding
#https://developer.forecast.io/
#
# The apikey for the different weather providers, at least one must be specified
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
weather:apikey.ForecastIo=YOURKEY
#weather:apikey.OpenWeatherMap=
#weather:apikey.WorldWeatherOnline=
#weather:apikey.Wunderground=
#weather:apikey.Hamweather=
#weather:apikey2.Hamweather=
# location configuration, you can specify multiple locations
weather:location.home.name=NAME YOUR PLACE
weather:location.home.latitude=YOURLAT
weather:location.home.longitude=YOURLONG
weather:location.home.provider=ForecastIo
weather:location.home.language=fr
weather:location.home.updateInterval=15
-------------------------------------
YOUR SITEMAP FILE :
Frame label="Météo" {
// Weather
Text item=Weather_Condition_ID icon="sun" {
Frame {
Webview url="/weather?locationId=home&layout=example&iconset=colorful" height=13
Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="Uninitialized"="lightgray",Weather_LastUpdate>90="lightgray",>77="orange",>60="green",>40="aqua",<=40="blue"]{
Frame {
Text item=Weather_Temp_Max valuecolor=[>77="orange",>60="green",>40="aqua",<=40="blue"]
Text item=Weather_Temp_Min valuecolor=[>77="orange",>60="green",>40="aqua",<=40="blue"]
}
Frame {
Switch item=Weather_Chart_Period label="Period" mappings=[0="Heure", 1="Jour", 2="Semaine"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Temperature,Weather_Temp_Max,Weather_Temp_Min&period=h" refresh=6000 visibility=[Weather_Chart_Period==0, Weather_Chart_Period=="Uninitialized"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Temperature,Weather_Temp_Max,Weather_Temp_Min&period=D" refresh=30000 visibility=[Weather_Chart_Period==1]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Temperature,Weather_Temp_Max,Weather_Temp_Min&period=W" refresh=30000 visibility=[Weather_Chart_Period==2]
}
}
Text item=Weather_Humidity {
Frame {
Switch item=Weather_Humidity_Chart_Period label="Period" mappings=[0="Heure", 1="Jour", 2="Semaine"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Humidity&period=h" refresh=6000 visibility=[Weather_Humidity_Chart_Period==0, Weather_Humidity_Chart_Period=="Uninitialized"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Humidity&period=D" refresh=30000 visibility=[Weather_Humidity_Chart_Period==1]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Humidity&period=W" refresh=30000 visibility=[Weather_Humidity_Chart_Period==2]
}
}
Text item=Weather_Pressure {
Frame {
Switch item=Weather_Pressure_Chart_Period label="Period" mappings=[0="Heure", 1="Jour", 2="Semaine"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Pressure&period=h" refresh=6000 visibility=[Weather_Pressure_Chart_Period==0, Weather_Pressure_Chart_Period=="Uninitialized"]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Pressure&period=D" refresh=30000 visibility=[Weather_Pressure_Chart_Period==1]
Image url="http://localhost:8080/rrdchart.png?items=Weather_Pressure&period=W" refresh=30000 visibility=[Weather_Pressure_Chart_Period==2]
}
}
Text item=Sunrise_Time icon="sun_rise"
Text item=Sunset_Time icon="sun_set"
}
}
Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="Uninitialized"="lightgray",Weather_LastUpdate>90="lightgray",>25="orange",>15="green",>5="orange",<=5="blue"] {
Frame {
Text item=YahooWeatherCode icon="yahoo_weather"
Text item=Weather_Temp_Max icon="temperature"
Text item=Weather_Temp_Min icon="temperature"
Text item=Weather_ForecastText icon="temperature"
Text item=Weather_Wind_Speed icon="wind_speed"
//new
Text item=Weather_Wind_Direction icon=""
Text item=Weather_Wind_Degree icon=""
Text item=Weather_Wind_Chill icon=""
Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Weather_Humidity icon="humidity"
Text item=Weather_Pressure_Trend icon=""
Text item=Weather_Pressure icon=""
Text item=Weather_Visibility icon=""
Text item=Weather_ObservationTime icon=""
Text item=Weather_Rain icon=""
Text item=Weather_Snow icon=""
Text item=Weather_Precip_Probability icon=""
Text item=Weather_CommonId icon=""
Text item=Weather_Temp_Dewpoint icon=""
Text item=Weather_Temp_Feel icon=""
Text item=Weather_Ozone icon="ozone"
Text item=Weather_UV_Index icon="uv"
//Text item=Weather_Humidex icon="humidity"
Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
}
Frame {
Switch item=Weather_Chart_Period label="Période du Graphique" mappings=[0="Heure", 1="Jour", 2="Semaine"]
Chart item=Weather_Chart period=h refresh=6000 visibility=[Weather_Chart_Period==0, Weather_Chart_Period=="Uninitialized"]
Chart item=Weather_Chart period=D refresh=30000 visibility=[Weather_Chart_Period==1]
Chart item=Weather_Chart period=W refresh=30000 visibility=[Weather_Chart_Period==2]
}
}
}
--------------------------------------
YOUR ITEMS FILE
-----------------------------------------
//SECTION TEMPÉRATURE
Group Weather_Chart (Weather, gExterieur)
//The data is coming directly from the weather binding (whatever provider you have configured as your default, not necessarily Yahoo!).
//As of 1.8 you can no longer put the values of Items into your webview.
//So the good news is you don't need to create an Item to represent all the values in your webview. The bad news is you can now only put weather binding info into your webview.
//In my update you will notice that I lost the //ability to display sunrise and sunset times.
//https://community.openhab.org/t/help-weather-binding-not-working/2458/44
//https://github.com/openhab/openhab/wiki/Weather-Binding pour avoir les propriétés disponibles
//ITEMS WEATHER BINDING
Group gWeather_Chart (gWeather)
Number Weather_Pressure_Chart_Period "Période du graphique" (gExterieur)
Number Weather_Chart_Period "Période du graphique" (gExterieur)
Number Weather_Humidity_Chart_Period "Période du graphique" (gExterieur)
//clouds
Number Weather_Clouds "Clouds [%.0f %%]" {weather="locationId=home, type=clouds, property=percent"}
// atmosphere
Number Weather_Humidity "Humidité Extérieure [%d %%]" <temperature> (Weather, gExterieur) {weather="locationId=home, type=atmosphere, property=humidity"} // [%.1f %%] ?
Number Weather_Visibility "Visibilité [%.2f km]" {weather="locationId=home, type=atmosphere, property=visibility"}
Number Weather_Visibility_Mph "Visibilité [%.2f mi]" {weather="locationId=home, type=atmosphere, property=visibility, unit=mph"}
Number Weather_Pressure "Pression Barométrique [%.2f mb]" <temperature> (Weather, gExterieur) {weather="locationId=home, type=atmosphere, property=pressure"}
Number Weather_Pressure_Inches "Pression Barométrique [%.2f in]" <temperature> (Weather, gExterieur) {weather="locationId=home, type=atmosphere, property=pressure, unit=inches"}
String Weather_Pressure_Trend "Tendance de la pression [%s]" {weather="locationId=home, type=atmosphere, property=pressureTrend"}
Number Weather_Ozone "Ozone [%d ppm]" {weather="locationId=home, type=atmosphere, property=ozone"}
Number Weather_UV_Index "Indice UV" {weather="locationId=home, type=atmosphere, property=uvIndex, scale=0"}
// condition
String Weather_Condition "Condition [%s]" {weather="locationId=home, type=condition, property=text"}
//String Weather_Condition_ID "Météo [MAP(yahoo_weather_code.map):%s]" (Weather) { weather="locationId=home, type=condition, property=id" }
String Weather_Condition_ID "Condition météo [%s]" {weather="locationId=home, type=condition, property=id"}
DateTime Weather_ObservationTime "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, type=condition, property=observationTime"}
DateTime Weather_LastUpdate "Dernière mise à jour [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <clock> (gExterieur) {weather="locationId=home, type=condition, property=lastUpdate"} //[%1$ta %1$tR]
String Weather_CommonId "Common id [%s]" {weather="locationId=home, type=condition, property=commonId"}
// precipitation
Number Weather_Rain "Pluie [%.2f mm/h]" {weather="locationId=home, type=precipitation, property=rain"}
Number Weather_Rain_Inches "Pluie [%.2f in/h]" {weather="locationId=home, type=precipitation, property=rain, unit=inches"}
Number Weather_Snow "Neige [%.2f mm/h]" {weather="locationId=home, type=precipitation, property=snow"}
Number Weather_Snow_Inches "Neige [%.2f in/h]" {weather="locationId=home, type=precipitation, property=snow, unit=inches"}
Number Weather_Precip_Probability "Probabilité de précipitation [%d %%]" {weather="locationId=home, type=precipitation, property=probability"}
// temperature
Number Weather_Temperature "Température Extérieure [%.2f °C]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=current"} //[%.1f °C] ?
Number Weather_Temperature_F "Température Extérieure [%.2f °F]" {weather="locationId=home, type=temperature, property=current, unit=fahrenheit"} // [%.1f °C] ?
Number Weather_Temp_Feel "Température ressentie [%.2f °C]" {weather="locationId=home, type=temperature, property=feel"}
Number Weather_Temp_Feel_F "Température ressentie [%.2f °F]" {weather="locationId=home, type=temperature, property=feel, unit=fahrenheit"}
Number Weather_Temp_Dewpoint "Point de rosée [%.2f °C]" {weather="locationId=home, type=temperature, property=dewpoint"}
Number Weather_Temp_Dewpoint_F "Point de rosée [%.2f °F]" {weather="locationId=home, type=temperature, property=dewpoint, unit=fahrenheit"}
// min and max values only available in forecasts
Number Weather_Temp_Min "Température min [%.2f °C]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=min"} //[%.1f °C] ?
Number Weather_Temp_Min_F "Température min [%.2f °F]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=min, unit=fahrenheit"}
Number Weather_Temp_Max "Température max [%.2f °C]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=max"} //[%.1f °C] ?
Number Weather_Temp_Max_F "Température max [%.2f °F]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=max, unit=fahrenheit"}
String Weather_Temp_MinMax "Min/Max [%s °C]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=minMax"}
String Weather_Temp_MinMax_F "Min/Max [%s °F]" <temperature> (Weather_Chart, gExterieur) {weather="locationId=home, type=temperature, property=minMax, unit=fahrenheit"}
// wind
Number Weather_Wind_Speed "Vitesse du vent [%.2f km/h]" <temperature> (Weather, gExterieur) {weather="locationId=home, type=wind, property=speed"}
Number Weather_Wind_Speed_Beaufort "Vitesse du vent Beaufort [%d]" {weather="locationId=home, type=wind, property=speed, unit=beaufort"}
Number Weather_Wind_Speed_Knots "Vitesse du vent [%.2f kn]" {weather="locationId=home, type=wind, property=speed, unit=knots"}
Number Weather_Wind_Speed_Mps "Vitesse du vent [%.2f mps]" {weather="locationId=home, type=wind, property=speed, unit=mps"}
Number Weather_Wind_Speed_Mph "Vitesse du vent [%.2f mph]" {weather="locationId=home, type=wind, property=speed, unit=mph"}
String Weather_Wind_Direction "Direction du vent [%s]" {weather="locationId=home, type=wind, property=direction"}
Number Weather_Wind_Degree "Degré du vent [%.0f °]" {weather="locationId=home, type=wind, property=degree"}
Number Weather_Wind_Gust "Wind gust [%.2f km/h]" {weather="locationId=home, type=wind, property=gust"}
Number Weather_Wind_Gust_Beaufort "Wind gust Beaufort [%d]" {weather="locationId=home, type=wind, property=gust, unit=beaufort"}
Number Weather_Wind_Gust_Knots "Wind gust [%.2f kn]" {weather="locationId=home, type=wind, property=gust, unit=knots"}
Number Weather_Wind_Gust_Mps "Wind gust [%.2f mps]" {weather="locationId=home, type=wind, property=gust, unit=mps"}
Number Weather_Wind_Gust_Mph "Wind gust [%.2f mph]" {weather="locationId=home, type=wind, property=gust, unit=mph"}
Number Weather_Wind_Chill "Refroidissement éolien [%.2f °C]" {weather="locationId=home, type=wind, property=chill"}
Number Weather_Wind_Chill_F "Refroidissement éolien [%.2f °F]" {weather="locationId=home, type=wind, property=chill, unit=fahrenheit"}
// weather station (only Wunderground and Hamweather), needs version 1.7 or greater of the binding
//String Weather_Station_Name "Station Name [%s]" {weather="locationId=home, type=station, property=name"}
//String Weather_Station_Id "Station Id [%s]" {weather="locationId=home, type=station, property=id"}
//Number Weather_Station_Latitude "Station Latitude [%.6f]" {weather="locationId=home, type=station, property=latitude, scale=6"}
//Number Weather_Station_Longitude "Station Longitude [%.6f]" {weather="locationId=home, type=station, property=longitude, scale=6"}
//new total property in 1.8, only Wunderground
//Number Weather_Precip_Total "Precip total [%d mm]" {weather="locationId=home, type=precipitation, property=total"}
//Number Weather_Precip_Total_Inches "Precip total [%d in]" {weather="locationId=home, type=precipitation, property=total, unit=inches"}
YOUR RRD4J.PERSIST
// let's only store temperature values in rrd
Temperature*,Weather_Pressure, Weather_Humidity, Weather_Chart* : strategy = everyMinute, restoreOnStartup
`indent preformatted text by 4 spaces`