Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customTags.yaml not loading after reboot #4196

Closed
proggprod opened this issue Apr 23, 2024 · 6 comments · Fixed by #4199
Closed

customTags.yaml not loading after reboot #4196

proggprod opened this issue Apr 23, 2024 · 6 comments · Fixed by #4199
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@proggprod
Copy link

Expected Behavior

I have created some custom tags. When I reboot, they should all remain.

Current Behavior

When I reboot, my customTags.yaml file is not loaded, and every item that had a custom tag goes haywire in my model view.
If I open and resave the file, it works as expected.

Possible Solution

Steps to Reproduce (for Bugs)

1- Create a custom tag
2- Reboot openhab

@proggprod proggprod added the bug An unexpected problem or unintended behavior of the Core label Apr 23, 2024
@lolodomo
Copy link
Contributor

lolodomo commented Apr 24, 2024

What is your version of OH?
When you say "not loading", do you mean there is no message "Loading xxx.tags" in your logs?
Please check the REST API returning all tags to confirm they are not loaded. You can use Main UI for that.

@proggprod
Copy link
Author

I’m using OH 4.2.0M2

there is no log message, the tags are not loaded. In the main UI, lots of items are out of their groups because the equipment tags are missing, and when I inspect individual items, they do not show the tags.

Thanks

@rkoshak
Copy link

rkoshak commented Apr 24, 2024

I may have seen this too. I was doing something else and noticed one of my locations didn't show up in the Model view. I edited the yaml file and it immediately loaded but never managed to circle back.

I've rebooted since then and can confirm that there is no log message during startup showing the file is being loaded.

I can confirm that my custom tags are not shown in the response from /rest/tags and Items using custom tags do not appear to be in the model in neither the Model page nor in the Overview page tabs. The tags are on the Items but not shown as semantic tags.

"Den" is one of my custom tags defined in "myTaghs.yaml".

tags:
  - uid: Location_Indoor_Room_LivingRoom_Den
    label: Den
    description: A living room with a TV.
    synonyms:
      - Game room
      - TV room

But the Item tagged appears as follows:

image

When I add a whitespace to the file and save it:

  • I see it loaded in the logs

    2024-04-24 08:01:21.024 [INFO ] [aml.internal.YamlModelRepositoryImpl] - Updating YAML model tags/myTags

  • It's now included in the REST API results:

  {
    "uid": "Location_Indoor_Room_LivingRoom_Den",
    "name": "Den",
    "label": "Den",
    "description": "A living room with a TV.",
    "synonyms": [
      "Game room",
      "TV room"
    ],
    "editable": false
  },

And the Item appears as expected in the model.

image

I'm also on 4.2 M2

@lolodomo
Copy link
Contributor

lolodomo commented Apr 24, 2024

There was PR #4024 that changed things in 4.2 after my initial contribution in 4.1. Maybe this PR broke something?

@lolodomo
Copy link
Contributor

@J-N-K : did you change something related to file loading in #4024 ?

@J-N-K
Copy link
Member

J-N-K commented Apr 27, 2024

I can't remember. But I think I found a bug during initail loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants