OH2: How to add new Icons

how can i add more icons to the classicui?
I’ve searched a lot in the forum but no working solution for me.

I’ve under “/etc/openhab2/icons” a folder “classic”.
But when i add new icons i cant "<newiconnamewithoutfiletype>" display them.
The filepermissions are correct.
Also i’ve tryed to add a new folder but no effect.
Fuhrter i changed the config from vector to bitmap and back. no effect.
My files are “.svg”-type

Can u help me?

Thanks a lot!

Go to PaperUI -> Configuration -> Services -> UI -> ClassicUI -> Configure and change option to svg files.

1 Like

Thx for fast reply.

But I have.

Okay, sorry, missed that point.

I’ve successfully added png icons to that folder. I’ve never tried svg so can’t say if there is something that works differently or is broken about them.

Are they dynamic icons and if so do you have a default icon?

I am using svg files, no problem, with Basic UI and Classic UI. (link)
Be sure to not have minuses in your filename.

1 Like

I cant add any icon. Dynamic or not dosent matter.
No minuses in my filenames.

@ThomDietrich i’ve add one of your .svg. Same result nothing appears.
I’ve tryed different settings.
Set icon on Sitemap with icon="icon_name" or set in *.item file with <icon_name> or <"icon_name">
Nothing works for me.
The filepermissions is set to openhab.
Is it realy the correct location to store icons?

I dont have further ideas to solve this problem :unamused:

If i try to copy the imagelinkfrom the ui in the browser and open this directly i become:

"XML Parsing Error: not well-formed
Location: https://xx.xx.xx:100/icon/speedtest_upload?state=NULL&format=svg
Line Number 45, Column 89: "

That should work. Did you double and triple check your sitemap/items files? I’m curious about your URL. Why is there port 100 in there? On a normal installation that should be 8080…

This is because i didnt have multiple IPs @home. And on my router is port 100 eedirected to port 80 of the openhab server.
I’ve more then 1 webserver running.

As example itemconfig:

Group gInetspeed
Number INET_PING        "Ping [%.1f ms]"                <"speedtest_ping">              ( gInetspeed )
Number INET_DOWN        "Download [%.1f Mbit/s]"        <"speedtest_download">          ( gInetspeed )
Number INET_UP          "Upload [%.1f Mbit/s]"          <"speedtest_upload">            ( gInetspeed )
String INET_IP          "akt. IP-Adresse: [%s]"         <"speedtest_ip_adr">            ( gInetspeed )


Group item=gInetspeed label="Internetgeschwindigkeit"{
    Text item=INET_PING
    Text item=INET_DOWN
    Text item=INET_UP
    Text item=INET_IP

Your configuration looks good to me (besides the uncommon CAPITALIZED item names ;P).
The router redirect is the only thing that stands out. I’m also using a router forwarding but could you still try if it works at your home directly connecting to port 80? There has to be some error on your side of the system I fear…

I’ve changed the redirect in the router to port 80.
As as expected nothing changed.
The problem appears everywhere. If i connect direct on local network to the server on port 8080 or if i connect on port 80 over the reverse proxy or if i connect to port 100 internal or external network, no difference at all.

Do u need more information or anything else how can i help u?

Further i’ve delete the complete Sitemap and add NOTHING without the shown above. Same result…

Can you describe your system a bit? openHAB version/revision, OS, hardware, filesystem, whatever might be special about your host.

i’ve installed openhab2 with follow guide

Openhab version:
where is version listed? i’ve downloaded “openhab-offline-2.0.0-SNAPSHOT.zip” on 6. Dez

Ubuntu 16.04.1 LTS x64


java version "1.8.0_111"
Java™ SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot™ 64-Bit Server VM (build 25.111-b14, mixed mode)

Hostet as HyperV-VM under Windows Server 2012 R2 Standard x64

Ngnix as reverse proxy

But can it realy a systemfault? I mean all other functions work fine and the default icons are displayed correctly.

I’ve jet seen a .cfg files in the services folder.
I dont know anything about it and doesnt create this files.
But i reads as if it has something to do with it?



Added the Files.
Hope someone finds the error.


Holy shit…:rage:

I’ve got the *.png files to work.

Coincidentally i’ve seen on my smartphone that one of the 10 testicons appeared in the app.
After a bit of trying i can say that every *.png works now. I think the *png files worked every time but i’ve tested the icons on my pc with the knx-icon-set which has white colored icons… Since the androidapp has black background i’ve seen the icon. But on the browser with white background… :triumph:
Didnt changed anything (until the ui settings after seen that problem in app)…

I dont know why the *svg files didint work. But then i will use only *.png files. Its okay for me and i’m happy that i can finally now use custom icons :slight_smile:

Thanks all for ur help!!