OpenWeatherMap widget for HABPanel

Hi,

I put the files into the “openhab-conf” samba folder. That meens, that I copied the needed files into your proposed directory: “/etc/openhab/html/openweathermap”, but it does not work as in many posts described.

So your solution is installed on my Pi …

Hi, i copied the “owm-widget.items”-file from the descriped “/openweathermap”-folder into the “/items”-folder and than it worked.

Hi,
On the PC the widget works perfect, but on the IPad mini i use as Panel the widget is only white. Can someone help me?

Thank you very much for the widget. It’s working out of the box and looks great!

Is there a possibility that nighttime icons will also be used in the future? Or did I miss something within the configuration?

Best regards

EDIT: Have you thought about using the onecall api data for the 4-day forecast? The api delivers the daily minimum and maximum values, so you don´t need a calculation (and it is a bit more precise :wink: ). You only need a second thing.

Hi all,
I’m just a newbee in ioBroker/HABPanel and tried to install the OpenWeatherMap widget,
but not al of the instructions are clear to me.

I use a Raspberry PI where ioBroker was installed via GitHub.

I followed the guidelines from ‘https://github.com/BasvanH/habpanel-widget-openweathermap’,
but at the moment the widget is completely empty.

I got a free OpenWeatherMap account and an API key which I entered in the OpenWeatherMap instances.
OpenWeatherMap.0 is running.

I created ‘/conf/html/openweathermap/’ directory as root, while ioBroker is installed in /opt/iobroker’
Question:
Do I need to modify the access rights of the directory ? To what ?

I downloaded ‘weather-icons-master.zip’, extracted and moved it under ‘/conf/html/openweathermap/’.
Aditionally I then also copied the ‘sgv’ directory to ‘/conf/html/openweathermap/images’.
Question:
There is no ‘images’ directory and no ‘png’ files under weather-icons-master.
Did I enter it correct ? Anything to be changed / added / modified ?

I copied the content of owm.controller.js from GitHub and entered it in the file ‘owm.controller.js’ under ‘/conf/html/openweathermap/’.
Question:
Do I have to modify the access rights ?

Next point is the item file.
Questions:

  1. How is this file to be named ?
  2. Which access rights should be applied ?
  3. Where exactly should it be placed ?
  4. Is there another file where a refernce to this file has to be entered ?
  5. Where do I get the/my channel number from ?

I then copied the content of ‘Local Weather - OpenWeatherMap.widget.json’ from GitHub and imported it into HABPanel.
It is entered in a testpage, but completely empty.

Is there any other way to debug HABPanel/ioBroker ?

hi, does this also works with OH3 ? Thank you

I have the same problem

With openHAB 3 it works fine. :grinning:

Hey
I had the same problem
I fixed it
Just edit your thing with next parameters

  • Configure the Thing: Local weather and forecast set Hours to 96 and days to 1 (to get forecast with free API key)

    Thing weather-and-forecast local "Local Weather And Forecast" [location="59.985762118035645,30.387598872184757", forecastHours=96, forecastDays=1]

Hi all,

I don’t get the widget working.
Followed the instructions plenty of times. The only thing I get is a blank frame. Not even NULLs or anything:
Thats what someone wrote in the forum here.
I have the same problem. I am on OH3.1
tried every suggestion here in the forum but without success.
I deleted the :local: that was good so the items are now working perfect.
see the values.
But in Habpanel is still an emty frame.

the file structure is also correct and I set the permissionf for the whole directory to 777.
I follow the instructions step by step several times…
Now I did not have an additional idea to solve the problem…

Any help or ideas???

brgds

Frank

Done the same but the widget is still emty…

brgds

Thank you very much for this great widget! I was able to get it working on my Samsung Galaxy Tab A 10.1 just fine. The configurability is great.

The 4-day forecast is interesting. I expect it to show the high for the day along with conditions and such.

It looks the try block starting at line 10 in owm.controller.js is getting the predicted condition at (closest to) noon for each of the next 4 days. But the high for a day would (typically) be at more like 1600h, not noon. So it seems the last term in the calculation “var hoursToNoon = (24 - today.getHours()) + 12;” should be 16, not 12, so that it pulls the values for 1600h (and perhaps rename the var accordingly.)

