Weather Binding and Openhab V3.0

Is there any other possibility to bring an item value into an html view? The weather binding provided such a feature and that is the main thing i am missing.

Not to my knowledge. For the most part, the trick that the Weather Binding used to accomplish that has since been forbidden for bindings to do so I doubt it.

However, MainUI has a very robust collection of widgets available and ability to build custom widgets. Perhaps there is something there that can replace what you are trying to do.

As an example, if it’s weather you are after, there is a really good one already created and posted at UI Widget: Weather. Hopefully at some point it will be moved to the Marketplace where it will be installable just like an add-on.

Hi @rlkoshak

thanks for your reply, again. Your contributions helped me a lot over the years. So thanks a thousand times.

Indeed, its about the weather. And yes i already saw the widget and it looks great. But i am using the native iOS App and this is not supporting widgets. The new is somehow not very intuitive for me, so i am starting to migrate from 2.5 without switching the Ui. This is why i wanted to stick with my beloved weather table (and best was, that my wife loved it because of its simplicity). maybe i will use a rule to write out a xml / yaml and will source it within a webview which i am then showing in the app.

Thanks for your support anyway

Hi together,

short update: Finally made it and brought my loved system back to the native iOS App with OH3.1.0 utilizing executeCommandLine and simple sed command to copy and afterwards edit/update an html template file. Wanted to share this here:

Thanks @rlkoshak , your wording “has been forbidden to do so” was the trigger to search in this direction :wink:

Hi Patrick,

This is great stuff. Could you explain how you have implemented this? Would be good to share the binding, items, rules, scripts … to make this happen.

A big thank you !

Hi @Fdewaele

for the last 2hr i wrote the how to, then drag and dropped the zip file with the required icon files and - hush - my text with everything was gone. So once again…

my approach is a little hacky. I have created a html template with placeholders. I am copying this template file to a productive file using executecommandline and afterwards replacing the placeholders with item values using sed via executecommandline.

The files are lying here:
/etc/openhab/html/weather-data/images/wu_black_family/day/…
/etc/openhab/html/weather-data/images/wu_black_family/night/…
/etc/openhab/html/weather-data/layouts/weatherWN.css
/etc/openhab/html/weather-data/layouts/weatherWN.js
/etc/openhab/html/weather-data/OH3weatherWN_template.html
/etc/openhab/html/weather-data/OH3weatherWN.html
/etc/openhab/html/yr.html
/etc/openhab/transform/windDirection.scale
/etc/openhab/transform/windSpeed.scale
/etc/openhab/transform/openweathermap_icon.map
/etc/openhab/sitemaps/home.sitemap
/etc/openhab/rules/openweathermap.rules
/etc/openhab/items/openweathermap.items

There i had to assure, that i can work with shell commands from openHAB (i did a little back and forth with authorized_keys and ssh, but i dont no whether this was really necessary, i believe not).

In addition you would need a item called NightState as Switch (ON, OFF) to make the icon dependend on the current DayNight.

So here are the required files:

home.sitemap:

