Iconset (where is in OH2?)

Folks, just a dumb question, but I’m unable to find the answer: I’m migrating from OH1 to OH2 and found a problem with icons - do you know where can I find a list or browse the icon set available? also, if I want to use customs icons, how can I do to use my own?

This is currently at https://github.com/kaikreuzer/openhab-core/tree/master/bundles/org.openhab.ui.iconset.classic/icons, but planned to be moved to https://github.com/eclipse/smarthome/tree/master/extensions/ui/iconset/org.eclipse.smarthome.ui.iconset.classic/icons.

See here:

It is possible to provide your own custom icons in the conf/icons/classic folder - no need to overwrite the icons that come with the runtime


@Kai: was there any changes regarding the user icons ? Using lat snapshot, I created a folder conf/icons/classic and put few icons inside but they are ignored at run time.

ls -l conf/icons/classic/
total 56
-rwxr--r-- 1 pi pi  299 oct.  20 16:23 battery-1.png
-rwxr--r-- 1 pi pi  308 oct.  20 16:23 battery-2.png
-rwxr--r-- 1 pi pi  308 oct.  20 16:23 battery-3.png
-rwxr--r-- 1 pi pi  307 oct.  20 16:23 battery-4.png
-rwxr--r-- 1 pi pi  287 oct.  20 16:23 battery-5.png
-rwxr--r-- 1 pi pi  190 oct.  20 16:23 rf-1.png
-rwxr--r-- 1 pi pi  190 oct.  20 16:23 rf-2.png
-rwxr--r-- 1 pi pi  221 oct.  20 16:23 rf-3.png
-rwxr--r-- 1 pi pi  188 oct.  20 16:23 rf-4.png
-rwxr--r-- 1 pi pi  181 oct.  20 16:23 rf-5.png
-rwxr--r-- 1 pi pi 2059 oct.  20 16:23 wifi-1.png
-rwxr--r-- 1 pi pi 1053 oct.  20 16:23 wifi-2.png
-rwxr--r-- 1 pi pi 1070 oct.  20 16:23 wifi-3.png
-rwxr--r-- 1 pi pi 1027 oct.  20 16:23 wifi-4.png

If this is the correct location, the folder should be created automatically at install.

No, I am not aware of any changes, sorry.
Yes, creating the folder by default is a good idea. If you like, you can have a try to create a PR yourself, by adding the folders to https://github.com/openhab/openhab-distro/tree/master/distributions/distribution-resources/src/main/resources/conf (and putting a readme file inside).

Is it working for someone or shall I create an issue ?

Here is an item example not working:

Number WifiNetatmoInt "Wifi sonde Netatmo [%d / 4]" <wifi> (GNetatmo) {netatmo="xx:xx:xx:xx:xx:xx#WifiStatus"}

Feel free to create an issue, but please provide an example based on the demo setup, so that it is easy to reproduce.

Hi, have you tried using *.svg?

Is SVG format now required ?
It looks like all the default icons are provided in SVG and PNG formats.
I got the icons from netatmo and they are in a PNG format.

Well, you can specify which type to use, see https://github.com/openhab/openhab-distro/blob/master/features/openhab-demo-resources/src/main/resources/services/classicui.cfg#L5
The Classic UI uses png as a default, though.

Ok, little progress. The problem is not the icon format. If I add a wifi.png icon, I see that this icon rendered when my item is not yet set. The problem is that the icon is not correctly chosen when my item is set to a value. For example, the item (Number) is set to 3 and my icon is not changed to wifi-3.png. Even if I clean my WEB browser cache, the icon displayed seems to be always wifi.png.

PS: it works as expected in OH 1.8.1.

I seem to have the same behavior with the very recent oh-2 snapshot. Don’t know how I can help to advance this issue.

Thanks in advance for any advice.

Im currently having this problem did anyone ever make any headway on this?

The only thing that I don’t see any one talking about above, but is required for dynamic icons, is to make sure you have a default icon state icon too. eg. wifi.png as well as wifi-1.png wifi-2.png etc.

Hello together,

I just start to migrate from openhab1.8.2 to 2.0.0-3 (latest version for QNAP).
Basically it is working but I can’t get the png-icons into Basic-UI.
In which folder do I need to put them?
What further configuration and where do I need to do?

Any hint?


Hey Axel, I believe you’ll find all details needed here: http://docs.openhab.org/configuration/items.html#icons - the article was updated just recently, if any question stays unanswered, please let us know.

Thx for you hint to read again the documentation.
I found that I need to set the icon type via PaperUI to “png”.

Now it works as expected.