OpenWeatherMap widget for HABPanel

A openhab restart fixed the problem

Hi

Its working like charm on my ios 9.5 device. One thing… I have been writing with OWM, and they say that there is a Danish translation ready, is it possible to add this translation to this binding?

Hello,
I am very new in using openhab. I hope somebody can help me with my problem.

My weather widget looks like this in the moment:
53

So I have the problem that I can’t get the Icons for current, 3h and 24h.
I think my owm-widget.items file is okay, but I do not have channels for the
weatherconditionID in paperUI for current, 3h and 24h weather…!?
So I can’t link it…!?

How can I solve this Problem…?

Hi!

First of all thanks for the great widget.

I’m playing with habpanel and found your widget and looks great, but seen issue also reported here - currently (it’s 20:20 at my place) I see two entries for Thursday - so Thursday | Thursday | Friday | Saturday

I did a quick spike and it seems as code does not take the optimal forecast - in my case, as said above it’s 20:20 and my 3h forecast (Weather_OWM_DateTime_h3) is at 01.01.2020 22:00 - which I would expect the widget would take to display.

But

today = new Date();
nextDay = new Date();
nextDay.setDate(today.getDate() + day);
nextDay.setHours(12);
var diffHours = Math.ceil(Math.abs(today.getTime() - nextDay.getTime()) / (1000 * 3600));

will calculate my current diff for today to 8 hours => abs(12:00 - 20:00) = ~8h.
And func getClosest will return 9h as the closest - resulting in taking 9h forecast - which is at 02.01.2020 04:00 - therefore I see two Thursday(s) I guess since the forecast is already for tomorrow.

Does above makes sense?

EDIT: not sure if this is the correct place to discuss this? maybe another thread or github?

Hello,
This widget looks really great and I really want to install it and make it work for me. Unfortunately, I’m not able to configure it for two days now :(. I did two installs of OH2 (2.4 and 2.5), did the exact steps in the Readme from the central repo, but the result is one and the same:


This is the content of my OH html dir:

root@OpenHAB:/usr/local/etc/openhab2/html # tree -L 3
.
|-- index.html
|-- index.html.sample
|-- openweathermap/
| |-- owm.controller.js
| |-- weather-icons-master/
| |-- images/
| | |-- feel.png
| | |-- humidity.png
| | |-- wind.png
|-- readme.txt

In the Paper UI Everything looks great and data displays.
My OH installation is on FreeNAS jail if with openjdk8 if that may be in any problem

have a look here

Hey man, thanks a lot. Now it displays some good data.
Cheers!

hello, has anyone managed to clear this issue with the next day that it is shown two times?
i have the same problem, today its ok, tomorrow and the day after tomorrow have the same name even the temp is different and the names of the next two days are ok.
looking in paper ui right now i see that the OpenWeatherMap Account thing is shown with grey color offline and the Local weather and forecast thing same, grey color but marked as unknown
although the habpannel displays some values
restarted oh several times …
any help please?
thanks
image

Could you please tell us if know your weather is displayed ok? I would also like to display today and the next three days instead of 4. What did you modify in the configuration and how many hours have you set? 72/1?
Thanks!

Hi all
this is a great widget, thanks for this awesome development.
The data visualisation works as a charme. But the widget still doesn’t shows icons

I use a habpanel config with a IPhone Safari browser.
But this is independend, because this issue is also in a PCs Firefox

I created and copied as in the installation guide on github, changed the IT in the items
But I still not see any icon

grafik

Does somebody have an idea?

I had the same problem.
It’s most likely because you downloaded weather-icons-master.zip to your pc and unzipped it there and then copied the folder over to your openhab installation. Instead copy the .zip file into the folder /html/openweathermap/ then use your openhab computer to unzip the folder (not your pc).
Cheers

Thanks, I will try this and will come back

I took a different approach, avoiding messing with Date objects, since we only care about the number hours to the next day at noon. This fixes the duplicate day issue for me.

function loadOwmForecast() {
        console.log("Processing OWM widget forecast");
        try {
                var today = new Date();
                var hoursToNoon = (24 - today.getHours()) + 12;
                for (var day = 0; day < 4; day++) {
                        setForecastItems(day, getClosest(hoursToNoon + (day * 24)));
                }
        } catch (err) {
                console.log("Error during OWM widget: " + err)
        }
}

Created a pull request.

@ewgor use the solution here for both of your issues

Thanks I’ll take a look. For now I noticed that there are days that are displayed correctly and eg today and the next 3 days are ok (non of them repeat) and next day when I look in habpannel I see that two of them are the same day like the picture above! Next day again everything ok! What’s the issue here?

@bastiaan_van_h Nice widget,thnx for ur hard work,just a noob question,how can i have only the current weather without the 4 day forecast?I need a banner like widget for my front screen.

Great widget!

I need some help formatting number items in the OpenWeatherMap widget. I’d prefer that number items be displayed as whole numbers, without any decimal places. I’ve tried changing the formatting on the Item, changing "[%.1f [%;unit]" to "[%.0f [%;unit]" but that does not seem to have any effect in the widget. A Dummy widget specified with “Use server defined format if available” displays the value as an integer, a Dummy widget with no format specified displays the number with 3 decimal places, and the OpenWeatherMap displays it with one digit. My item definition is:

Number:Temperature		Weather_OWM_Temperature			"Temperature [%.0f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:80924c3e:local:current#temperature"}

Can someone help?

sorry. i’m new to openhab!
where do i get the ’ Local weather and forecast’ thing id?
i can’t find a hexadecimal value…

In the Paper UI, go in the item Weather and Forecast

Also, FYI, I had to remove the :local: from the item file, then everything is working now
Thanks Bastiaan and everyone else for your contribution! and advises, my weather tab is now working as well!