OH3: Location Tab: badges not shown / icon missing but reaction on state change

Dear community,

after some research, especially regarding the semantic model as well as the location tab of the overview page and the community I am stucked:

I try to get my semantic model working correctly. While actual temperature, set point temperature as well as humidity are working and proper badges and values are visible, I have issues with door as well as roller shutter status. On top I am not sure if the location structure is correct as it just shows a flat layout while screenshots in the community show a locations separated by floors, e.g.

Locations item file:

// Indoor
Group    gHaus                "Haus"                 <house>                                 ["House"]

// Untergeschoss
Group    gUntergeschoss       "Untergeschoss"        <cellar>            (gHaus)             ["Basement"]
Group    gWaschkueche         "Waschküche"           <washingmachine>    (gUntergeschoss)    ["LaundryRoom"]
Group    gWerkstatt           "Werkstatt"                                (gUntergeschoss)    ["Room"]
Group    gHobbyraum           "Hobbyraum"                                (gUntergeschoss)    ["Room"]
Group    gFlurKeller          "Flur Keller"          <corridor>          (gUntergeschoss)    ["Corridor"]

// Erdgeschoss
Group    gErdgeschoss         "Erdgeschoss"          <groundfloor>       (gHaus)             ["GroundFloor"]
Group    gWohnzimmer          "Wohnzimmer"                               (gErdgeschoss)      ["LivingRoom"]
Group    gEsszimmer           "Esszimmer"                                (gErdgeschoss)      ["DiningRoom"]
Group    gKueche              "Küche"                <kitchen>           (gErdgeschoss)      ["Kitchen"]
Group    gFlurEG              "Flur EG"              <corridor>          (gErdgeschoss)      ["Corridor"]
Group    gGaesteWC            "Gäste WC"             <toilet>            (gErdgeschoss)      ["Bathroom"]

// 1. Stock
Group    g1Stock              "1. Stock"             <firstfloor>        (gHaus)             ["FirstFloor"]
Group    gBadezimmer          "Badezimmer"           <bath>              (g1Stock)           ["Bathroom"]
Group    gSchlafzimmer        "Schlafzimmer"         <bedroom>           (g1Stock)           ["Bedroom"]
Group    gKinderzimmerNord    "Kinderzimmer Nord"    <bedroom>           (g1Stock)           ["Bedroom"]
Group    gKinderzimmerSued    "Kinderzimmer Süd"     <bedroom>           (g1Stock)           ["Bedroom"]
Group    gFlur1OG             "Flur 1. OG"           <corridor>          (g1Stock)           ["Corridor"]

Group    gDachgeschoss        "Dachgeschoss"         <attic>             (gHaus)             ["Attic"]
Group    gBueroMatthias       "Büro Matthias"        <office>            (gDachgeschoss)     ["Office"]
Group    gBueroManuela        "Büro Manuela"         <office>            (gDachgeschoss)     ["Office"]
Group    gDuschbad            "Duschbad"             <bath>              (gDachgeschoss)     ["Bathroom"]
Group    gFlurDG              "Flur DG"              <corridor>          (gDachgeschoss)     ["Corridor"]

// Outdoor
Group    gOutdoor             "Draußen"                                                      ["Outdoor"]
Group    gGarten              "Garten"               <garden>            (gOutdoor)          ["Garden"]
Group    gTerrasse            "Terrasse"             <terrace>           (gGarten)           ["Terrace"]
Group    gGarage              "Garage"               <garage>            (gOutdoor)          ["Garage"]

For the door I have disconnected the contact status from the channel and control this via simple rule and a toggle. Log output shows its changing state. I have defined it twice, once as contact with OPEN / CLOSED state and once as switch with ON/OFF state to double check. Interestingly both are changing state properly and the MainUI location page reacts but does not show the icon.

