Help understanding/coding weather binding (forecast.io)

Hi,

I’m having a really tough time understanding and coding OpenHAB to display weather conditions and forecasting via forecast.io. Nothing I try produces results. Long story short, I followed the wiki to get the framework in place, so all set there, AFAIK. I’ve already created a dev account for forecast.io, configured openhab.cfg with the API key, lat/long, etc, configured the .items file and extracted the weather-data-1.8.zip file.

However, I can’t quite wrap my head around how the webview function works. I’ve googled endlessly, looking for templates to copy/paste/edit to no avail. I’m not at all versed in Java but I understand coding logic as I use vbscript and PowerShell.

I guess my question is, is webview required for this; or can I just statically code items? Better yet, are there directions with a template out there like the one in the wiki for the Nest thermostat?

Check out this thread for a comprehensive example.

OpenHAB is written in Java but the configuration and rules are a domain specific language.

You can create items to represent weather info and in fact must do so if you want to use weather info in your rules.

EDIT: Apparently forgot to add the link

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`

Webview is purely to get a more customized HTML layout for weather rather than line by line text that native openhab shows from the sitemap. I had endless issues with webview also, you need to extract weather-data folder from the zip I think mentioned above for web view, the example.html in the layouts folder is what is effectively called (if using the default examples from the weather binding support page) with parameters passed to it (passed from webview url in sitemap file) which it uses to display content.

Tips… make sure (and confirm) weather binding is in addons folder (restart openhab once copied in there), if you are running openhab on Linux do a:

tail -f /var/log/openhab/openhab.log

And monitor output, ensuring weather binding is loaded and no errors. Install openhab designer on your PC and open your openhab config files with it - it will display any errors in your config which is better than trying to “diagnose by eye”. It only takes a small error to screw up almost all of the openhab GUI.

Thank you guys for the replies! I’ll work with these suggestions over the next few days and report back if I run into any more snags.

Ok, so I worked through the code, cleaned up where needed and confirmed references between sitemap, items and cfg. However, I’m running into what seems to be a URL reference problem. After reloading OpenHAB and clicking on the weather, I get a 404 error:

HTTP ERROR 404
Problem accessing /weather. Reason:
ProxyServlet: /weather
Powered by Jetty://

Originally, I unzipped the weather-data archive to C:\openhab\webapps\weather-data, if that makes any difference. I did my Google due diligence, but found mostly stuff pertaining to Android, which didn’t get me anywhere. In case its needed, I’m running OpenHAB on a Server 2012 R2 VM at the moment with Java 8U73.

What is your webview url?

The webview URL as listed in the sitemap file is:

Webview url="/weather?locationId=home&layout=example&iconset=colorful" height=13

That is exactly the same as my working weather webview. I’m at a loss.

So after going back to the beginning, retracing my steps and subsequently facepalming, it seems that I didn’t copy the weather binding .jar file (org.openhab.binding.weather-1.8.1.jar) to the addons folder. After copying and relaunching OpenHAB I’m no longer receiving a 404 error.

However, after making some headway, I’m now getting a 500 error.

HTTP ERROR 500
Problem accessing /weather. Reason:
Weather locationID ‘home’ does not exist

I checked my items and cfg files and I don’t see any typos when searching weather="locationId=home,. A 500 error indicates a condition error so I’m not sure where to look here. As far as I can tell, data should be populating now.

I have a line in my openhab.cfg file that reads: weather:location.home.name=home

Here is what I’m seeing in openhab.log:

15:25:14.688 [ERROR] [o.u.i.items.ItemUIRegistryImpl:870 ] - Cannot retrieve visibility item Weather_LastUpdate for widget org.openhab.model.sitemap.Text 15:25:14.691 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_LastUpdate for widget org.openhab.model.sitemap.Text 15:25:14.694 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_LastUpdate for widget org.openhab.model.sitemap.Text 15:25:14.696 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_LastUpdate for widget org.openhab.model.sitemap.Text 15:25:14.697 [WARN ] [o.u.i.items.ItemUIRegistryImpl:797 ] - Cannot retrieve color item Weather_LastUpdate for widget 15:25:14.700 [WARN ] [o.u.i.items.ItemUIRegistryImpl:797 ] - Cannot retrieve color item Weather_LastUpdate for widget 15:25:14.702 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Temperature for widget org.openhab.model.sitemap.Text 15:25:14.703 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Temperature for widget org.openhab.model.sitemap.Text 15:25:14.704 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Temperature for widget org.openhab.model.sitemap.Text 15:25:14.705 [WARN ] [o.u.i.items.ItemUIRegistryImpl:797 ] - Cannot retrieve color item Weather_LastUpdate for widget 15:25:14.706 [WARN ] [o.u.i.items.ItemUIRegistryImpl:797 ] - Cannot retrieve color item Weather_LastUpdate for widget 15:25:14.707 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Humidity for widget org.openhab.model.sitemap.Text 15:25:14.710 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Humidity for widget org.openhab.model.sitemap.Text 15:25:14.712 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Humidity for widget org.openhab.model.sitemap.Text 15:25:14.714 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Pressure for widget org.openhab.model.sitemap.Text 15:25:14.715 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Pressure for widget org.openhab.model.sitemap.Text 15:25:14.716 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Weather_Pressure for widget org.openhab.model.sitemap.Text 15:25:14.717 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunrise_Time for widget org.openhab.model.sitemap.Text 15:25:14.718 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunrise_Time for widget org.openhab.model.sitemap.Text 15:25:14.720 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunrise_Time for widget org.openhab.model.sitemap.Text 15:25:14.721 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunset_Time for widget org.openhab.model.sitemap.Text 15:25:14.722 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunset_Time for widget org.openhab.model.sitemap.Text 15:25:14.723 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Sunset_Time for widget org.openhab.model.sitemap.Text 15:25:14.724 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Twilight_Time for widget org.openhab.model.sitemap.Text 15:25:14.725 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Twilight_Time for widget org.openhab.model.sitemap.Text 15:25:14.727 [ERROR] [o.u.i.items.ItemUIRegistryImpl:438 ] - Cannot retrieve item Twilight_Time for widget org.openhab.model.sitemap.Text 15:25:14.763 [DEBUG] [.w.internal.gfx.WeatherServlet:92 ] - Received incoming weather request 15:25:14.770 [WARN ] [e.jetty.servlet.ServletHandler:553 ] - /weather javax.servlet.ServletException: Weather locationId 'home' does not exist at org.openhab.binding.weather.internal.gfx.WeatherServlet.doGet(WeatherServlet.java:101) ~[na:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) ~[javax.servlet_3.0.0.v201112011016.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na] at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) ~[na:na] at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) ~[na:na] at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60) ~[na:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598) ~[org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.Server.handle(Server.java:350) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) [org.eclipse.jetty.http_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) [org.eclipse.jetty.http_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) [org.eclipse.jetty.io_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [org.eclipse.jetty.io_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [org.eclipse.jetty.util_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [org.eclipse.jetty.util_8.1.3.v20120522.jar:8.1.3.v20120522] at java.lang.Thread.run(Unknown Source) [na:1.8.0_77]

Here is my openhab.cfg file:

'################################### Weather Binding ###################################

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=APIKEY
#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=home
weather:location.home.latitude=LATITUDE
weather:location.home.longitude=LONGTITUDE
weather:location.home.provider=ForecastIo
weather:location.home.language=en
weather:location.home.updateInterval=5’

And the relevant portion of my .items file:

`/ Forecast - Forecast data from forecast.io /

// atmosphere
Number Humidity “Humidity [%d %%]” {weather=“locationId=home, type=atmosphere, property=humidity”}
Number Visibility “Visibility [%.2f km]” {weather=“locationId=home, type=atmosphere, property=visibility”}
Number Visibility_Mph “Visibility [%.2f mi]” {weather=“locationId=home, type=atmosphere, property=visibility, unit=mph”}
Number Pressure “Pressure [%.2f mb]” {weather=“locationId=home, type=atmosphere, property=pressure”}
Number Pressure_Inches “Pressure [%.2f in]” {weather=“locationId=home, type=atmosphere, property=pressure, unit=inches”}
String Pressure_Trend “Pressuretrend [%s]” {weather=“locationId=home, type=atmosphere, property=pressureTrend”}
Number Ozone “Ozone [%d ppm]” {weather=“locationId=home, type=atmosphere, property=ozone”}
Number UV_Index “UV Index” {weather=“locationId=home, type=atmosphere, property=uvIndex, scale=0”}

// clouds
Number Clouds “Clouds [%.0f %%]” {weather=“locationId=home, type=clouds, property=percent”}

// condition
String Condition “Condition [%s]” {weather=“locationId=home, type=condition, property=text”}
String Condition_ID “Condition id [%s]” {weather=“locationId=home, type=condition, property=id”}
DateTime ObservationTime “Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]” {weather=“locationId=home, type=condition, property=observationTime”}
DateTime LastUpdate “Last update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]” {weather=“locationId=home, type=condition, property=lastUpdate”}
String CommonId “Common id [%s]” {weather=“locationId=home, type=condition, property=commonId”}

// precipitation
Number Rain “Rain [%.2f mm/h]” {weather=“locationId=home, type=precipitation, property=rain”}
Number Rain_Inches “Rain [%.2f in/h]” {weather=“locationId=home, type=precipitation, property=rain, unit=inches”}
Number Snow “Snow [%.2f mm/h]” {weather=“locationId=home, type=precipitation, property=snow”}
Number Snow_Inches “Snow [%.2f in/h]” {weather=“locationId=home, type=precipitation, property=snow, unit=inches”}
Number Precip_Probability “Precip probability [%d %%]” {weather=“locationId=home, type=precipitation, property=probability”}
// new total property in 1.8, only Wunderground
Number Precip_Total “Precip total [%d mm]” {weather=“locationId=home, type=precipitation, property=total”}
Number Precip_Total_Inches “Precip total [%d in]” {weather=“locationId=home, type=precipitation, property=total, unit=inches”}

