OpenWeatherMap widget for HABPanel

Tags: #<Tag:0x00007fe056fb6df8> #<Tag:0x00007fe056fb6c68>

(Bastiaan van Haastrecht) #23

As described in the steps:

  • Add the items to an items file, see this post for the items. Change the id in the channel to your ‘Local weather and forecast’ thing id.

Go to your ‘Local weather and forecast’ thing and note the id which is wrapped in all of the channels:

(Jeff) #24

sorry, i read it and still don’t understand. i showed the code i used so that someone could tell me if i have the proper syntax. so with stars or quotes or what?

(lavoie_richard) #25

@applesauce Make sure you are using the id of the right thing, I confused the id from the “Local weather and forecast” with “Weather and forecast” thing and it wasn’t working until I realized that I mixed them up. You need to use the id from the “Local weather and forecast” thing/channels.

(Jeff) #26

(Barnecke) #27

thx, now I’m getting the data, but sometimes I receive an integer and sometimes a string without changing the config:

Line 121389: 2019-01-26 20:46:57.567 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from Leichter Regen to 500
Line 121399: 2019-01-26 20:56:58.113 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from 500 to Leichter Regen
Line 121400: 2019-01-26 20:56:58.125 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from Leichter Regen to 500
Line 121403: 2019-01-26 21:06:58.725 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from 500 to Leichter Regen
Line 121404: 2019-01-26 21:06:58.728 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from Leichter Regen to 500
Line 121412: 2019-01-26 21:08:56.781 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from 500 to Leichter Regen
Line 121413: 2019-01-26 21:08:56.783 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from Leichter Regen to 500
Line 121423: 2019-01-26 21:20:48.714 [temChannelLinkRemovedEvent] - Link ‘Weather_OWM_ConditionId3 => openweathermap:weather-and-forecast:167dd3df7f0:forecastHours72#condition’ has been removed.
Line 121460: 2019-01-26 21:29:48.231 [ome.event.ItemUpdatedEvent] - Item ‘Weather_OWM_ConditionId3’ has been updated.
Line 121482: 2019-01-26 21:38:59.176 [vent.ItemStateChangedEvent] - Weather_OWM_ConditionId3 changed from NULL to 500
Line 121505: 2019-01-26 22:02:18.501 [temChannelLinkRemovedEvent] - Link ‘Weather_OWM_ConditionId3 => openweathermap:weather-and-forecast:167dd3df7f0:forecastHours72#condition-id’ has been removed.

Do I have to change some setting in the OWM account?

(Matt Botsford) #28

Am I missing something here on how to change the icon colors? Also I seem to be missing the icon for the current conditions.

(Barnecke) #29

The color (and size) you can configure in the widget settings

(Matt Botsford) #30

thats what i was doing. I see in the setting where it says icon_color_current…but whatever i put in there for default value ie: Cyan. It doesn’t do anything.

(Barnecke) #31

that is strange. in my widget the config works.

Does the change of font size work?

(Matt Botsford) #32

nope. It does nothing

(Al Will) #33

I have tried to setup you habpanel widget. Great work !
But i didnt manage to get the icons working. Maybe something with the permissions?
I also dont find a channel in the weather and forecast thing for the Weather_OWM_ConditionIconId item. Right now the widget looks like this:

In PaperUI all the different items receive their values (except the Weather_OWM_ConditionIconId item).
Thanks for you effort
Greetings from Austria

(Patrick Schurig) #34

can anyone tell me how can i find my ID ?

My channel link looks like this (openweathermap2.4 binding):



(Peter Loeffler) #35

works just fine
great job!

(Barnecke) #36

You can see the ID in the log file, e.g. when you add the weather informtion thing. Important: do not take the ID from the accout thing.

(Bastiaan van Haastrecht) #37

Well, I took me some time to get into Angular but a new enhanced version of this widget is available in beta. It now uses the hourly forecast to get the closest to noon data to display for the coming days. This way you get a more accurate daily forecast stil using the free API.

Before I pull it to master, I would appreciate it if someone with more experience with Angular can take a look at my code to see if it makes sense or not. For instance, I’ve got my doubts about the use of $interval. Fork if you like. Please add the items from the items file.

For everybody else, please wait with this beta until its reviewed.

Angular code review request
(Al Will) #38

Hi varneyb,
How did you resolve your permission error? I think I`m facing the same problem


(Ahnyerkeester) #39

Widget looks good. When I use the browser on my laptop it works perfectly.
I have a RPi with 7" touch screen. I’ve installed Firefox and Chromium and in both browsers it looks like this:

The forecast is stacked on top of each other and the current weather icon is in the wrong place.

I’m able to resize the icons but is there an easy way to resize the text?

Also, the configuration for Imperial (US) works well (THANK YOU!!) Except the current weather show km/h rather than mph. Couldn’t find the text in the set up.

(Olivier Biot) #40

I can’t show the 3 images from the openweathermap/images folder (feel.png, humidity.png, wind.png) although the files are at the right place and all permissions are correct. Even after restarting OpenHAB2, nothing changes.

I can’t even access the images directly through the following URI path:

However the files under openweathermap/weather-icons-master/ are directly accessible:

Also, no forecast icons are displayed. Instead the CSS tells me there’s a N/A value somewhere, resulting in an incorrect CSS class wi-owm-N/A:

<i class="wi wi-owm-N/A" ng-style="{ 'color' : (config.icon_color_forecast == NULL) ? primary-color : config.icon_color_forecast, 'font-size' : (config.icon_size_forecast == NULL) ? '3em' : config.icon_size_forecast + 'em' }" style="font-size: 3em;"></i>

What else can I do?

(Andreas) #41

Continuing the discussion from OpenWeatherMap widget for HABPanel:

this ist the same i get on my Nexus 7 tablet that i use for HABPanel UI

(Daniel Hampson) #42

Hi Bastiaan,

I have got a problem with your widget.
It worked perfectly, and suddenly stopped. I completly deinstalled everything and started new, but the same problem occured. I have used the right ID, I have got the right Fiels and Folders, but I am not sure what it could be.

The three widgets on the right are dummies to show that I am useing the right ID and so on.

I solved the issue by my self. The problem that I had was located in the items file.

Number:Temperature		Weather_OWM_Temperature			"Temperature [%.1f %unit%]" <temperature>		{channel="openweathermap:weather-and-forecast:<your-id-here>:local:current#temperature"}

The :local: in the channel had to be deleted. Now the widget ist working like a charm.

I just haven’t found out from where the problem came from.