Group                   gBueroManuelaTuer                                  "Büro Manuela Tür"                                                <door>                (gBueroManuela)                           ["InnerDoor"]
Number                  BueroManuelaTuerBattery                            "Batterie [%.0f %%]"                                              <battery>             (gBueroManuelaTuer)                       ["Measurement","Energy"]         {channel="mqtt:topic:aqara_buero_manuela_tuer:battery"}
Number                  BueroManuelaTuerLinkquality                        "Linkqualität [%.0f lqi]"                                         <qualityofservice>    (gBueroManuelaTuer)                       ["Measurement","None"]           {channel="mqtt:topic:aqara_buero_manuela_tuer:linkquality"}
DateTime                BueroManuelaTuerLastseen                           "Letzter Aktualisierung [%1$td.%1$tm.%1$tY %1$tH:%1$tM:%1$tS]"    <time>                (gBueroManuelaTuer)                       ["Measurement","Timestamp"]      {channel="mqtt:topic:aqara_buero_manuela_tuer:lastseen"}
Switch                  BueroManuelaTuerAvailability                       "Verfügbarkeit"                                                   <switch>              (gBueroManuelaTuer)                       ["Measurement","Presence"]       {channel="mqtt:topic:aqara_buero_manuela_tuer:availability", stateDescription=""[options="ON=Online, OFF=Offline"]}
//Switch                  BueroManuelaTuerContact                            "Kontakt"                                                         <door>                (gBueroManuelaTuer)                       ["OpenState","Opening"]             {channel="mqtt:topic:aqara_buero_manuela_tuer:contact", stateDescription=""[options="ON=Geschlossen, OFF=Offen"]}
Switch                  BueroManuelaTuerContact                            "Kontakt"                                                          <door>               (gBueroManuelaTuer)                       ["OpenState","Opening"]            
Number                  BueroManuelaTuerVoltage                            "Spannung [%,.2f mV]"                                              <energy>              (gBueroManuelaTuer)                       ["Status","Voltage"]             {channel="mqtt:topic:aqara_buero_manuela_tuer:voltage"}

Group                   gBueroMatthiasTuer                                 "Büro Matthias Tür"                                               <door>                (gBueroMatthias)                          ["InnerDoor"]
Number                  BueroMatthiasTuerBattery                           "Batterie [%.0f %%]"                                              <battery>             (gBueroMatthiasTuer)                      ["Measurement","Energy"]         {channel="mqtt:topic:aqara_buero_matthias_tuer:battery"}
Number                  BueroMatthiasTuerLinkquality                       "Linkqualität [%.0f lqi]"                                         <qualityofservice>    (gBueroMatthiasTuer)                      ["Measurement","None"]           {channel="mqtt:topic:aqara_buero_matthias_tuer:linkquality"}
DateTime                BueroMatthiasTuerLastseen                          "Letzter Aktualisierung [%1$td.%1$tm.%1$tY %1$tH:%1$tM:%1$tS]"    <time>                (gBueroMatthiasTuer)                      ["Measurement","Timestamp"]      {channel="mqtt:topic:aqara_buero_matthias_tuer:lastseen"}
Switch                  BueroMatthiasTuerAvailability                      "Verfügbarkeit"                                                   <switch>              (gBueroMatthiasTuer)                      ["Measurement","Presence"]       {channel="mqtt:topic:aqara_buero_matthias_tuer:availability", stateDescription=""[options="ON=Online, OFF=Offline"]}
//Contact                 BueroMatthiasTuerContact                           "Kontakt"                                                         <contact>                (gBueroMatthiasTuer)                      ["OpenState","None"]             {channel="mqtt:topic:aqara_buero_matthias_tuer:contact"} 
Contact                 BueroMatthiasTuerContact                           "Kontakt"                                                                         (gBueroMatthiasTuer)                      ["OpenState","Opening"]            // {channel="mqtt:topic:aqara_buero_matthias_tuer:contact"} 
Number                  BueroMatthiasTuerVoltage                           "Spannung [%,.2f mV]"                                              <energy>              (gBueroMatthiasTuer)                      ["Status","Voltage"]             {channel="mqtt:topic:aqara_buero_matthias_tuer:voltage"}

Attached two screenshots where one can see the locations page reacting with extended background but no text / icons (green marked pixels). I also activated manually all badges in the settings with no difference.



Flat location structure even though the locations are defined hierarchically.

Another behaviour I have seen: Some times I need to restart the system until the model is shown correctly. Is this a normal behaviour or a hint to a wrong configuration?

Not sure how to fix this!

Thanks and best

The structure looks correct as long as you did not edit the location tabs options themselves.
The semantic model does not automatically put in seperators (i.e. ground floor, 1st floor etc.), you need to do this manually (click the upper right corner edit button). LINK

On badges, did you make sure that all semantic properties are defined correctly? LINK