sitemap home label="Unser Zuhause" {
  // Weather widget
  Frame label="Meteogram" {
    Webview icon=none url="http://192.168.178.2:8080/static/weather-data/OH3weatherWN.html" height=6
    Webview url="http://192.168.178.2:8080/static/yr.html" icon=none height=4

openweathermap.items:

// Current weather
String								localCurrentStationMeasurement								"Letzte Messung [%s]"																							<sun_clouds>
String								localCurrentWeatherSummary										"Aktuell [%s]"																										<openweathermap_current>
DateTime							localCurrentLastMeasurement										"Letzte Messung [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"									<time>													(gOpenWeatherMap_Timestamp)					{channel="openweathermap:weather-and-forecast:api:local:current#time-stamp"}	//Timestamp of last measurement
Number:Length					localCurrentRainVolume												"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:current#rain"}	//Current rain volume
Number:Length					localCurrentSnowVolume												"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:current#snow"}	//Current snow volume
String								localCurrentConditionID												"Wetter ID [%s]"																									<openweathermap_current>				(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:current#condition-id"}
Number:Temperature		localCurrentTemperature												"Temperatur [%.1f %unit%]"																				<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:current#temperature"}	//Current temperature
Number:Pressure				localCurrentPressure													"Luftdruck [%.1f %unit%]"																					<pressure>																													{channel="openweathermap:weather-and-forecast:api:local:current#pressure"}	//Current barometric pressure
Number:Dimensionless	localCurrentHumidity													"Luftfeuchtigkeit [%d %unit%]"																		<humidity>																													{channel="openweathermap:weather-and-forecast:api:local:current#humidity"}	//Current atmospheric humidity
Number:Speed					localCurrentWindSpeed													"Wind [%.1f %unit%]"																							<wind>													(gOpenWeatherMap_WindSpeed)					{channel="openweathermap:weather-and-forecast:api:local:current#wind-speed"}	//Current wind speed
Number:Angle					localCurrentWindDirection											"Aus Richtung [%d %unit%]"																				<wind>													(gOpenWeatherMap_WindDirection)			{channel="openweathermap:weather-and-forecast:api:local:current#wind-direction"}	//Current wind direction


// Vorhersage für HEUTE
Number:Length					localDailyForecastTodayRainVolume							"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:forecastToday#rain"}	//Rain volume for today
Number:Length					localDailyForecastTodaySnowVolume							"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:forecastToday#snow"}	//Snow volume for today
Number:Dimensionless  localDailyForecastTodayPrecipProbability    	"Regenwahrscheinlichkeit [%.0f] %"																<rain>																															{channel="openweathermap:onecall:api:OWM1CAPI:forecastToday#precip-probability"}	//Snow volume for today
String								localDailyForecastTodayConditionID						"Wetter ID [%s]"																									<openweathermap_dailytoday>			(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:forecastToday#condition-id"}	//Condition for today
Number:Temperature		localDailyForecastTodayMinTemperature					"Temperatur Min. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastToday#min-temperature"}	//Minimum temperature for today
Number:Temperature		localDailyForecastTodayMaxTemperature					"Temperatur Max. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastToday#max-temperature"}	//Maximum temperature for today

// Vorhersage für MORGEN
Number:Length					localDailyForecastTomorrowRainVolume					"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:forecastTomorrow#rain"}	//Rain volume for today
Number:Length					localDailyForecastTomorrowSnowVolume					"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:forecastTomorrow#snow"}	//Snow volume fo
Number:Dimensionless  localDailyForecastTomorrowPrecipProbability   "Regenwahrscheinlichkeit [%.0f] %"																<rain>																															{channel="openweathermap:onecall:api:OWM1CAPI:forecastTomorrow#precip-probability"}	//Snow volume for today
String								localDailyForecastTomorrowConditionID					"Wetter ID [%s]"																									<openweathermap_dailytomorrow>	(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:forecastTomorrow#condition-id"}	//Condition for today
Number:Temperature		localDailyForecastTomorrowMinTemperature			"Temperatur Min. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastTomorrow#min-temperature"}	//Minimum temperature for today
Number:Temperature		localDailyForecastTomorrowMaxTemperature			"Temperatur Max. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastTomorrow#max-temperature"}	//Maximum temperature for today

// Vorhersage für ÜBERMORGEN / in 2 Tagen
DateTime							localDailyForecastDay2Timestamp								"Vorhersage für ÜBERMORGEN [%1$tA, %1$td.%1$tm.%1$tY]"						<time>													(gOpenWeatherMap_Timestamp)					{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#time-stamp"}	//Timestamp of forecast
Number:Length					localDailyForecastDay2RainVolume							"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#rain"}	//Rain volume for today
Number:Length					localDailyForecastDay2SnowVolume							"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#snow"}	//Snow volume fo
Number:Dimensionless  localDailyForecastDay2PrecipProbability       "Regenwahrscheinlichkeit [%.0f] %"																<rain>																															{channel="openweathermap:onecall:api:OWM1CAPI:forecastDay2#precip-probability"}	//Snow volume for today
String								localDailyForecastDay2ConditionID							"Wetter ID [%s]"																									<openweathermap_dailyday2>			(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#condition-id"}	//Condition for today
Number:Temperature		localDailyForecastDay2MinTemperature					"Temperatur Min. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#min-temperature"}	//Minimum temperature for today
Number:Temperature		localDailyForecastDay2MaxTemperature					"Temperatur Max. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay2#max-temperature"}	//Maximum temperature for today

