Resolving Continuous Hue Bridge Discovery in OpenHAB

I recently encountered an issue with my Philips Hue bridge where OpenHAB kept rediscovering it every two minutes, cluttering my inbox and logs. This was quite perplexing as the bridge was already properly configured and integrated. After some research and troubleshooting, I managed to pinpoint the cause and resolve the issue. Here’s my journey and the solution I found, in case anyone else is facing the same problem.

Initially, I noticed that the Hue bridge would appear in the inbox periodically, despite being already paired and functional. The logs were filled with messages like:

2019-01-02 14:54:49.770 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘hue:bridge:0017886dcc21’ to inbox.
2019-01-02 14:54:49.772 [home.event.InboxAddedEvent] - Discovery Result with UID ‘hue:bridge:0017886dcc21’ has been added.

This was not only annoying but also unnecessary, as the bridge was working perfectly. I decided to dig into the OpenHAB configuration to see if there was an oversight in my setup.

After reviewing the Hue binding documentation and forum posts, I discovered that the issue might be related to the discovery settings. OpenHAB’s Hue binding continuously scans for new devices, which can lead to repeated discoveries of already paired bridges. To address this, I adjusted the discovery settings in my services.cfg file to limit the scanning frequency.

Here’s how I resolved it:

  1. Modify the Hue Binding Configuration:
    I edited the services.cfg file located in the conf/services directory of my OpenHAB installation. I added or updated the following lines to control the discovery interval:

    hue:discoveryInterval=3600
    hue:discoveryEnabled=true

    This sets the discovery interval to one hour (3600 seconds) instead of the default shorter interval. Adjusting this reduces the frequency of discovery attempts.

  2. Exclude the Hue Bridge from Rediscovery:
    To prevent the Hue bridge from being rediscovered, I added it to the exclusion list in the same services.cfg file:

    hue:excludedDevices=0017886dcc21

    Replace 0017886dcc21 with your Hue bridge’s unique identifier.

  3. Restart OpenHAB:
    After making these changes, I restarted OpenHAB to apply the new settings. The Hue bridge was no longer rediscovered, and the inbox remained clean.

This experience taught me the importance of fine-tuning discovery settings to avoid unnecessary alerts and log noise. It’s also a reminder that even well-configured systems can benefit from periodic reviews and adjustments.

If anyone else is facing similar issues, I’d recommend checking your Hue binding configuration and adjusting the discovery settings as needed. Feel free to share your experiences or ask questions below—I’m happy to help!