[SOLVED] Openweathermap Binding - no difference between condition-id and icon-id

Tags: #<Tag:0x00007f4341cc4a58> #<Tag:0x00007f4341cc4968>

I’m using the latest binding version 2.5.5 but can’t find the Icon-Id Channel within PaperUI (not even with the ‘Show more’ button like for the condition-id channel

so I wrote my own item file but the string value for both condition-id and icon-id are the same

can somebody confirm this

thank you

Hi @greyslater,

The weather condition-id and icon-id are not the same. There is a correlation between them (see Weather condition codes). E.g. the weather condition “Clear” (Clear Sky) has id “800” whereas the icon has id “01” plus suffix “d” or “n” for representation of day (“01d”) or night (“01n”).

Hi @cweitkamp,

thank you for your reply.

I know - this is what I expect but not what I get.
icon-id gives me the same value as the condition-id which is working since 2.4.0

I made an update from OH 2.4 to 2.5 only to get this value which was not present in the previous binding version

Would you give an example of the value you see?
Would you show the Item/channel configuration that does not work?

very weird

after a OH restart I can’t see my manually defined Item anymore in PaperUI under Control
I can confirm the Item is still there under Configuration Items

my Items file is as follows (this is the only manually configured item for my weathermap binding - all the others are configured within PaperUI)

String Weather_Icon_ID "Weather Icon ID [%s]" <sun_clouds> { channel="openweathermap:weather-and-forecast:dbe5051c:local:current#icon-id" }

before the OH restart under Control I saw the Item sharing the same value with condition-id (for example: 800)

the only reason I configured it within an items file is the missing channel for icon-id

Thanks for the example @greyslater. Now the problem is clear to me. This is a typical bug, well-known bug which occurres during update. The new structure for an enhanced Thing is not automatically applied to existing Things. You have to remove and recreate the Thing to see the added Channels. Please give it a try.

1 Like

Thank you and thumbs up @cweitkamp.

Gave it a try and now it works like a charm.
Finally I can have my climacons easily represent day or night.

I will mark it as a solution; guess the bug is worked on elsewhere

Great. You are welcome. I am glad you got it running.

Yes, there is some work on it. If you like to follow have a look into this contribution:

Thank you for the update

So in my case this only happened because I tried to link an item to a channel which didn’t even exist in the previous version of the binding?

A very rare case isn’t it

I think you’e grasped the issue, yes.
It is rare, but non-obvious effects when the properties of a Thing change between versions.

No, I am thinking the opposite. It is a quite common use-case that existing binding structures change over time. And from my POV it is a mess that the user has to do something manually to refresh his openHAB entities (Things, Channels, Configurations, etc.) after an update. The framework should take care of all those things automatically - or at least deliver a notification for the user to do so. That would be a good and intentional solution…

A warning would be good.
Some automated tinkering with a user’s prior configuration, however, sounds like one of those “helpful” features that will lead to unexpected horrors. “Why has this Item disappeared? What is that Item suddenly reading a factor of 100 bigger? Why are all my rules failing because this Item has suddenly acquired UoM?”

I’m a bit worried “something unexpected” already happens in certain cases

Tell me when I’m wrong:
The rare case was the fact that I tried to link an item to a channel which didn’t exist in the 2.4 version of the binding.
If I made the update without this item I guess everything would have worked correct?

I’m in the same boat here: haven’t used the “icon-id” so far, just the “icon” (image provided by OWM). I’m now adding a couple more features to my system, want to use the “icon-id”, and it does not show up.

Do I have to remove the Thing, all configurations, and then install everything again, just to make the new channel work?

No, remove the old Thing - make a note of its name - create new Thing with same name, should hook up with all your existing stuff.

Worked, mostly. Had to force remove it, and also ended up getting a couple of long Java stacktraces in the logfile.

In the end I removed the entire binding, and re-deployed everything.

New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5