// Vorhersage für IN 3 TAGEN
DateTime							localDailyForecastDay3Timestamp								"Vorhersage für IN 3 TAGEN [%1$tA, %1$td.%1$tm.%1$tY]"						<time>													(gOpenWeatherMap_Timestamp)					{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#time-stamp"}	//Timestamp of forecast
Number:Length					localDailyForecastDay3RainVolume							"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#rain"}	//Rain volume for today
Number:Length					localDailyForecastDay3SnowVolume							"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#snow"}	//Snow volume fo
Number:Dimensionless  localDailyForecastDay3PrecipProbability       "Regenwahrscheinlichkeit [%.0f] %"																<rain>																															{channel="openweathermap:onecall:api:OWM1CAPI:forecastDay3#precip-probability"}	//Snow volume for today
String								localDailyForecastDay3ConditionID							"Wetter ID [%s]"																									<openweathermap_dailyday3>			(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#condition-id"}	//Condition for today
Number:Temperature		localDailyForecastDay3MinTemperature					"Temperatur Min. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#min-temperature"}	//Minimum temperature for today
Number:Temperature		localDailyForecastDay3MaxTemperature					"Temperatur Max. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay3#max-temperature"}	//Maximum temperature for today

// Vorhersage für IN 4 TAGEN
DateTime							localDailyForecastDay4Timestamp								"Vorhersage für IN 4 TAGEN [%1$tA, %1$td.%1$tm.%1$tY]"						<time>													(gOpenWeatherMap_Timestamp)					{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#time-stamp"}	//Timestamp of forecast
Number:Length					localDailyForecastDay4RainVolume							"Regen [%.1f %unit%]"																							<rain>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#rain"}	//Rain volume for today
Number:Length					localDailyForecastDay4SnowVolume							"Schnee [%.1f %unit%]"																						<snow>																															{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#snow"}	//Snow volume fo
Number:Dimensionless  localDailyForecastDay4PrecipProbability       "Regenwahrscheinlichkeit [%.0f] %"																<rain>																															{channel="openweathermap:onecall:api:OWM1CAPI:forecastDay4#precip-probability"}	//Snow volume for today
String								localDailyForecastDay4ConditionID							"Wetter ID [%s]"																									<openweathermap_dailyday4>			(gOpenWeatherMap_Icon)							{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#condition-id"}	//Condition for today
Number:Temperature		localDailyForecastDay4MinTemperature					"Temperatur Min. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#min-temperature"}	//Minimum temperature for today
Number:Temperature		localDailyForecastDay4MaxTemperature					"Temperatur Max. [%.1f %unit%]"																		<temperature>										(gOpenWeatherMap_WeatherSummary)		{channel="openweathermap:weather-and-forecast:api:local:forecastDay4#max-temperature"}	//Maximum temperature for today

openweathermap.rules


rule "Update weatherWN HTML"
when
    System started or
    Item localCurrentLastMeasurement changed or
    Item execResetWeather changed to ON
    //Time cron "0 0/15 * ? * * *"
then

    Thread::sleep(500)
    logInfo("Update weatherWN HTML", "Running ...")

    // Copy template file
    executeCommandLine("cp", "-f", "/etc/openhab/html/weather-data/OH3weatherWN_template.html", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    Thread::sleep(1000)

    var daynight = "day"
    if (NightState.state == ON) {
        daynight = "night"
    }

    val iconcurrent = transform("MAP", "openweathermap_icon.map", localCurrentConditionID.state.toString)
    executeCommandLine("sed", "-i", "s|ICONCURRENT|"+daynight+"/"+iconcurrent+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|TEMPERATURECURRENT|"+localCurrentTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|DATECURRENT|"+localCurrentLastMeasurement.state.format("%1$td.%1$tm.%1$tY %1$tH:%1$tM")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|HUMIDITYCURRENT|"+localCurrentHumidity.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|PRESSURCURRENT|"+localCurrentPressure.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    
    val windspeed = transform("SCALE", "windSpeed.scale", (localCurrentWindSpeed.state as QuantityType<Number>).floatValue.toString)
    val winddir = transform("SCALE", "windDirection.scale", (localCurrentWindDirection.state as QuantityType<Number>).floatValue.toString)
    executeCommandLine("sed", "-i", "s|WINDSPEEDCURRENT|"+windspeed+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|WINDDIRECTIONCURRENT|"+winddir+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINCURRENT|"+localCurrentRainVolume.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|SNOWCURRENT|"+localCurrentSnowVolume.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    executeCommandLine("sed", "-i", "s|DAY+2|"+localDailyForecastDay2Timestamp.state.format("%1$tA")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|DAY+3|"+localDailyForecastDay3Timestamp.state.format("%1$tA")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|DAY+4|"+localDailyForecastDay4Timestamp.state.format("%1$tA")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    val icon0 = transform("MAP", "openweathermap_icon.map", localDailyForecastTodayConditionID.state.toString)
    val icon1 = transform("MAP", "openweathermap_icon.map", localDailyForecastTomorrowConditionID.state.toString)
    val icon2 = transform("MAP", "openweathermap_icon.map", localDailyForecastDay2ConditionID.state.toString)
    val icon3 = transform("MAP", "openweathermap_icon.map", localDailyForecastDay3ConditionID.state.toString)
    val icon4 = transform("MAP", "openweathermap_icon.map", localDailyForecastDay4ConditionID.state.toString)
    executeCommandLine("sed", "-i", "s|ICON+0|"+icon0+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|ICON+1|"+icon1+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|ICON+2|"+icon2+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|ICON+3|"+icon3+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|ICON+4|"+icon4+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    executeCommandLine("sed", "-i", "s|MAXTEMPERATURE+0|"+localDailyForecastTodayMaxTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MAXTEMPERATURE+1|"+localDailyForecastTomorrowMaxTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MAXTEMPERATURE+2|"+localDailyForecastDay2MaxTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MAXTEMPERATURE+3|"+localDailyForecastDay3MaxTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MAXTEMPERATURE+4|"+localDailyForecastDay4MaxTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    executeCommandLine("sed", "-i", "s|MINTEMPERATURE+0|"+localDailyForecastTodayMinTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MINTEMPERATURE+1|"+localDailyForecastTomorrowMinTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MINTEMPERATURE+2|"+localDailyForecastDay2MinTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MINTEMPERATURE+3|"+localDailyForecastDay3MinTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|MINTEMPERATURE+4|"+localDailyForecastDay4MinTemperature.state.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    val RainSnow0 = ( (localDailyForecastTodayRainVolume.state as QuantityType<Length>) + (localDailyForecastTodaySnowVolume.state as QuantityType<Length>)) 
    val RainSnow1 = ( (localDailyForecastTomorrowRainVolume.state as QuantityType<Length>) + (localDailyForecastTomorrowSnowVolume.state as QuantityType<Length>))
    val RainSnow2 = ( (localDailyForecastDay2RainVolume.state as QuantityType<Length>) + (localDailyForecastDay2SnowVolume.state as QuantityType<Length>))
    val RainSnow3 = ( (localDailyForecastDay3RainVolume.state as QuantityType<Length>) + (localDailyForecastDay3SnowVolume.state as QuantityType<Length>))
    val RainSnow4 = ( (localDailyForecastDay4RainVolume.state as QuantityType<Length>) + (localDailyForecastDay4SnowVolume.state as QuantityType<Length>))

    executeCommandLine("sed", "-i", "s|RAINSNOW+0|"+RainSnow0.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINSNOW+1|"+RainSnow1.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINSNOW+2|"+RainSnow2.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINSNOW+3|"+RainSnow3.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINSNOW+4|"+RainSnow4.format("%.1f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")

    executeCommandLine("sed", "-i", "s|RAINPROBABILITY+0|"+localDailyForecastTodayPrecipProbability.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINPROBABILITY+1|"+localDailyForecastTomorrowPrecipProbability.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINPROBABILITY+2|"+localDailyForecastDay2PrecipProbability.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINPROBABILITY+3|"+localDailyForecastDay3PrecipProbability.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")
    executeCommandLine("sed", "-i", "s|RAINPROBABILITY+4|"+localDailyForecastDay4PrecipProbability.state.format("%.0f")+"|", "/etc/openhab/html/weather-data/OH3weatherWN.html")


//    wu_black
//
//    ICONCURRENT
//    TEMPERATURECURRENT
//    DATECURRENT
//    HUMIDITYCURRENT
//    PRESSURCURRENT
//    WINDSPEEDCURRENT
//    WINDDIRECTIONCURRENT
//    RAINCURRENT
//    SNOWCURRENT
//
//    DAY+2
//    DAY+3
//    DAY+4
//
//    ICON+0
//    ICON+1
//    ICON+2
//    ICON+3
//    ICON+4

//    MAXTEMPERATURE+0
//    MAXTEMPERATURE+1
//    MAXTEMPERATURE+2
//    MAXTEMPERATURE+3
//    MAXTEMPERATURE+4

//    MINTEMPERATURE+0
//    MINTEMPERATURE+1
//    MINTEMPERATURE+2
//    MINTEMPERATURE+3
//    MINTEMPERATURE+4

//    RAIN+0
//    RAIN+1
//    RAIN+2
//    RAIN+3
//    RAIN+4

//    SNOW+0
//    SNOW+1
//    SNOW+2
//    SNOW+3
//    SNOW+4
end

windDirection.scale

[0..22.5]=Nord
]22.5..67.5[=Nord-Ost
[67.5..112.5]=Ost
]112.5..157.5[=Süd-Ost
[157.5..202.5]=Süd
]202.5..247.5[=Süd-West
[247.5..292.5]=West
]292.5..337.5[=Nord-West
[337.5..360]=Nord
[..]=Variabel

windSpeed.scale

[0..0.2]=0
]..1.5]=1
]..3.3]=2
]..5.4]=3
]..7.9]=4
]..10.7]=5
]..13.8]=6
]..17.1]=7
]..20.7]=8
]..24.4]=9
]..28.4]=10
]..32.6]=11
[..]=12
NaN=No numeric value

