Problem with Icons in Sitemaps

Dear friends of the openHAB community, I am new to the world of home automation and I need your help, because after a couple of months trying to solve the following problem, but I have not yet found the solution.
I’ve researched this site and other forums as well, and found similar problems without the expected results.

The problem I have is that both in the Sitemaps ( and in the application for the cell phone: the icons of the lamps I have in the house always show “power on”, when I change the state they show the actual state of the lamps but a few seconds later they turn back and show the “on” state even though the switch is already in the “off” state.

I put the code I use to see what they recommend and if there are any errors or settings that I have not used.
Thank you very much


sitemap home label="SH2937"
       Frame label="CuartoB"
               Switch item=LuzMNcB
       Frame label="Salita"
               Switch item=SwAX570


Switch LuzMNcB "Luz Mesa de Noche" <light> (CB,qlight)
            <[broker:stat/sonoffCB/POWER:state:default]" }

Switch SwAX570 "Amp Yamaha Salita" <switch> (SW, gSwitch)
    { mqtt=">[broker:cmnd/sonoffSW/POWER:command:*:default],
            <[broker:stat/sonoffSW/POWER:state:default]" }

Hey @Rhoos55,
you could have reduced the example and put it into code fences for better presentation (I’ve done that for you).

Regarding the actual issue: Nothing is wrong with your config and the error doesn’t make much sense to me. Could you please post a few screenshots and tell us which version of openHAB you are on? Are there any rules working with the items? Please post the content of events.log for one of those items.

My first guess is that the Items are not going back to “on” but to “NULL” which is something like the unknown state. That would explain the icon but not the cause :wink:

First of all Thom, thanks for your fast response. The openhab version is “openHAB 2.1.0-1 (Build )”, I don’t use any rule for the items yet. The event log is a bit extense, so tell me if I can forward it through your e-mail. I’d also appreciate if you can specify which screen captures would be best for you in order to understand the issue.


You might want to post update the item, through the use of a rule, it may help ypur situation.

Seems like you are using openHABian. The wrongful “(Build )” could be related but i don’t think so.
I’d recommend to practice log browsing. Please do the follow:

tail -f /var/log/openhab2/events.log | grep LuzMNcB

Now switch your lamps on and off and observe the state changes of the Item.

Btw. think about more meaningful names for your items. You might know what they mean now but you’ll confuse yourself in the long run. See the style recommendations here:

Hello Thom, thanks for your response. Attached you’ll find the result of the command. After running it, I used the cel app open hab on Android and as you can see after issuing the command you suggested, my android cell app shows “on” even though in reality they should be off. If I switch the icon for the specified item,the light goes off, but after a few seconds the icon shows as on. All items behave the same way, if I switch them on they show the on state, but when I switch them off, the icons will show an on state even though they’re really off.

Thanks for your comment about the item names, I’ll consider it.

If I reset the Raspberry Pi which is my openhab server, when the system restarts all the icons are on, but the switch icon is off, and they won’t respond to my switching them on or off. After I reset a second time everything turns back to the previous way of working.

Hi Branden thank you, I do not understand your suggestion, please explain!

Check this post

Hi All

Similiar issue. I cant get an icon to display or my Watt usage for a zwave device


Number LivingRoomNum1 "Living Room Usage [%.1f]" { channel="zwave:device:d4900ba9:node2:meter_watts1" }

It reports fine in the openhab log…

Hi @dastrix80
Which icon do you wish to use?

Put the icon name (without the “.svg”) between <> after the label in the item definition:

Number LivingRoomNum1 "Living Room Usage [%.1f]" <iconname> { channel="zwave:device:d4900ba9:node2:meter_watts1" }

For the energy icon:


use <energy>

the icons are at:

hi @vzorglub Im using the SquidIcon set, i placed one in the classic folder and have no .svg extension in my definition

microphone-squid is my icon name :slight_smile:

What type of file is your icon?
If it is a png file and you have selected vector icon for classic UI which I know you have to make your gates work then you won’t be able to use the icon.
You need to use all svg or all png

Hi Vincent its an SVG file

send it to me, I’ll have a go

I know why!!!
Remove the - from the name of the icon and in your item

The - is used by OH for icons with states like gate.svg gate-open.svg gate-closed.svg

Rename your icon microphonesquid.svg

Yes sir :smiley: