since yesterday I’m migration from OH1.9 to OH2.0. Lots of binding work already. I used to have the weather binding html layout located in the webapp folder of OH1. This worked fine for OH1, but I don’t know, where to place it in OH2. I copied it to /etc/openhab2/html/weather-data/ which was recommended in the migration tutorial. But my browser just shows this error:
HTTP ERROR 500
Problem accessing /weather. Reason:
javax.servlet.ServletException: File with weather layout ‘weather.html’ does not exist, make sure it is in the layouts folder ./webapps/weather-data/layouts at org.openhab.binding.weather.internal.gfx.WeatherSe rvlet.doGet(WeatherServlet.java:114) 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(Ser vletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler.doHandle( …
Because of this message I placed the content from html/weather-data/ to html/webapps/weather-data/, this didn’t solve my problem. Now I’m here to kindly request any hint, I’ve no idea, what goes wrong.
The file html/weather-data/layouts/weather.html exists and belongs to the user openhab and is readable. My weather items get weather data from wunderground, so in general the binding works.
This helped a lot, thanks!
Wouldn’t it be worth, to extend the migration manual, as there is just mentioned, that all webapps content should be moved to html folder, which definitely not work in this case.
Edit weather.html (or example.html by default) so that all directories start with “static/” e.g. . Find “weather-data/” and replace it by “static/weather-data/”
move this weather.html (or example.html by default) to /var/lib/openhab2/webapps/weather-data/layouts/
move the rest of the complete directory “weather-data” with the subfolders “images” and “layouts” to “/etc/openhab2/html”.