Custom icons showing in BasicUI but not in openHAB android app

I am running openhab2 with some custom dynamic svg icons. The icons are stored in /etc/openhab2/icons/classic as ‘smartphone.svg’, ‘smartphone-on.svg’ and 'smartphone-off.svg. They work fine in the BasicUI but are not shown in the openHAB android app. I cannot figure out why. Any ideas?

To be checked whether HABdroid supports SVG icon format.

Yes, that would also be my first guess. I don’t know for HABdroid, but the iOS app doesn’t support svg.

Thanks very much for indicating that SVGs might not show up in the openHAB android app. I replaced the dynamic SVG icons with dynamic PNG icons, i.e. ‘smartphone.png’ (in black colour), ‘smartphone-on.png’ (in green color) and 'smartphone-off.png (in red colour) and changed the Basic UI and Classic UI icon format setting to Bitmap. That works fine.


I have exactly the same problem, only I already use PNG icons. :slight_smile:
My icons are also depending on the status. I have “deur.png”, “deur-1.png”, “deur-2.png”.

My icons are stored in “openHAB2\conf\icons\classic”

When accessing BasicUI shows the right icons (even with Android Chrome browser).

However, when accessing via the Android app, my icons don’t change to the relevant status. It always displays deur.png, never deur-1.png.

What could I be doing wrong?

Does anyone have the same problem?

Dynamic items work fine when navigation to http://OPENHABIP:8080/basicui/app using a browser, but always show the status-neutral icon when using the Android app.

It is working well for me with PNG files.
Please post how you define your item and your element in sitemap.


This is how I defined my item:

Number Tex_Window_W16_EV_MasterBedroom_Rechts				"Raam Slaapkamer K&D rechts [MAP(]" 											<raam> 				(gAlarm, gEV_MasterBedroom, gRamen, gAircocontact)

This is what I have mentioned in my sitemap:

Text item=Tex_Window_W16_EV_MasterBedroom_Rechts

My files are in the folder conf\icons\classic:

When I check BasicUI via my Chromebrowser (even my Chrome browser on my Android), it works fine:

When checking the same sitemap using the Android app, I get:

So I don’t think it is related to .items or .sitemap configuration. Maybe it is a bug in the Android app?

Did you try deleting the picture cache through options menu?

It is due to the MAP you are using and a bug I fixed few months ago.
What version of OH are you rumning?
The bug is inside official OH 2.0.

Hi Lolodomo,

Thanks for fixing the bug!

I have OpenHAB 2.1 (snapshot - #838 (from mid March)).
My Android app is (the most recent version).

In which release is this bug fixed?

@sihui: clearing the cache did not help…

The fix was available in the snapshots built after the 20th of March.

1 Like

Ok, thanks!

I’ll upgrade somewhere next week. I’ll let you know if that fixed the issue.

I upgraded to snapshot #946 today and I can confirm my icons are working correct. Thanks!

How did you get to display the time at the end of the text

I update the label using a rule:

	Item myitem received update
	var label = myitem.label.toString.split("   ")
	myitem.label = label.get(0) + " " + " " + " (" + myitem.lastUpdate.toDateTime.toString("dd-MM-yy HH:mm") + ")"

Related topics:
Using .rules-variable as item label
Adding timestamp in my label

Good luck!



I was used to updating an item with time but never a label. Never realized that was possible. tnx

Dries, should that be val label or var label?.
Your linked post uses “val”

I checked my code, I use “var”. But honestly, I forgot why. :slight_smile:

1 Like