openweathermap_icon.map

// Thunderstorm
200=thunderstorm
201=thunderstorm
202=thunderstorm
210=thunder
211=thunder
212=thunder
221=thunderstorm
230=thunderstorm
231=thunderstorm
232=thunderstorm

// Drizzle
300=showers
301=showers
302=showers
310=showers
311=showers
312=showers
313=showers
314=showers
321=showers

// Rain
500=rain
501=rain
502=rain
503=rain
504=rain
511=rain-and-snow
520=showers
521=showers
522=showers
531=showers

// Snow
600=light-snow
601=snow
602=snow
611=rain-and-snow
612=rain-and-snow
613=rain-and-snow
615=snow-and-sleet
616=snow-and-sleet
620=light-snow
621=light-snow
622=light-snow

// Atmosphere
701=fog
711=fog
721=fog
731=fog
741=fog
751=fog
761=fog
762=fog
771=fog
781=fog

// Clear
800=clear

// Clouds
801=partly-cloudy
802=partly-cloudy
803=mostly-cloudy
804=cloudy

// Undefined states
undefined=unknown
uninitialized=unknown
NULL=unknown

yr.html

<html>
    <body>
      <div align="center"><iframe src="https://www.yr.no/nb/innhold/2-2815329/meteogram.svg" style="position:relative; top:-25px; height:380px; width:780px; scale:1.2" frameborder="0"></iframe>    </div>
    </body>