Obvious => I never saw this. Maybe a good idea to add this to the documentation?

I doubled checked, obviously some bug still and no idea where to find!

The log output for the door looks like this, so it uses OPEN/CLOSE which is the correct state your link states.

2022-02-03 14:50:13.758 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BueroMatthiasTuerContact' changed from CLOSED to OPEN
2022-02-03 14:50:31.711 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BueroMatthiasTuerContact' changed from OPEN to CLOSED

I add the details via screenshots, maybe one of you can be so kind and double check - obviously stand by the line:


Have a look at your equipment Mathias Büro Door and try to make it’s semantics just Door and not InnerDoor.
Maybe that’s the small thing not aligned.

Edit: on the other hand I just saw that it should also work with InnerDoor

It is actually documented here.

I took a break for better reading :thinking: and testing.
I also recorded the behavior dynamically via gif (see below) and tested it with just a lightbulb, once via items file and once via main ui with separate items names. Also restarting openhabian was involved.
As I assume this shall not happen anyhow, I posted a issue here.

Innerdoor location card while toggling state

Lightbulb location card while toggling state

I hope we can find and solve the root cause.

There is a ton of stuff to read through and the screen shots are too small to understand so I can’t offer much. But what I can offer is what works for me.

  1. Each door has an Equipment Group. I use “BackDoor”, “FrontDoor”, “GarageDoor”, and “SideDoor” to tag these Groups based on which door is represented. This Group is a member of the Location Group.

  2. The door sensor is represented with a Contact type Item. This Item is a member of the Equipment Group.

  3. The door sensor is tagged with “OpenState” as the Point and “Opening” as the Property.

With these, when a door is open in a location it is shown on the Locations card as a badge.

The animated gifs show the location cars reacting on an item state change. In my opinion this behavior of just extending the distance of the text does not make sense. My assumption: The symbols of the badges should be visible but do not appear due to some bug. But just an assumption of course!

Thanks for the help - it confirms what I tried to use. I set up a dedicated test location with equipment and point as follows:

Group gTestlocation "Testlocation"  ["Room"]
Group gTestequipment "Testequipment" (gTestlocation) ["FrontDoor"]
Contact Testdoor "Testdoor" (gTestequipment) ["OpenState","Opening"]
Switch testswitch "Testswitch"

To be able to operate the door contact, I use the following rule:

rule "test"
    Item testswitch changed
    if (testswitch.state == ON) {
    if (testswitch.state == OFF) {

When toggling the testswitch the testdoor changes state if I trust the log output while nothing happens on the location card:

2022-02-03 20:57:07.865 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'testswitch' received command ON
2022-02-03 20:57:07.870 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testswitch' changed from OFF to ON
2022-02-03 20:57:08.044 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Testdoor' changed from CLOSED to OPEN
2022-02-03 20:57:18.813 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'testswitch' received command OFF
2022-02-03 20:57:18.818 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'testswitch' changed from ON to OFF
2022-02-03 20:57:18.826 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Testdoor' changed from OPEN to CLOSED

I have done ​a second test and removed all things, items and rules and restart openhab. I then only copied the files above => same behavior.

I have done a third test: I removed again the items file and configured the items manually via main ui with identical setting => same behavior.

​Absolutely no idea what the problem is!

Just to share with you for completeness, below some screenshot of my setup which works (I was on mobile yesterday):

I still, even after looking through your screenshots the 4th time, cannot find anything wrong.

Dear all,

thank you for the intensive support and energy! It took me the night thinking about the problem: As the UI reacts on the item state shown with the gif images above, I was thinking: Maybe the icons are just not there (even though for temperature they are). As I reinstalled the latest openhabian freshly, I did a quick research and found this older issue.

With the following command from Kai in the karaf / openhab console the issue is fixed:

feature:install openhab-iconset-classic

Issue solved but I think a fix is needed => I’ll update the github issue.

Thanks anyhow - great support on finding and solving the problem!


Good that it works for you now!

Correct, anyhow I hope in case somebody has similar issues one can derive a solution.
It actually does not make a difference if it is windows, door, innerdoor etc. All work now. Even it can be a switch item with state ON/OFF or a contact item with state OPEN/CLOSED. I decided for contact as it feels more correct.

And I could learn something - not too bad :grinning: