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.
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.
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.
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.
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.
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.
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 192.168.1.123 - 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 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
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