OH4.01 - Inbox-Thing not removed from inbox after creation of real thing

  • Platform information:
    • OS: Windows 10 Pro
    • Java Runtime Environment: openjdk version “17.0.8” 2023-07-18 LTS
      OpenJDK Runtime Environment Zulu17.44+15-CA (build 17.0.8+7-LTS)
      OpenJDK 64-Bit Server VM Zulu17.44+15-CA (build 17.0.8+7-LTS, mixed mode, sharing)
    • openHAB version: 4.0.1
  • Issue of the topic: Inbox-Things automatically detected are not removed from inbox, after the real thing is created

I am testing OH4 with a new installation, therefore manually adding my things again via GUI.
Creating things from the inbox is working fine, but after adding the thing, the related inbox item is not removed.
Is this by design? My expectation would be, that the inbox item is removed, once the real thing is created.

I have seen this issue with different bindings (e.g. shelly, sons, hue) therefore I assume its something generic.

  • If logs where generated please post these here using code fences:
    No errors / messages in the log (only that the new thing changes status e.g. form UNINITIALIZED to INITIALIZING…)

No, the Thing should be removed from the Inbox once it’s accepted.

I’ve added Things since upgrading to OH 4 so this is definitely not a universal problem. There is something weird going on.

For me it does.
Check your settings for the inbox, there is a switch “Ignore automatically”

Edit: still on 4.0.0 though …

It depends on the binding used and how the representation property is set. The Shelly Bindng e.g. needs the ThingUID set to the device MAC address, otherwise it will reappear shortly after creating a thing with custom ThingUID.
This can be tested on Shelly devices by just changing one letter from lowercase to uppercase.

Thanks for this.
I did a test with a shelly thing:

  1. If I add the inbox-thing without changing thing ID or thing Name, the auto-discovered thing is removed from inbox, after the actual thing is created.

  2. If I change thing ID / thing name to anything custom, than the inbox-thing will not get removed from the inbox. If I manually remove the inbox record, it will rediscovered as you mentioned.

However for 2nd case, the real thing has the correct MAC address in the thing properties, therefore wondering why this is not enough and thing id / name has to include the MAC address :thinking:

Looping @markus7017 in

I see the same behavior in openhab version 3.4
Greets

Are we talking about

  • running discovery
  • adding things like normal
  • adding equipment to the model
  • waiting on channel updates?

Why do you want to change the thing UID? Thing label ok, but why the ID?

What are the specifics with your installation? Do you use .things to define thing and bindings? Have you tried the regular discovery in Main UI.

It is not uncommon to give Things a more meaningfull UID instead of the „predefined“. It will be readable in the channel links.
The issue exists within MainUI but surely will be in Things files as well.

We are talking about discovered things to be added from inbox.

Nothing special in the installation, as I just downloaded fresh OH4 files and did a clean / new setup for testing only. Everything UI based and no things files.

The thing uid is user configurable, therefore a binding should not dependent on the naming. (Don’t have a reference to this convention at hand).

I do see a mismatch in the binding code. The xml files use serviceName as representation property, while discovery creates things with deviceName as representation property. I don’t know if that is the issue here, but it should match.

My use case here is that I do not like the THING to be linked to the MAC address etc because if/when the device has to be swapped out for hardware issues etc then this “link” is broken and you either have to recreate every link etc or live with the now misnamed THING?

@hilbrand thanks for the hin

I created an updated DEV build, which creates the thing with the serviceName as specified to be the representation property. Please try this one.