OpenWeatherMap widget for HABPanel

NEW UPDATED VERSION, PLEASE READ INSTRUCTIONS HERE.

UPDATE 2019-08-13 A fix has been applied to address the incorrect day issue. (Thanks to fifipil909). Please download the updated owm.controller.js file, and replace it. Only necessary in existing installations, new copies will have the new version.

Hello,

I have forked my previous Weatherunderground widget to support the OpenWeatherMap binding. This widget can be used with the free API key!

Features:

  • Multilangual, it follows the language settings from OpenHAB and OpenWeatherMap binding
  • It uses the unit settings from the item configuration making it more flexable
  • Customizable, you can set icon colors and sizes in the widget settings
  • All settings done in widget, no need to adjust the code
  • Make use of the weather-icons iconset which works perfectly with OpenWeatherMap
  • NEW: Forecast based on next day 12:00
  • NEW: Set custom forecast date format in settings

Screenshot (Dutch language):
image

Items, dont forget to replace the id with your ’ Local weather and forecast’ thing id:

// Open Weather Map 
Number:Temperature		Weather_OWM_Temperature			"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:current#temperature"}
Number:Dimensionless 	Weather_OWM_Humidity			"Humidity [%d %unit%]"				            {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#humidity"}
Number:Speed    		Weather_OWM_Wind_Speed			"Windspeed [%.1f m/s]"			                {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#wind-speed"}
String		Weather_OWM_Station_Name		            "Station Name [%s]"				                {channel="openweathermap:weather-and-forecast:2fd1295b:local:station#name"}
DateTime	Weather_OWM_ObservationTime		            "Observation time [%1$tY-%1$tm-%1$td]"		    {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#time-stamp"}
String		Weather_OWM_Condition			            "Condition [%s]"				                {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#condition"}
String		Weather_OWM_ConditionId			            "ConditionId [%s]"				                {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#condition-id"}
Image		Weather_OWM_ConditionIcon			        "Icon [%s]"				                        {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#icon"}
String		Weather_OWM_ConditionIconId			        "IconId [%s]"			                        {channel="openweathermap:weather-and-forecast:2fd1295b:local:current#icon-id"}

Number:Temperature		Weather_OWM_Temp0		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#temperature"}
Number:Temperature		Weather_OWM_Temp1		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#temperature"}
Number:Temperature		Weather_OWM_Temp2		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#temperature"}
Number:Temperature		Weather_OWM_Temp3		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#temperature"}

DateTime	Weather_OWM_Forecast_Time0		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#time-stamp"}
DateTime	Weather_OWM_Forecast_Time1		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#time-stamp"}
DateTime	Weather_OWM_Forecast_Time2		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#time-stamp"}
DateTime	Weather_OWM_Forecast_Time3		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#time-stamp"}

String		Weather_OWM_Condition0		"Condition [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#condition"}
String		Weather_OWM_Condition1		"Condition [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#condition"}
String		Weather_OWM_Condition2		"Condition [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#condition"}
String		Weather_OWM_Condition3		"Condition [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#condition"}

String		Weather_OWM_ConditionId0		"Icon [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#condition-id"}
String		Weather_OWM_ConditionId1		"Icon [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#condition-id"}
String		Weather_OWM_ConditionId2		"Icon [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#condition-id"}
String		Weather_OWM_ConditionId3		"Icon [%s]"		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#condition-id"}

Number:Temperature		Weather_OWM_Temp_h3		    "Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#temperature"}
Number:Temperature		Weather_OWM_Temp_h6		    "Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours06#temperature"}
Number:Temperature		Weather_OWM_Temp_h9		    "Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours09#temperature"}
Number:Temperature		Weather_OWM_Temp_h12		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours12#temperature"}
Number:Temperature		Weather_OWM_Temp_h15		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours15#temperature"}
Number:Temperature		Weather_OWM_Temp_h18		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours18#temperature"}
Number:Temperature		Weather_OWM_Temp_h21		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours21#temperature"}
Number:Temperature		Weather_OWM_Temp_h24		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#temperature"}
Number:Temperature		Weather_OWM_Temp_h27		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours27#temperature"}
Number:Temperature		Weather_OWM_Temp_h30		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours30#temperature"}
Number:Temperature		Weather_OWM_Temp_h33		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours33#temperature"}
Number:Temperature		Weather_OWM_Temp_h36		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours36#temperature"}
Number:Temperature		Weather_OWM_Temp_h39		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours39#temperature"}
Number:Temperature		Weather_OWM_Temp_h42		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours42#temperature"}
Number:Temperature		Weather_OWM_Temp_h45		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours45#temperature"}
Number:Temperature		Weather_OWM_Temp_h48		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#temperature"}
Number:Temperature		Weather_OWM_Temp_h51		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours51#temperature"}
Number:Temperature		Weather_OWM_Temp_h54		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours54#temperature"}
Number:Temperature		Weather_OWM_Temp_h57		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours57#temperature"}
Number:Temperature		Weather_OWM_Temp_h60		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours60#temperature"}
Number:Temperature		Weather_OWM_Temp_h63		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours63#temperature"}
Number:Temperature		Weather_OWM_Temp_h66		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours66#temperature"}
Number:Temperature		Weather_OWM_Temp_h69		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours69#temperature"}
Number:Temperature		Weather_OWM_Temp_h72		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#temperature"}
Number:Temperature		Weather_OWM_Temp_h75		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours75#temperature"}
Number:Temperature		Weather_OWM_Temp_h78		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours78#temperature"}
Number:Temperature		Weather_OWM_Temp_h81		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours81#temperature"}
Number:Temperature		Weather_OWM_Temp_h84		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours84#temperature"}
Number:Temperature		Weather_OWM_Temp_h87		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours87#temperature"}
Number:Temperature		Weather_OWM_Temp_h90		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours90#temperature"}
Number:Temperature		Weather_OWM_Temp_h93		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours93#temperature"}
Number:Temperature		Weather_OWM_Temp_h96		"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours96#temperature"}

String		Weather_OWM_Condition_h3		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#condition"}
String		Weather_OWM_Condition_h6		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours06#condition"}
String		Weather_OWM_Condition_h9		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours09#condition"}
String		Weather_OWM_Condition_h12		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours12#condition"}
String		Weather_OWM_Condition_h15		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours15#condition"}
String		Weather_OWM_Condition_h18		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours18#condition"}
String		Weather_OWM_Condition_h21		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours21#condition"}
String		Weather_OWM_Condition_h24		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#condition"}
String		Weather_OWM_Condition_h27		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours27#condition"}
String		Weather_OWM_Condition_h30		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours30#condition"}
String		Weather_OWM_Condition_h33		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours33#condition"}
String		Weather_OWM_Condition_h36		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours36#condition"}
String		Weather_OWM_Condition_h39		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours39#condition"}
String		Weather_OWM_Condition_h42		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours42#condition"}
String		Weather_OWM_Condition_h45		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours45#condition"}
String		Weather_OWM_Condition_h48		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#condition"}
String		Weather_OWM_Condition_h51		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours51#condition"}
String		Weather_OWM_Condition_h54		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours54#condition"}
String		Weather_OWM_Condition_h57		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours57#condition"}
String		Weather_OWM_Condition_h60		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours60#condition"}
String		Weather_OWM_Condition_h63		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours63#condition"}
String		Weather_OWM_Condition_h66		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours66#condition"}
String		Weather_OWM_Condition_h69		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours69#condition"}
String		Weather_OWM_Condition_h72		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#condition"}
String		Weather_OWM_Condition_h75		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours75#condition"}
String		Weather_OWM_Condition_h78		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours78#condition"}
String		Weather_OWM_Condition_h81		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours81#condition"}
String		Weather_OWM_Condition_h84		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours84#condition"}
String		Weather_OWM_Condition_h87		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours87#condition"}
String		Weather_OWM_Condition_h90		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours90#condition"}
String		Weather_OWM_Condition_h93		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours93#condition"}
String		Weather_OWM_Condition_h96		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours96#condition"}

String		Weather_OWM_ConditionId_h3		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#condition-id"}
String		Weather_OWM_ConditionId_h6		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours06#condition-id"}
String		Weather_OWM_ConditionId_h9		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours09#condition-id"}
String		Weather_OWM_ConditionId_h12		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours12#condition-id"}
String		Weather_OWM_ConditionId_h15		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours15#condition-id"}
String		Weather_OWM_ConditionId_h18		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours18#condition-id"}
String		Weather_OWM_ConditionId_h21		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours21#condition-id"}
String		Weather_OWM_ConditionId_h24		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#condition-id"}
String		Weather_OWM_ConditionId_h27		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours27#condition-id"}
String		Weather_OWM_ConditionId_h30		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours30#condition-id"}
String		Weather_OWM_ConditionId_h33		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours33#condition-id"}
String		Weather_OWM_ConditionId_h36		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours36#condition-id"}
String		Weather_OWM_ConditionId_h39		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours39#condition-id"}
String		Weather_OWM_ConditionId_h42		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours42#condition-id"}
String		Weather_OWM_ConditionId_h45		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours45#condition-id"}
String		Weather_OWM_ConditionId_h48		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#condition-id"}
String		Weather_OWM_ConditionId_h51		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours51#condition-id"}
String		Weather_OWM_ConditionId_h54		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours54#condition-id"}
String		Weather_OWM_ConditionId_h57		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours57#condition-id"}
String		Weather_OWM_ConditionId_h60		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours60#condition-id"}
String		Weather_OWM_ConditionId_h63		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours63#condition-id"}
String		Weather_OWM_ConditionId_h66		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours66#condition-id"}
String		Weather_OWM_ConditionId_h69		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours69#condition-id"}
String		Weather_OWM_ConditionId_h72		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#condition-id"}
String		Weather_OWM_ConditionId_h75		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours75#condition-id"}
String		Weather_OWM_ConditionId_h78		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours78#condition-id"}
String		Weather_OWM_ConditionId_h81		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours81#condition-id"}
String		Weather_OWM_ConditionId_h84		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours84#condition-id"}
String		Weather_OWM_ConditionId_h87		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours87#condition-id"}
String		Weather_OWM_ConditionId_h90		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours90#condition-id"}
String		Weather_OWM_ConditionId_h93		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours93#condition-id"}
String		Weather_OWM_ConditionId_h96		"Condition [%s]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours96#condition-id"}

DateTime		Weather_OWM_DateTime_h3		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours03#time-stamp"}
DateTime		Weather_OWM_DateTime_h6		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours06#time-stamp"}
DateTime		Weather_OWM_DateTime_h9		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours09#time-stamp"}
DateTime		Weather_OWM_DateTime_h12		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours12#time-stamp"}
DateTime		Weather_OWM_DateTime_h15		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours15#time-stamp"}
DateTime		Weather_OWM_DateTime_h18		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours18#time-stamp"}
DateTime		Weather_OWM_DateTime_h21		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours21#time-stamp"}
DateTime		Weather_OWM_DateTime_h24		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours24#time-stamp"}
DateTime		Weather_OWM_DateTime_h27		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours27#time-stamp"}
DateTime		Weather_OWM_DateTime_h30		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours30#time-stamp"}
DateTime		Weather_OWM_DateTime_h33		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours33#time-stamp"}
DateTime		Weather_OWM_DateTime_h36		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours36#time-stamp"}
DateTime		Weather_OWM_DateTime_h39		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours39#time-stamp"}
DateTime		Weather_OWM_DateTime_h42		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours42#time-stamp"}
DateTime		Weather_OWM_DateTime_h45		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours45#time-stamp"}
DateTime		Weather_OWM_DateTime_h48		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours48#time-stamp"}
DateTime		Weather_OWM_DateTime_h51		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours51#time-stamp"}
DateTime		Weather_OWM_DateTime_h54		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours54#time-stamp"}
DateTime		Weather_OWM_DateTime_h57		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours57#time-stamp"}
DateTime		Weather_OWM_DateTime_h60		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours60#time-stamp"}
DateTime		Weather_OWM_DateTime_h63		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours63#time-stamp"}
DateTime		Weather_OWM_DateTime_h66		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours66#time-stamp"}
DateTime		Weather_OWM_DateTime_h69		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours69#time-stamp"}
DateTime		Weather_OWM_DateTime_h72		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours72#time-stamp"}
DateTime		Weather_OWM_DateTime_h75		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours75#time-stamp"}
DateTime		Weather_OWM_DateTime_h78		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours78#time-stamp"}
DateTime		Weather_OWM_DateTime_h81		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours81#time-stamp"}
DateTime		Weather_OWM_DateTime_h84		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours84#time-stamp"}
DateTime		Weather_OWM_DateTime_h87		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours87#time-stamp"}
DateTime		Weather_OWM_DateTime_h90		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours90#time-stamp"}
DateTime		Weather_OWM_DateTime_h93		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours93#time-stamp"}
DateTime		Weather_OWM_DateTime_h96		"Forecast time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]"	{channel="openweathermap:weather-and-forecast:2fd1295b:local:forecastHours96#time-stamp"}

Instructions to install are on the github page.

All the best,
Bastiaan

37 Likes

Excellent work! Already added to my Habpanel :smiley:

One possible suggestion - could we have the ability to reuse existing items (e.g. in “Advanced” configuration tab) rather than having to create these specific ones? Not a big deal, I just added them to my OWM items file, but I feel li’d be nice to have that flexibility.

Thanks!

Thanks!

On order to accomplish that, all items need to become a setting in the widget. There are about 20 items to be set there. Doing it via a pre-configured set of items is easier and less mistakes can be made. The widget needs extra code to verify each items data to ensure it will work. Therefore, an easy request is not so easy to implement.

1 Like

Hi Bastiaan

Great - I just added your widget successfully to my habpanel!

One point took me a few minutes to find: I had to change the list of items a little bit; change of all the Hex codes within the channel definition (
weather-and-forecast:2fd1295b:
) was required. I already had the OpenWeather binding installed before; maybe this is the reason


Last question: I am still waiting for Humidity and Wind Speed to appear within the widged; currently both are only “N/A”. I linked both channels to two additional items using PaperUI; both items are displayed ate PaperUI/Control with proper numbers. I am using Openhab 2.4.

Many thanks!
Heiko

I completely understand, was only a potential suggestion, and it’s really easy to just copy/paste the items you’ve conveniently defined for us :slight_smile:

One point took me a few minutes to find: I had to change the list of items a little bit; change of all the Hex codes within the channel definition (
weather-and-forecast:2fd1295b:
) was required. I already had the OpenWeather binding installed before; maybe this is the reason


Yup, everybody needs to change that id to match to their own. I will update the steps to make that more clear.

Last question: I am still waiting for Humidity and Wind Speed to appear within the widged; currently both are only “N/A”. I linked both channels to two additional items using PaperUI; both items are displayed ate PaperUI/Control with proper numbers. I am using Openhab 2.4.

Please add a dummy widget to that item and see if it displays it correctly. If so, add another dummy widget to the same item and select ‘Use server provided format’ and check again. Could be something with your unit conversion somehow.

Dummy widget shows korrect Wind and Humidity, without and with ‘use server provided format’ as well. OWM widget still shows ‘N/A’.

OK - I sort of have it working, but there are a couple of problems


Its displaying in Celcius, and I want Fahrenheit. I can’t figure out how to change this. The documentation says to use a “unit=fahrenheit” parameter, but I can’t figure out where to put this - this clearly doesn’t work:

Number:Temperature      Weather_OWM_Temperature                 "Temperature [%.0f %unit%]" <temperature>               {channel="openweathermap:weather-and-forecast:b6c4707a:local:current#temperature unit=fahrenheit"}

There is also a global unit declaration I guess, but I can’t figure out where to put that either.

Also, the temperatures are displaying with 2 decimal places, and I can’t seem to fix this (I want no decimals).

I also found that when I try to display this widget on an iPad t the forecast doesn’t work right - it stacks them vertically rather than horizontally. It displays properly on my Windows 10 PC, but not on the iPad. Any ideas?

Help!

Bruce

EDIT: Icons are working now (it was a permission issue)

Hi,

it looks like humidity and wind speed refer to the “old” items, without the OWM in the item name
 :wink:

Yes, well spotted.

I have corrected the item names of windspeed and humidity. And I’ve set the temperature decimals forced to 1. Please download the updated widget from the github page.

Hi,
I started myself with a widget for the OMW free api, but I gave up when it came to correct ordering of the forecasts.
My problem was that if i look now at the forecast24 items they show something different than when I look at them this evening at 10 o’clock.
So it wasn’t sufficient for me because I’m not interested how the weather will be tomorrow evening at 10 o’clock, I want to know how it will be tomorrow morning or whenever.
Did you solve this somehow?

Simon

Nope, it has this exact same limitation. I do however considering implementing some logic to show the weather @ noon 12.00 of each day.

I found it less problematic because summing a full day in a single condition where everything could happen to the weather is rather usefull from the beginning, right? It just looks nice and gives so some form of indication.

Any thoughts on my issues listed above? How can I get fahrenheit? Why is it displaying wrong on an iPad?

Your iPad has probably smaller screen dimensions than your PC. You can set the icon sizes in the settings of the widget and you should scale the widget on the dashboard to fit it for the iPad dimensions. I myself have 3 different dashboard configurations for all of my devices. Mobile, PC and iPad. You need this because of the different screen dimensions.

The items follow the unit settings of OH. You should set your ‘Regional Settings’ as described in the steps.

OK - it does have to do with screen size, but reducing the icon size or increasing the widget size won’t help (I’ve tried the smallest icon size and a full width widget).

You json code uses “col-md-xx” (md stands for medium) for your column spacing, which allows horizontal layout only on devices with 768px or more in width, and forces a vertical layout on anything with less than 768px. The iPad2 I’m using reportedly has a 1024x768 resolution and I’m using it in portrait mode. But as it turns out the browser is interpreting this as not being a medium size screen, so it’s forced into a vertical layout.

Changing all of the “col-md-xx” designations in your code to “col-sm-xx” fixes the issue with no impact to devices with larger displays.

Thanks,

Bruce

Thank you! Works like a charm.

Hi,
great job, great widget. I have 1 question and 1 problem:

Question: is it possible, that the forecast will show the weather/temperature always at 12 o’clock? If I look to weather forecast e.g. at 8 pm, the 48 hour forecast will show the temperature in 2 days at 8 pm, which could be confusing.

Problem:
the icons are only shown for 48 and 72 hour forecast, but not the current weather and forecast of 3 and 24 hours.
When I view the items in PaperUI, all icons are show correct

image

PaperUI:
image

ok try not to laugh at the noobe, but where is this configuration file that i put my things id located?

where do i find my thing id?

in my list of things in paper ui it says
 openweathermap:weather-and-forecast:33d4f43f

so in my openHAB/conf/items/home.items file looks like this


so does this look right?

// keep something in here

// Open Weather Map 
Number:Temperature		Weather_OWM_Temperature			
"Temperature [%.1f %unit%]" <temperature>		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#temperature"}
Number:Dimensionless 	Weather_OWM_Humidity			"Humidity [%d 
%unit%]"				            
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#humidity"}
Number:Speed    		Weather_OWM_Wind_Speed			
"Windspeed [%.1f km/h]"			                
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#wind-speed"}
String		Weather_OWM_Station_Name		            "Station Name 
[%s]"				                
{channel="openweathermap:weather-and-forecast:33d4f43f:local:station#name"}
DateTime	Weather_OWM_ObservationTime		            "Observation 
time [%1$tY-%1$tm-%1$td]"		    
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#time-stamp"}
String		Weather_OWM_Condition			            "Condition 
[%s]"				                
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#condition"}
String		Weather_OWM_ConditionId			            "ConditionId 
[%s]"				                
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#condition-id"}
Image		Weather_OWM_ConditionIcon			        "Icon 
[%s]"				                        
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#icon"}
String		Weather_OWM_ConditionIconId			        "IconId 
[%s]"			                        
{channel="openweathermap:weather-and-forecast:33d4f43f:local:current#icon-id"}

Number:Temperature		Weather_OWM_Temp0		"Temperature 
[%.1f %unit%]" <temperature>		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours03#temperature"}
Number:Temperature		Weather_OWM_Temp1		"Temperature 
[%.1f %unit%]" <temperature>		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours24#temperature"}
Number:Temperature		Weather_OWM_Temp2		"Temperature 
[%.1f %unit%]" <temperature>		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours48#temperature"}
Number:Temperature		Weather_OWM_Temp3		"Temperature 
[%.1f %unit%]" <temperature>		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours72#temperature"}

DateTime	Weather_OWM_Forecast_Time0		"Forecast time 
[%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours03#time-stamp"}
DateTime	Weather_OWM_Forecast_Time1		"Forecast time 
[%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours24#time-stamp"}
DateTime	Weather_OWM_Forecast_Time2		"Forecast time 
[%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours48#time-stamp"}
DateTime	Weather_OWM_Forecast_Time3		"Forecast time 
[%1$td.%1$tm.%1$tY %1$tH:%1$tM]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours72#time-stamp"}

String		Weather_OWM_Condition0		"Condition [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours03#condition"}
String		Weather_OWM_Condition1		"Condition [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours24#condition"}
String		Weather_OWM_Condition2		"Condition [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours48#condition"}
String		Weather_OWM_Condition3		"Condition [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours72#condition"}

String		Weather_OWM_ConditionId0		"Icon [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours03#condition-id"}
String		Weather_OWM_ConditionId1		"Icon [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours24#condition-id"}
String		Weather_OWM_ConditionId2		"Icon [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours48#condition-id"}
String		Weather_OWM_ConditionId3		"Icon [%s]"		
{channel="openweathermap:weather-and-forecast:33d4f43f:local:forecastHours72#condition-id"}

In reply to your question: When I have the time, I will try to make the 12:00 o-clock logic into the widget.

For the missing icons, the widget is not using the ‘icon’ channels as it has ugly icons. Instead it uses the ‘condition-id’, which is an integer and gets the corresponding icon from the ‘weather icons’.

Check the Weather_OWM_ConditionId0 and Weather_OWM_ConditionId1 channels values by adding the Dummy widget.

I see you have more NULL’s, so could be your items aren’t setup right.

As described in the steps:

  • Add the items to an items file, see this post for the items. Change the id in the channel to your ‘Local weather and forecast’ thing id.

Go to your ‘Local weather and forecast’ thing and note the id which is wrapped in all of the channels:
openweathermap:weather-and-forecast:**2fd1295b**:local:station#id