How to make new Item icons

Hi,
I have copied a new icon ‘humidity’ in the webapps/images directory (the file is humidity.png and is a 32X32 pixels).
But I could’t manage to see it in the icon list while creating a new item (openhab stop / start or even server reboot, doesn’t help).
The version of openhab that I am using is 1.6 on raspberry.

Any idea of how to make this simple change ?

Robert

Hi,

i don’t know what you mean by icon list, but you could try just to use your icon.
in an item file

String humi "humidity [%d]" <humidity> (groups) { binding info...}

or in the sitemap

Text item=humi label="humidity [%d]" icon="humidity"

did you try that?

Hi Mario,

  1. Talking about list I mean the list of icons accessible from the openhab admin web interface, new icons added are never shown.

  2. Thank for the trick, while editing the configuration file of the items using as icon name, the icon is now appearing and in the openhab admin, I see the icon with a comment (manually set), however it doesn’t appear in the pulldown list if I want to add it to another item.

So the way the icons are managed look to me very complex or mysterious!

Robert

Hi Robert,
so you use HABmin to arrange your Items and Sitemap?
I use the Designer and there you code all yourself :wink: I don’t have a list of icons, I just put my custom icons in the webapps/images folder and can use there iconname in my sitemap/item-file.

Mario,

Yes I am using HABadmin, which is relatively user: friendly :stuck_out_tongue:
Now I didn’t realize that HABadmin was using a limited sets of the Openhab icon files; the trick resides in the webapps/habmin /openhab/icons.xml which should be modified to include the new icon file of openhab

Robert