Cannot save Channel and create link to item

  • Platform information:
    • Hardware: Raspbery PI4, 4GB
    • OS: Openhabian on Raspberry
    • Java Runtime Environment: Zulu 11 (openhabian)
    • openHAB version: 3
  • Issue of the topic:
    I just installed openhab (Openhabian) yesterday. I add the KNX Gateway as well as two Lights in my Office. Things are displayed as online.

I now like to create a channel and then link it to an item. I am in a thing (switch) which is online and go to the Channel tab. I click ‘Add Channel’, set Channel Identifier to ‘Office.Decke1’ and Label 'Büro - Decke 1", select channel type ‘switch’ and enter the group address ‘0/1/7’. Now I click create and the Channel is created and visible.

Now I want to add Link to Item – I click on the channel and select the + sign. The link Channel to Item screen opens and displays the channel information at the top.

I select ‘create new item’ and fill out the respective fields (this example is for a simple switch on/off).

I click on the button link at the bottom and nothing happens. No message and screen stays as it is. Naturally, I try to change the selection in the mask to whatever possible for a light switch, but nothing happens when I click Link.

The only option is to press <Cancel at the top of the screen.

And now the Channel is gone. The Channel tab is empty as if I have not created a channel in the first place.

If I however go to the item page, I suddenly have the item I created listed as new item.

So, in the end I could create a channel which vanished and could not create an item which suddenly is in the item list.

I checked in openhabian-config for latest updates, permissions etc. and there is not error message or access restrictions.

Does anybody have an idea what the reason could be?

Thanks for your help.

Have you tried saving the Thing after creating the Channel but before trying to create the Link to the Item? The Channel won’t actually be saved until you explicitly save it or back out of the Thing.

Yes. I have created two things (lights at the ceiling in my office) prior and saved them. They are being shown as online. I can access them and change settings, save those, and the changes are being avaiable afterwards. Only then I tried to add a channel and they are being displayed as ‘online’.
Strange thing is that the channel vanishes but the item I tried to link it to is suddenly avaibale even I could not link it to the channel.
Thanks for any hint.

And do you explicitly save the Thing after creating the Channel? It would seem that it’s not saving the Channel but allowing you to create the link to an Item. The link is getting saved but because the Channel didn’t get saved, it’s pointing to a Channel that doesn’t exist

Thanks Rich - yes. I do save the channel before I try to link an item. I just did it again to be 100% sure.
a) Create Channel and Save - when I go back to the Things tab and then again to the Channel tab the channel is visible
b) Then I select Add Link in the channel and create the item - as before when I am finished and press Link nothing happens - I only have the option to press Cancel
c) When I press Cancel and go back to the Channel tab the Channel I created has vanished and the page is empty
d) When I move to the Items page I can see the newly created Item with the value ‘Off’

Could it be an access problem in writing the config file? Thanks a lot for your efforts

Do you see anything unusual in the logs when you are doing these actions?

My last action as described in my previous answer led to the following entry in the ‘event.log’:

2021-01-07 18:34:04.165 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Decke1_OfficeDecke1’ changed from NULL to OFF
2021-01-07 18:34:08.374 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Decke1_OfficeDecke1’ changed from NULL to OFF
2021-01-07 18:34:08.387 [INFO ] [openhab.event.ItemUpdatedEvent ] - Item ‘Decke1_OfficeDecke1’ has been updated.

No mentioning of Channel or creation of Channel anywhere in this log file.

Shortly after I deleted the item and the ‘openhab.log’ now gives me the following entry:

2021-01-06 19:38:16.204 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn’t exist: Decke1_BuroDecke1
2021-01-06 19:43:10.842 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn’t exist: Decke1_BuroDecke1
2021-01-06 19:43:10.846 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn’t exist: Decke1_OfficeDecke1

Those are items which have been created when I tried to setup the channel. Even I deleted them the system somehow thinks they still exist. Also, in the openhab.log there is no mentioning of channels anywhere.

The ‘audit.log’ file is empty.

I understand that when the item is created the status is being changed as per above - but I do not understand why the system still tries to talk to items when I have deleted them.

What ever error that occurred that had the Channel disappear left the Link orphaned.

See OH 3 Tips and Tricks where I just posted a section for how to find and delete these orphans.

As for the rest, with the information provided there is nothing I can offer except to file an issue.

Thanks a lot. I just did an update on the raspberry and rebooted. The items mentioned above are now gone but thanks for the hint with REST API - learned something new :slightly_smiling_face:
Unfortunatley the issue still exists after update - well perhaps I need to reinstall everything - puuh not again - so weekend will be gone.
Again thanks for your support

Dear Rick, just as an update. I re-installed openhabian from scratch but this time using the version 1.6.2 (fallback) instead of the 1.6.2b as recommended on donload page.
Now everything is working and I can create channels and link them to items. So problem solved.
Thanks again for your support - highly appreciated.

1 Like