// temperature
Number Temperature “Temperature [%.2f °C]” {weather=“locationId=home, type=temperature, property=current”}
Number Temperature_F “Temperature [%.2f °F]” {weather=“locationId=home, type=temperature, property=current, unit=fahrenheit”}
Number Temp_Feel “Temperature feel [%.2f °C]” {weather=“locationId=home, type=temperature, property=feel”}
Number Temp_Feel_F “Temperature feel [%.2f °F]” {weather=“locationId=home, type=temperature, property=feel, unit=fahrenheit”}
Number Temp_Dewpoint “Dewpoint [%.2f °C]” {weather=“locationId=home, type=temperature, property=dewpoint”}
Number Temp_Dewpoint_F “Dewpoint [%.2f °F]” {weather=“locationId=home, type=temperature, property=dewpoint, unit=fahrenheit”}
// min and max values only available in forecasts
Number Temp_Min “Temperature min [%.2f °C]” {weather=“locationId=home, type=temperature, property=min”}
Number Temp_Min_F “Temperature min [%.2f °F]” {weather=“locationId=home, type=temperature, property=min, unit=fahrenheit”}
Number Temp_Max “Temperature max [%.2f °C]” {weather=“locationId=home, type=temperature, property=max”}
Number Temp_Max_F “Temperature max [%.2f °F]” {weather=“locationId=home, type=temperature, property=max, unit=fahrenheit”}
String Temp_MinMax “Min/Max [%s °C]” {weather=“locationId=home, type=temperature, property=minMax”}
String Temp_MinMax_F “Min/Max [%s °F]” {weather=“locationId=home, type=temperature, property=minMax, unit=fahrenheit”}

// wind
Number Wind_Speed “Windspeed [%.2f km/h]” {weather=“locationId=home, type=wind, property=speed”}
Number Wind_Speed_Beaufort “Windspeed Beaufort [%d]” {weather=“locationId=home, type=wind, property=speed, unit=beaufort”}
Number Wind_Speed_Knots “Windspeed [%.2f kn]” {weather=“locationId=home, type=wind, property=speed, unit=knots”}
Number Wind_Speed_Mps “Windspeed [%.2f mps]” {weather=“locationId=home, type=wind, property=speed, unit=mps”}
Number Wind_Speed_Mph “Windspeed [%.2f mph]” {weather=“locationId=home, type=wind, property=speed, unit=mph”}
String Wind_Direction “Wind direction [%s]” {weather=“locationId=home, type=wind, property=direction”}
Number Wind_Degree “Wind degree [%.0f °]” {weather=“locationId=home, type=wind, property=degree”}
Number Wind_Gust “Wind gust [%.2f km/h]” {weather=“locationId=home, type=wind, property=gust”}
Number Wind_Gust_Beaufort “Wind gust Beaufort [%d]” {weather=“locationId=home, type=wind, property=gust, unit=beaufort”}
Number Wind_Gust_Knots “Wind gust [%.2f kn]” {weather=“locationId=home, type=wind, property=gust, unit=knots”}
Number Wind_Gust_Mps “Wind gust [%.2f mps]” {weather=“locationId=home, type=wind, property=gust, unit=mps”}
Number Wind_Gust_Mph “Wind gust [%.2f mph]” {weather=“locationId=home, type=wind, property=gust, unit=mph”}
Number Wind_Chill “Wind chill [%.2f °C]” {weather=“locationId=home, type=wind, property=chill”}
Number Wind_Chill_F “Wind chill [%.2f °F]” {weather=“locationId=home, type=wind, property=chill, unit=fahrenheit”}`

The “Cannot retrieve item …” errors indicate an error in your Items file. You have a bunch of Items that don’t exist that you are trying to put on your sitemap. If you think they do exist it means that you have a syntax error in your Items file preventing OH from reading the whole file.

To get a basic config, I removed everything in the sitemap except for:

Webview url="/weather?locationId=House&layout=example&iconset=colorful" height=13
Frame {
Text item=LastUpdate visibility=[LastUpdate>30] valuecolor=[LastUpdate>120=“orange”, LastUpdate>300=“red”]
Text item=Temperature valuecolor=[LastUpdate==“Uninitialized”=“lightgray”,LastUpdate>90=“lightgray”,>77=“orange”,>60=“green”,>40=“aqua”,<=40=“blue”]
}

I changed “home” to “House” but that didn’t do anything. I also commented out weather:location.House.name= in the cfg file and I’m no longer getting Disabling weather locationId in the logs. But I still don’t understand why I’m continuing to receive an HTTP 500 error Weather locationId ‘House’ does not exist. I have it explicitly labeled as such in the cfg file. I can’t imagine this addon is that hard to configure.

The error is not in your sitemap. The error is in your .items file.

I copied/pasted the example from here into my items file and replaced home with House for every line.

Be that as it may, again, the “Cannot retrieve item …” errors in your log means there is something wrong with your Items file. Some sort of syntax error that is preventing OH from properly loading and parsing that file. As a result all Items that are defined after whatever the error is do not exist as far as OH is concerned.

Use Designer, load your Items file, and look for the errors that Designer will highlight for you.