Bug in PersistentInbox

One of my installed bindings (Philips Hue) continuously produces “Added new thing” log messages, as shown below. As you can see from the log, the message comes from the openHAB core PersistentInbox class, and not from the Hue binding. So I think there is a bug in PersistentInbox rather than one in the Hue binding.

2019-09-16 16:25:34.713 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:27:41.879 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:29:38.061 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:33:43.886 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:35:42.078 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:37:40.293 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:39:30.844 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:42:30.238 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:46:01.237 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:48:33.150 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.
2019-09-16 16:50:23.411 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:0017882157c7' to inbox.

Is the “hue:bridge:…” the only message of new items in your inbox? Or are there others too? If not I am pretty sure it is not a bug of the inbox.

Which OH2 version do you use?

I think I found the reason and provided a fix for it - in the Hue binding:

  • Fix assignment of serial number property - it is not always the same like the mac address (e.g. if you are using an emulated Hue API)
  • Added property for mac address

The serial number is the representational property of discovered devices. If we overwrite it with a wrong value the same device will be discovered again and again. The calculation of the serial number from the bridge id is derived from nUPnP discovery:

1 Like

Ah. Cool. Many thanks @cweitkamp for digging into this, and solving it.