</html>

OH3weatherWN_template.html

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="refresh" CONTENT="5"">
	<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=0.6, user-scalable=yes">
	<link rel="stylesheet" type="text/css" href="./layouts/weatherWN.css" />
</head>
<body id="weather-body" onload="formatIframe()">
	<table id="weather-table">
		<tr>
			<td rowspan="2"><img id="weather-icon" src="./images/wu_black_family/ICONCURRENT.png"/></td>
			<td id="weather-temp">TEMPERATURECURRENT</td>
			<td id="weather-temp-sign">°C</td>
			<td id="weather-observation">Waiblingen, DATECURRENT</td>
		</tr>
		<tr>
			<td colspan="3">
				<table id="weather-table-details">
					<tr>
						<td>Luftfeuchtigkeit:</td>
						<td>HUMIDITYCURRENT</td>
						<td>%</td>
					</tr>
					<tr>
						<td>Luftdruck:</td>
						<td>PRESSURCURRENT</td>
						<td>mbar</td>
					</tr>
					<tr>
						<td>Wind:</td>
						<td>WINDSPEEDCURRENT</td>
						<td>bft</td>
						<td>aus WINDDIRECTIONCURRENT</td>
					</tr>
					<tr>
						<td>Regen  <span style="font-size:8px">Schnee</span>:</td>
						<td>RAINCURRENT  <span style="font-size:8px">SNOWCURRENT</span> </td>
						<!--<td>Regen:</td>
						<td>${weather:precipitation.rain(%.1f)}</td>-->
						<td>mm</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<table id="weather-forecast-table">
		<tr>
			<td class="dates"></td>
			<td class="dates"></td>
			<td class="dates">Heute</td>
			<td class="dates">Morgen</td>
			<td class="dates">DAY+2</td>
			<td class="dates">DAY+3</td>
			<td class="dates">DAY+4</td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td><img src="./images/wu_black_family/day/ICON+0.png"/></td>
			<td><img src="./images/wu_black_family/day/ICON+1.png"/></td>
			<td><img src="./images/wu_black_family/day/ICON+2.png"/></td>
			<td><img src="./images/wu_black_family/day/ICON+3.png"/></td>
			<td><img src="./images/wu_black_family/day/ICON+4.png"/></td>
		</tr>
		<tr>
			<td class="label">Temp. max</td>
			<td class="unit">[°C]</td>
			<td class="temp-max">MAXTEMPERATURE+0</td>
			<td class="temp-max">MAXTEMPERATURE+1</td>
			<td class="temp-max">MAXTEMPERATURE+2</td>
			<td class="temp-max">MAXTEMPERATURE+3</td>
			<td class="temp-max">MAXTEMPERATURE+4</td>
		</tr>
		<tr>
			<td class="label">Temp. min</td>
			<td class="unit">[°C]</td>
			<td class="temp-min">MINTEMPERATURE+0</td>
			<td class="temp-min">MINTEMPERATURE+1</td>
			<td class="temp-min">MINTEMPERATURE+2</td>
			<td class="temp-min">MINTEMPERATURE+3</td>
			<td class="temp-min">MINTEMPERATURE+4</td>
		</tr>
		<tr>
			<td class="label">Regen <span style="font-size:8px">Schnee</span> </td>
			<td class="unit">[mm]</td>
			<td class="rain">RAINSNOW+0 <span style="font-size:12px">RAINPROBABILITY+0 %</span></td>
			<td class="rain">RAINSNOW+1 <span style="font-size:12px">RAINPROBABILITY+1 %</span></td>
			<td class="rain">RAINSNOW+2 <span style="font-size:12px">RAINPROBABILITY+2 %</span></td>
			<td class="rain">RAINSNOW+3 <span style="font-size:12px">RAINPROBABILITY+3 %</span></td>
			<td class="rain">RAINSNOW+4 <span style="font-size:12px">RAINPROBABILITY+4 %</span></td>
		</tr>
		<!--<tr>
			<td class="label">Wind</td>
			<td class="unit">[km/h]</td>
			<td class="wind">${forecast(0):wind.speed(%.1f)} ${forecast(0):wind.direction}</td>
			<td class="wind">${forecast(1):wind.speed(%.1f)} ${forecast(1):wind.direction}</td>
			<td class="wind">${forecast(2):wind.speed(%.1f)} ${forecast(2):wind.direction}</td>
			<td class="wind">${forecast(3):wind.speed(%.1f)} ${forecast(3):wind.direction}</td>
			<td class="wind">${forecast(4):wind.speed(%.1f)} ${forecast(4):wind.direction}</td>-->
			<!--<td class="label">Wind</td>
			<td class="unit">[km/h]</td>
			<td class="wind">${forecast(0):wind.speed(%.1f)}</td>
			<td class="wind">${forecast(1):wind.speed(%.1f)}</td>
			<td class="wind">${forecast(2):wind.speed(%.1f)}</td>
			<td class="wind">${forecast(3):wind.speed(%.1f)}</td>
			<td class="wind">${forecast(4):wind.speed(%.1f)}</td>-->
		</tr>
	</table>
