New locations don't show up when added to existing locations

  • Platform information:
    • Hardware: RasPI 4
    • OS: OpenHabian
    • Java Runtime Environment: JRE 17
    • openHAB version: 4.0.1
  • Issue of the topic: When adding a new location to an alreaydy existing model setup of locations, then this new location does not show.

In fact I already had this issue in OH3, and I am not sure whether it is an issue or a feature. Everything works fine when I start the setup by creating my model with the full hierarchy of locations, so all floors, all rooms the floors and so on. After that I can happily add the equipments. However, my experience is that when I need to ADD a location afterwards, it won’t fully work.

The effect is that e.g. when in the Model view adding a new “root level” location (so besides ground floor and first floor adding the cellar), it will display a “New Item / Location” in the list, I can add the details, but when hitting “Create” it states “item created” but does not show it in the model. I can find the entry in the Items and also in the JSON files on disk, and the code does not look any different from e.g. the ground floor’s code (sniplet from /var/lib/openhab/jsondb/org.openhab.core.items.Item.json):

  "Cellar": {
    "class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
    "value": {
      "groupNames": [],
      "itemType": "Group",
      "tags": [
        "Cellar",
        "Location"
      ],
      "label": "Celler",
      "category": "cellar"
    }
  }

This also happens when trying to add a new room to an existing floor, creating works, shows up in Items but not in Model.

For the fun of it I created the same “Cellar” location a second time - still not showing up in the model - and in the /var/logs/openhab/events.log file I found an openhab.event.ItemUpdateEvent on my “Cellar” item. There is no entry for the initial creation of “Cellar”.

Sorry if this is a beginner’s question. I read a couple of similar threads before posting, yet I could not get my issue solved with those.

Does it show up if you put a Point or an Equipment into the Location?

I know that in the Overview page it will not show Locations that do not have anything in them.

Does the Item show up if you check “show non semantic items”?

Is this another Firefox caching issue? Are you using Firefox as your browser?

OMG - really?!? For over a year I didn’t consider the browser as the culprit.

Thanks a lot @JustinG, that was it, case closed, evening saved, wife happy :wink:

Also thanks @rlkoshak - before Justin’s answer I’d have replied that I just couldn’t add a point or an equipment - I guess that I gonna fire firefox …

Adding a point or equipment is done through Group membership. You can change Group membership from the Items settings page. Navigate to the Location Item and add the points and/or equipment under “direct group membership”.

Yes, and now it works :+1:. In Firefox the effect was that the “invisible” locations, equipments etc. were not listed in the dialog of potential members. In Chrome they show up fine and I already put everything in place.

When you run into this issue, I think that it is sufficient to just hard refresh the page ctrl + shift + r in firefox I believe, but it may just be less frustrating to use a different browser. Chromium based browsers (Chrome, Brave, etc.) do not seem to have this issue.

I will give this a try, thanks - yet a browser just doing what one would expect is kinda nice …