I made this trivial change locally and am getting results closer to what I would expect. Of course, the hour to use may vary depending on one’s latitude/longitude, so perhaps it should be configurable.

And I don’t want to complexify the thing by looking across the values for high/low, never mind the challenge of summarizing conditions, e.g. “windy in the morning”, “showers late”, etc. Keeping it simple seems to imply picking an hour and going with what is forecasted then, which I think was the original intent.

Thoughts?

Another concern with the 4-day forecast, particularly the 4th day.

Since the array of fetched forecast values goes out 96h from the current time, the high temp for the 4th day will only be correct if the current time is after noon (after 1600 with my change). I believe the array needs 4 more elements to go out 108 hours so that the forecast for that last day is correct when viewed at earlier times in the current day.

I extended the array, added the Items, adjusted the Thing setting, and now the 4th day returns a proper forecast.

Like for some others, also my widget remains totally empty.

I run Openhab 3.3.0 in a docker container on my SynologyNAS.

  • OpenWeatherMap thing is loaded and configured with the correct API key and showing ‘ONLINE’. UID is ‘openweathermap:weather-api:948042c573’
  • ‘Local Weather and Forecast’ thing is showing ‘ONLINE’. UID is ‘openweathermap:weather-and-forecast:948042c573:local’

On my docker image, Openhab is installed in the /openhab directory. Within that there’s the following directories (standard openhab stuff, just showing for completeness…):

  • The provided owm-widget.items file has been updated with the my channel ID (948042c573), and placed in the items directory (/openhab/conf/items).
  • All items show up in the Items section of the PaperUI configuration page. The data is all updated correctly (and I can see we have a clear sky with a lovely 28C at the moment :slight_smile: )

Within /openhab/conf/html, I have created the openweathermap folder and uploaded the images directory, weather-icons-master directory and the own.constroller.js file:

Although not in the instructions, I did change the privileges to 755 (or: +x) for own.controller.js, and changed ownership for all files and directories to openhab:openhab (as after uploaded the files to my docker image, ownership for these was set initially to root, which I expect would be incorrect). Before I made this change, the widget was empty as well, btw…

I then loaded the widget and added it to my HABPanel page. All I see is an empty frame…

I’m at a loss at what else to check. I would welcome any suggestion on errors I made or ways to troubleshoot further.

Many thanks,
Ronald

After hours of trying, I finally found the cause for my empty widget. For some reason my own.controller.js file was wrong.

Make sure to download the .js from this location and place it in the /conf/html/openweathermap folder.

As a side-note: On my machine, this /conf folder is located within the /openhab folder, so the .js file must go into the folder: /openhab/conf/html/openweathermap.

Hoep this helps someone else too…

@hulli @ToHe2307

Hey Bastiaan, i´m changed from 2.5.12 to oh 3.x and change my weather forecast to your widget - everything works so far … but how can i change the font size … to a smaler size?

Hi There,

I’m a beginner with open hab 3.0 and I’d like to install the weather widget, but Idon’t understand the installation procedure. Beginning with the first question. where do i have to install the mentioned path structure. is the root directory for all the needed pathes the openhab directory ?

Hello,
i have installed the files, the item and the widget. My Openhab is OH 4.1.1. But I can see only an empty page widget in “HABPanel” .
The items has values as expected .
Any ideas?
Best regards
Ralf

1 Like

maybe there is a general problem with OH4.1 ant this widget. Im still stuck with this problem, too :frowning:

Hello,

I got the Widget up and running with OH 4.1.1. Works like a charm.
I struggled several times, until I found out, that the description in Github is written for openHab in a docker container.
The Widget-Code expects the folder “openweathermap” under static-path.

<div oc-lazy-load="['/static/openweathermap/owm.controller.js']">

If you use OH under an openhabian installation the static-path points to “/etc/openhab/html/”

So, the only thing that you have to do is:
Put the folder “openweathermap” with its content, like described in the installation instructions, into “/etc/openhab/html/”.

that was the trick.

Good luck guys