</body>
</html>

weatherWN.css

body {
	font-size: 18px;
	font-weight: bold;
	font-family: Helvetica, sans-serif;
	background-color: rgba(0,0,0,0);
}

table {
	border-spacing: 0px;
	border: 0px solid black;
	width: 1px;
}

#weather-table, #weather-location-name{
	border: 0px solid black;
	margin-top: -10px;
}

#weather-icon {
	width: 200px;
	height: 200px;
	padding-left: 10px;
	padding-right: 14px;
	border: 0px solid black;
}

#weather-temp {
	font-size: 75px;
	width: 1px;
	padding-top: 15px;
	border: 0px solid black;
}

#weather-temp-sign {
	vertical-align: top;
	padding-top: 27px;
	font-size: 25px;
	border: 0px solid black;
}

#weather-observation {
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	display: inline-block;
	padding-top: 32px;
	padding-left: 25px;
	border: 0px solid black;
}

#weather-table-details {
	font-size: 14px;
}

#weather-table-details td {
	white-space: nowrap;
	padding-right: 10px;
}

#weather-forecast-table img {
	width: 95px;
	height: 95px;
	padding-left: 2px;
	padding-right: 2px;
}

#weather-forecast-table td {
	text-align: center;
}

#weather-forecast-table .dates {
	font-size: 16px;
}

