Double migration: Darksky on OH2 to OpenWeather on OH3

  • openHABian 3.3.0 on rPi4 with 4GB

I managed (with help fomr the forum; thank you all) to migrate my OH2 set-up to OH3.

It ran in parallel for a couple fo weeks, and is now, since yesterday evening in production. :slight_smile:

So far so good…

I used to have DarkSky weather on OH2, and have ow subscribed to the free 5 day forecase. The ting and relevant items are working.

However, since I used this weather stuff only one, I am a bit puzzled (if not lost) on how to get a similar webview I had in OH2.

Firstly, what I had in OH2:

Webview url="/weather?locationId=argyle&layout=ds_argyle&iconset=colorful"	height=13

… in this physical location:


Looking like this in the sitemap


What is not clear:
a) why or how did this work? How does the webview link identify the physical location.
b) trying to replicate this OH leads to failure.

I copied the weather directory to the OH3 machine, and created a owm.html; at least expecting a html file to show.

I have in the sitemap:

Webview url="/weather?layout=owm&iconset=colorful"	height=13

which results in:

chaging the sitemap entry to:

Webview url="/weather/layouts/owm.html" height=13

results in:
Webview url=“/weather/layouts/owm.html” height=13

Any hints appreciated.

OK, should get the link right…

Webview url="/static/weather/layouts/owm.html" height=13

This is more like it:

Now, what do I need to replace the placeholders with to make OpenWeather data show?

The OH 1.x weather binding implemented this and it’s what made the html page able to access Item states.

The mechanism that building used is not allowed in OH 2+ bindings.

You’ll want to use a native OH 3 MainUI widget, or if sticking to sitemaps you might be out of luck.

Here’s one such widget, there might be more. UI Widget: Weather

Often the weather providers have a widget you could embed using a webview.

Edit: don’t reply when you’ve forgotten your glasses.

1 Like

Ouch… yes, the providers have widgets, but either I am not happy with the colours size, or format. :frowning:

Thank for the widget link… I have seen a few for HABpanel, and as cards, but none for the webview. It is now clear as to why :slight_smile:

E.g., the OWM single day widget fits, but does not look as nice as my 5 day f/c shown in the O.P.

… and it well exceeds the frame with the 7-day f/c.