Weather binding .css is not recognized

Hello there,

I tried to install the weather binding, cause I want a weather widget at my sitemap.
I followed the steps of the weather binding.

i created at /var/lib/openhab2 the webapps folder.
After that, I created inside the webapps the weather-data -> layouts and put the example.html inside.
fully path:

/var/lib/openhab2/webapps/weather-data/layouts/example.html

then I go to /etc/openhab2/html
created the weather-data folder and put both folders from the retail download page of the weather binding inside.

/etc/openhab2/html/weather-data/images (with all images inside)

/etc/openhab2/html/weather-data/layouts (all layouts including the .css and example.html)

with the command

http://192.168.178.50:8080/weather?locationId=home&layout=example&iconset=colorful

it should be possible to open the .html… but it won’t…
So I tried to open the webview on the sitemap

Webview url="/weather?locationId=…&layout=example&iconset=colorful" height=7

I can see the correct temperature and the name of my city.
but none of those icons are filled.
I take a look at the .html for the correct path.

this is my includes.

link rel="stylesheet" type="text/css" href="html/weather-data/layouts/example.css" /> <script type="text/javascript" src="html/weather-data/layouts/example.js"></script>

<td rowspan="2"><img id="weather-icon" src="html/weather-data/weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>

<td><img src="html/weather-data/weather-data/images/${param:iconset}/${forecast(0):condition.commonId}.png"/></td> <td><img src="html/weather-data/weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td> <td><img src="html/weather-data/weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>

I also tested the whole path like /etc/openhab2/html…/XXX but this won’t work too.
I don’t know, why the CSS or the images are not correctly recognized…

the normal items are correctly displayed at my sitemap

Text item=Temperature label=“Außen” icon=“temperature”

this works… only the widget doesn’t

can someone help?

I didn’t see where var/lib/…location was mentioned in the doc’s? Did you try installing this in etc/openhab2… instead as this is normally where stuff goes.

The weather binding is a v1 binding.

I created all in /etc

the /var folder did I see at the youtube tutorial
https://www.youtube.com/watch?v=WCnh38qZUZM

when i understand it correctly, I need to create a static folder ?
where ? /etc/openhab2/static ? oder /html/static ? or webapps/static :smiley: ? i dont really get the point of that.

This is a very old openHAB version 1 solution that you are trying to use.
There is no official openHAB youtube content, beware out of date info.

Can you actually get any useful info from v1 weather binding still? Many of the weather services it used are gone or changed. There’s not much point in struggling with a presentation if you have no data.

Perhaps DarkSky is a good alternative. I have not used the binding here but their data looks reasonable to me and they have a free api.

the binding works, all data that which i receive are displayed at the sitemap from DarkSky.

The next step for me was a widget… but when its too old, is there alternatives ?

There is a DarkSky binding.

1 Like

Examples


2 Likes

Ohhh, thats perfect :smiley:
I didnt see that binding, weill thank u very much !:slight_smile:

it works for me.
Also a nice widget for the Habpanel.

thanks

1 Like