I just upgraded to OH2.5 on my Synology diskstation. The weather binding is not working. I get the error:
javax.servlet.ServletException: javax.servlet.ServletException: Weather locationId 'home' does not exist
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:494)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
at java.lang.Thread.run(Thread.java:748) Caused by: javax.servlet.ServletException: Weather locationId 'home' does not exist
at org.openhab.binding.weather.internal.gfx.WeatherServlet.doGet(WeatherServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
... 15 more`Preformatted text`
Any ideas? Uninstalling and reinstalling the binding did not work.
That is not the issue. I have pasted the contents of weather.cfg from my services folder. Note that I have redacted my api keys from what I pasted below.
Many thanks,
-Mark
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
apikey.ForecastIo=myapikeyredactedhere
apikey.OpenWeatherMap=myapikeyredactedhere
#apikey.WorldWeatherOnline=
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=
# location configuration, you can specify multiple locations
location.home.name=home
location.home.latitude=41.6090
location.home.longitude=-71.1459
location.home.woeid=12760339
location.home.provider=OpenWeatherMap
location.home.language=en
location.home.updateInterval=60
#location.<locationId2>.name=
#location.<locationId2>.latitude= (not required for Yahoo provider)
#location.<locationId2>.longitude= (not required for Yahoo provider)
#location.<locationId2>.woeid= (required for Yahoo provider)
#location.<locationId2>.provider=
#location.<locationId2>.language=
#location.<locationId2>.updateInterval=
I had set the permissions to CHMOD 777 for weather.cfg. That did not help. There is a clue in the logs when debugging:
2019-12-22 09:06:52.581 [WARN ] [eather.internal.common.WeatherConfig] - Provider with name 'Wunderground' not found. Check the binding config.
Wunderground is not mentioned anywhere in weather.cfg. This statement shows up even if I rename weather.cfg, so I suspect it is not looking at the right file. I am not sure where it is looking, as the only place weather.cfg exists(ed) is in /var/services/homes/openhab/conf/services which is where all of my binding configurations are located. Do you have any ideas where else I should look?
My old OH2.4 installation was in @appstore/openHAB, and that appears to be where the new runtime is as well. The services folder in that directory appears to be pointing to the path I mentioned in the prior paragraph, because any changes I make there appear in this path as well.
I decided to do a clean install of OH2.5. That appears to have fixed this issue. Now I have another one. I am getting the error:
javax.servlet.ServletException: javax.servlet.ServletException: File with weather layout 'example.html' does not exist, make sure it is in the layouts folder ./webapps/weather-data/layouts
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:494)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: File with weather layout 'example.html' does not exist, make sure it is in the layouts folder ./webapps/weather-data/layouts
at org.openhab.binding.weather.internal.gfx.WeatherServlet.doGet(WeatherServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
... 15 more```
I have the file example.html located in the conf/html folder. Where should it be located? This was working with OH2.4.
-Mark
have you restored weather.cfg to be the same file as it was in 2.4?
does the locationId/service provider do you reference from your items exist in there?
A file example.html cannot be mandatory to exist so it’s an error in the file/service config to refer to that “example” file.
The location issue appears to have been resolved with the reinstallation. The issue now is rendering the icons for the weather state - as shown in
The code to render the url on the sitemap requires the file example.html as well as others to be in a folder called /webapps/weather-data/layouts. I have put these files in the /conf/html folder - both directly, in a subfolder called layouts and in a subfolder called weather-data/layouts. I am not sure where they should go - there is no ./webapps folder in the new version of openhab. I am definitely missing something…
Fixed it. On Synology, the weather-data folder, which contains the layouts folder and the images folder, needs to be located in /userdata/webapps. You need to make the webapps folder and put the weather-data folder and its contents in there.
The solution to the original problem would have been to copy the weather.cfg file from services to /var/lib/openhab2/config/org/openhab/weather.config and replace the old weather.config file there.