Items from .item file show invalid link

Hello all,

I recently crashed my OpenHABian 2.5. As I had a backup of all the configuration files (*.items, *.things, *.rules, …) I though it would be time to migrate to OpenHAB 3.

I installed OpenHABian and have a working OpenHAB. I mean the setting webpage of OpenHAB is working properly. I have not transferred items or rules or far.

I copied the file hue.things in the things folder and my Hue bridge shows on the setting OpenHAB webpage.

Bridge hue:bridge:001788FFFE28xxxx [ ipAddress="192.168.1.xx", userName="xxx" ]

I copied the .items file in the items folder but the items related to the Hue bulbs show invalid links in the OpenHAB webpage

Switch Halo2_Salon_S "Halogene Salon 2" (gSalon, gLCouleur) {channel="hue:0210:001788FFFE28****:5:color"}

I went through the OpenHAB 3 documentation regarding things and items and I think I have missed something.

Can you please help?

I want to stick as much as possible with files to configure OpenHab as I have a huge number of things and their associated rules.

Thanks in advance!


Did you install the Hue binding?

Yes, I forgot to mention. I installed the binding through the add-on.cfg file and it is shown on the configuration Web page of OpenHAB:

The bridge is paired and OpenHAB detects the bulbs. But, as mentioned in my previous post, I want to configure the items through the .items files as much as possible.


Are there any errors in openhab.log file?

I will have a look this evening.
Is there a way to look at the event log through the webpage, as it was the case for OpenHAB 2?
If not, I will look using command line.


Log via webpage: http://openhabian:9001/

in case frontail is installed, yes

Thanks for the hint regarding the address for the log file.

There is indeed something strange as shown in the log:

2022-10-04 14:17:10.407 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been added.
2022-10-04 15:26:07.015 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been removed.
==> /var/log/openhab/openhab.log <==
2022-10-04 15:26:17.354 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:001788xxxxx' to inbox.
==> /var/log/openhab/events.log <==
2022-10-04 15:26:17.354 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been added.
2022-10-04 17:46:49.297 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been removed.
==> /var/log/openhab/openhab.log <==
2022-10-04 17:47:36.271 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:001788xxxxx' to inbox.
==> /var/log/openhab/events.log <==
2022-10-04 17:47:36.272 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been added.
2022-10-04 20:02:58.639 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been removed.
==> /var/log/openhab/openhab.log <==
2022-10-04 20:03:04.848 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:bridge:001788xxxxx' to inbox.
==> /var/log/openhab/events.log <==
2022-10-04 20:03:04.848 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:bridge:001788xxxxx' has been added.

The bridge has been added then removed by OpenHAB. For your information, there were no interactions with OpenHAB during this period, meaning no access to any *.conf files or others and no actions with switches.

What could be the cause of this behavior?

Thanks in advance,


A bridge has been removed, the auto discovered bridge. You’ve got another bridge that you have defined from file, no?
I don’t know exactly how this stuff works, but discovering something then discarding it because it matches (at least in part) an existing Thing does not seem too alarming.

I’d be a bit suspicious a text defined Thing from OH2.5 may not have all the configuration the 3.3 binding expects.

For an experiment, delete your manual Bridge and see if you can use discovery to create a “GUI” based Bridge.

Your bridge thing

also contains the thing part for the switch or just the line as you posted it ?

It contains just the line as I posted it.
Each item describing a bulb contains the description of the thing (hopefully, I use the right term here) with the associated channel as you can see in my first post.


But you also have a thing for every bulb, right? Without a bulb thing, there is no channel to a bulb.


I followed your suggestions. I removed the .thing file containing the description of for hue bridge then added it using the GUI. I then removed the .items file and added it again with the same results:

2022-10-05 06:14:06.709 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:group:00178828ef48:6' has been added.
2022-10-05 06:12:47.692 [INFO ] [ue.internal.handler.HueBridgeHandler] - Creating new user on Hue bridge - please press the pairing button on the bridge.
2022-10-05 06:13:58.049 [INFO ] [ue.internal.handler.HueBridgeHandler] - User has been successfully added to Hue bridge.
022-10-05 06:14:06.571 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0210:0017882xxxx:1' has been added.
2022-10-05 06:14:06.577 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0210: 0017882xxxx:2' has been added.
2022-10-05 06:14:06.583 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0210: 0017882xxxx:3' has been added.
2022-10-05 06:14:06.592 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'hue:0100: 0017882xxxx:4' has been added.
22-10-05 06:17:34.224 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lumieres.items'

The thing is described in the item, as it was the case in OpenHAB 2

Switch Halo2_Salon_S "Halogene Salon 2" (gSalon, gLCouleur) {channel="hue:0210:001788FFFE28EF48:5:color"}

This worked in OpenHAB 2.

The channel is to be defined in the items file - but - the 0210 part is to be defined in the things file as well.
Have a look to the example e.g the things file need to look like

Bridge hue:bridge:1         "Hue Bridge"                    [ ipAddress="" ] {
    0210  bulb1              "Lamp 1"        @ "Kitchen"    [ lightId="1" ]
    0220  bulb2              "Lamp 2"        @ "Kitchen"    [ lightId="2" ]
    group kitchen-bulbs      "Kitchen Lamps" @ "Kitchen"    [ groupId="1" ]
    0106  light-level-sensor "Light-Sensor"  @ "Entrance"   [ sensorId="3" ]
    0107  motion-sensor      "Motion-Sensor" @ "Entrance"   [ sensorId="4" ]
    0302  temperature-sensor "Temp-Sensor"   @ "Entrance"   [ sensorId="5" ]
    0820  dimmer-switch      "Dimmer-Switch" @ "Entrance"   [ sensorId="6" ]

items file e.g.

// Bulb1
Switch  Light1_Toggle       { channel="hue:0210:1:bulb1:color" }
Dimmer  Light1_Dimmer       { channel="hue:0210:1:bulb1:color" }
Color   Light1_Color        { channel="hue:0210:1:bulb1:color" }
Dimmer  Light1_ColorTemp    { channel="hue:0210:1:bulb1:color_temperature" }
String  Light1_Alert        { channel="hue:0210:1:bulb1:alert" }
Switch  Light1_Effect       { channel="hue:0210:1:bulb1:effect" }

With that statement you need to be a bit careful.
OH2 to OH3 is a major release change this permits changes in definitions.

Thanks a lot for your help.

I tried your suggestion and it worked. Thanks a lot!

Just to clarify for (my future self when I will have to configure again OpenHAB) the 1 after the bulb type 210 is a reference to the bridge and not to the lightId. So, in my case the .things file is looking like

Bridge hue:bridge:001788FFFExxxx "Pont Hue" @ "Mezzanine" [ ipAddress="192.168.1.xx", userName="xxx" ]{
    0210  bulb1 "Lamp 1" @ "Salon" [ lightId="5" ]

and the .item file should look like

Switch Halo2_Salon_S "Halogene Salon 2" (gSalon, gLCouleur) {channel="hue:0210:001788FFFExxxx:bulb1:color"}

Thanks again for your help.