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:
How is this file to be named ?
Which access rights should be applied ?
Where exactly should it be placed ?
Is there another file where a refernce to this file has to be entered ?
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 ?
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…
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.
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.
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 )
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.
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.
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?
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
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.
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/”.
hi @bastiaan_van_h
thanks for your widget,
can you tell me how i can add your widget (json) to the openhabpanel? i have no import functionallity on openhab3?
many thanks