#weather-forecast-table .temp-max {
	font-size: 28px;
	color: #ff5733;
}

#weather-forecast-table .temp-min {
	font-size: 28px;
	color: #bababa;
}

#weather-forecast-table .rain {
	font-size: 20px;
	color: #0033cc;
}

#weather-forecast-table .wind {
	font-size: 20px;
	color: black;
	white-space: nowrap;
}

#weather-forecast-table .label {
	white-space: nowrap;
	text-align: left;
	font-weight: normal;
	font-size: 12px;
	/*width: 200px;
	overflow: hidden;	
  display: inline-block;*/
}

#weather-forecast-table .unit {
	white-space: nowrap;
	text-align: left;
	font-weight: normal;
	font-size: 12px;
	padding-left: 5px;
	padding-right: 5px;
	/*width: 200px;
	overflow: hidden;	
  display: inline-block;*/
}

weatherWN.js

/*
Disables the border and scrolling of the Webview sitemap iframe in the openhab.app webpage.
*/
function formatIframe() {
	var iframe = window.frameElement;
	if (iframe) {
		iframe.style.border = "0px";  
		iframe.scrolling = "no";
		iframe.style.height = "280px";
	}
}

clear
cloudy
fog
light-snow
mostly-cloudy
partly-cloudy
rain-and-snow
rain
showers
snow-and-sleet
snow
thunder
thunderstorm
unknown
cloudy

Hi Patrick,

sorry for my late reply. I have tried to implement this, but it seems not to work yet. Some questions:

  • I’m using Windows 10 as OS. I assume that this will change the configuration of the “openweathermap” rule?
  • Could you upload the icons in a zip-file on this forum?

Thanks for your support !