openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[Weather] binding: Forecast Display not working under OH2 #4532

Open tkuehne71 opened 7 years ago

tkuehne71 commented 7 years ago

See https://community.openhab.org/t/html-layouts-in-oh2/8762/9

The forecast display in the provided html templates for the weather binding is not adjusted for OH2.

9037568 commented 7 years ago

Is there an OH2 wiki where this documentation should live? It doesn't really belong on the OH1 wiki...

watou commented 7 years ago

Is there an OH2 wiki where this documentation should live? It doesn't really belong on the OH1 wiki...

I think any information about 1.x addons should at least for now go in the existing wiki pages for those addons, in this case adding specific information about how the 1.x weather binding works under OH2.

NickWaterton commented 7 years ago

FYI,

You can get this to work, you just have to put the files in the correct locations (or incorrect locations depending how you look at it).

The weather http server applet root is now located at /var/lib/openhab2 (on ubuntu 14.04 anyway), so the base files needs to go there, in a directory called webapps. so put a copy of webapps/weather-data etc there. The relative paths now no longer work, so you have to put a copy of weather-data in /etc/openhab2/html, and edit the example.html (if that is what your webview url is using) to point the css, javascript and icons to static/weather-data/ (instead of just weather-data).

This is the revised example.html file in /var/lib/openhab2/webapps/weather-data/layouts You have to rename it to example.html as I can't upload .html files.

example.txt

`this points to the copy of weather-data in /etc/openhab2/html

This is the new sitemap webview url:

Webview url="http://openhabip:port/weather?locationId=home&layout=example&iconset=colorful" height=7

I had to use the full address as relative paths don't work anymore.

This is what you get:

file 2016-11-17 10 17 00 am