Items created in the new UI are with state NULL

I wondered if someone with more knowledge about the framework could help me. It seems that with the binding that I developed long time ago (and added some new functionality recently), there is an issue. When I create thing and items via the configuration files, everything looks OK, but when I create an item via the UI (i.e. from thing channel → link and create new item) the states of the items created appear to be NULL and they never get updated. I checked the console output and indeed the state is null. Here is example output.

	"link": "",
	"state": "NULL",
	"stateDescription": {
		"pattern": "%s",
		"readOnly": true,
		"options": []
	"editable": false,
	"type": "Contact",
	"name": "Basement_bypassed",
	"label": "Basement bypassed:",
	"category": "lock",
	"tags": [],
	"groupNames": [

Where to start looking for the reason for this behavior and can you give me some hints?


What does the litem channel ink look like? Presumably you are not seeing any changes in events.log? does the binding have any logging?

Ultimately an Item remains NULL when it’s never updated. So you need to debug the path from Item channel link through the binding all the way to the device.

Yeah. I have debugged it, so the model objects (before the OH framework) get updated from the device, according to the debug logs that I created, the thing channels also get updated from the model objects.
From my tests, if I create a thing from the text file and I link the channel via thing ID to an item, the item created from text configuration gets updated. When I do that from the new UI it appears to be NULL.
To me it doesn’t make sense because things, items and their UIDs should be treated the same no matter the UI which creates the definitions. They should be created in the respective registries from what I see in the code. Maybe I need to try to debug that to see why this does not get updated but I don’t have remote debugging set… I will see how to do that.

They are but be careful. You cannot define a Thing or an Item in a file and then redefine in the UI. The Thing/Item in the file will always take precedence.

Took me a while to figure it out but at the end of the day it was a very silly bug due to a different value of the constant representing a channel and the channel ID in the metadata.
Sorry for wasting your time with this issue guys… :frowning:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.