Cannot move textual mqtt thing to gui

So far I had things defined as textual
Thing mqtt:topic:AussenlichtSued “AussenlichtSued” (mqtt:broker:mosquitto) @ “Aussen”

it works so far. If I try to move that to the gui, via +thing ->mqtt->generic, one if two odd things happen:

  1. I leave the “Parent bridge” unconfigured, then the UID is set before (mqtt:topic:AussenlichtSued) In that case the window just closes when I hit create thing but the thing is not created. At least it does not show up in the list.
  2. If I pick a Parent bridge then it shows offline. And the created thing goes by the UID mqtt:topic:mosquitto:AussenlichtSued and cannot be changed any more. In that case all linked items are not linked as they were defined as
    channel=“mqtt:topic:AussenlichtSued:AussenlichtSued_OnOff”

One thing to note: 1. did work one time for one of my things but never again after that.

When you ‘move’ your Thing to the GUI, what are you doing with the definition in your Things file?

comment it out and wait for the thing to disappear in the gui.

OK, well

This is the correct behaviour, and you can’t change the UID. You will have to adjust your Items.

But why did it work for my other thing ?


Here I managed to get the correct UID without the :mosquitto:

But didn’t you say

So it’s not configured with a Bridge, so won’t actually do anything?

In general, if you’re moving to using the UI, then move everything to the UI, including your Items, otherwise unpredictable behaviour might occur. Create your Thing, then use the Create Equipment or Create Point from Thing so that you don’t have to worry about UIDs.

Or stick with configuration files (which I’m doing).

Configuring using the UI and configuration files is a nightmare to debug, especially as not all behaviours are known/documented at this early stage of OH3’s life!

One thing to note: sometimes the UI seems to do illogical things - try a browser refresh (F5) to see if things improve.

I think I found at least one bug:
if you create a thing and leave the UID unchanged, e.g . 46548632, then the thing is just not created.

Otherwise I just dont pick a mqtt bridge which gives me the correct UID.
Maybe its because I have the mqtt broker still set up as text. I agree, mixing config is a nightmare but reading through the forum I get the distinct feeling they will drop the textual configuration sooner or later so thats why I move it.
And I have not found a way to add the semantic tags in the textual config. Seems to be a GUI - only feature.

Not true, according to Kai during the Meetup.

Also not true

2 Likes

Thanks a lot, maybe I can stick to the textual config after all. I like it much more.
However, happened to me that I was asking for the textual configuration for the OH3 http thing and I was turned down by Rich Koshack who stated that he thinks that this is a waste of time and he would not help with this.

Yes, in the context of providing technical help in the forum - but openHAB itself will support configuration files, as Kai confirmed.

Personally I don’t mind helping out with text configurations - I like the challenge! Did you get the HTTP Binding configuration issue sorted in the end?

Yes, I did.

Btw, I tried to add location tags to the textual configuration, it does something, I still need to play with it. The result is not always what I expected.
Do you know if there is also a link with tags that can be used to configure an items metadata, i.e. provide information on how it is displayed in the GUI? In the GUI I use this dialog:

The metadata code view reads:

value: oh-stepper-item
config:
raised: true
step: 0.5
min: 25
max: 35

Make sure that you don’t have any of your Semantic Model defined by the UI - otherwise unpredictable things happen.

Absolutely!

Excellent. Thank you.

Make sure that you don’t have any of your Semantic Model defined by the UI - otherwise unpredictable things happen.

Is there a way to make sure ? E.g. purge the database ?
Afaik pre OH3 I did only add the bindings via paperUI, everything else came from the files.

A method is to go to the Items view in the UI, and check that all your Items have a padlock symbol next to their label, like this:

image

If they don’t have the padlock then that Item was made in the UI, and if it’s part of the Semantic Model then you may get strange behaviour…

Yes, and it gets even better if you find the “select” feature on the far top right :wink: