Problems when creating new items

Hello everybody,

i am not to OpenHAb2 generally, and just used Alexa and some skills there. So not that much experience with OpenHAb2. But i am a technician so it is not that hard for me :slight_smile:

I have now been installing OpenHAb 2.2 as a qpkg package onto my QNAP nas and it seems everything works well.

The only behaviour i have been recognizing is driving me crazy. I have been installing the HUE binding at first and i have been creating items in my items file.
So i setup 2 bulbs succsessfully to have channels linked and have them in my sitemap.

Where i am facing issues now is, when i am creating new items (i tried out yahoo weather as example) and there is somehow a misconfiguration with that new item the old ones are getting also fucked up.

That means i need to uncomment all old already working items and need to recreate them with commenting them in again. Then i need to relink those items to get them to work again. Just because i made a mistake with a new item which doesnt have anything to do with the HUE bulbs ?!?

Is that a normal behaviour or i am doing something wrong? It is really timeconsuming to readjust that again and again.
Maybe Openhab 2.2 is not so stable?

Any comments and recommendations? I would really appeciate any help.

Thank you so much,
Geri

Never heard of anything like that.
What exactly happens with your old items? What does your openhab.log tell you?
How do you edit your items (which editor)? PaperUI or flat text?

It’s pretty stable, at least for me (and most of other users too)

ok i need to be honest - i forgot to look into the logfile and didnt do that until now…will do that today evening.

What happens: the items are disappearing in the paper ui (all of them incldugin groups) and if i go to the things tab - icant see them anymore linked.

then i need to uncomment them, and then remove the links at the things tab to"clean" it.
afterwards i can readd them and relink them - then everything is fine again.

i am editing the flat files directly at the NAS with the editor vi.

Thanks for helping me out to get rid of that issue - will look at the logfile as soon i am back home.

Hello again,

now checked the openhab.log file…and found the following error:

[WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'Arbeitszimmer_Lampe’
org.eclipse.smarthome.core.items.ItemNotFoundException: Item ‘Arbeitszimmer_Lampe’ could not be found in the item registry

after that a row of folling errors are in the log…i think that could be exact the time where i am experiencing the issues then:

[ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Arbeitszimmer_Lampe_T’ for widget org.eclipse.smarthome.model.sitemap.Slider

Any Ideas? Thank you again!

What happens if you just touch the .items file to force OH to reload them?

What happens if you restart OH after the error occurs?

These are obviously not solutions but they will help bound the problem.

It is pretty stable but it is also a moving target with a new build every night. That is bound to cause problems along the way. You might have just been a little unlucky. Or there might be something serious going on that needs a fix. This might be something that only impacts QNAP, though that seems unlikely to me.

Very good inputs thanks rlkoshak.

I reproduced the error - wenn entering somethin in items or sitemap with a typo…then it might result in fucked up items which are not working anymore.

2017-09-27 21:31:41.469 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'Haus.sitemap’
2017-09-27 21:31:44.524 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'Arbeitszimmer_Lampe’
org.eclipse.smarthome.core.items.ItemNotFoundException: Item ‘Arbeitszimmer_Lampe’ could not be found in the item registry

Another log …you can see that this directly occurs after refreshing the sitemap in this case.

You were right - wenn i directly restart openhab afterwards- everything is ok again.

when i am just touching the items file and rewrite it (like adding a comment and removing it) - that wont solve the problem.

Thank you,

This is true. If you have a syntax error in a .items file, OH will reject that file and all the Items defined in the .items file will not be created.

A typo in the sitemap should not affect the Items though.

The error itself means that BasicUI cannot find the Item Arbeitszimmer_Lampe, which we already know is a problem so isn’t particularly helpful to us. You should see a “Loading model name of .items file” followed by an error message when you have a .items file with a syntax error.

It isn’t clear exactly what is going on. Which build of 2.2 are you running?

Hello again,

thanks for further investigation.

I am running following version on my QNAP:
Build #1037 (13.09.2017 08:52:56)

Thats the only log entry i could grab in alignment to your question:
2017-09-22 10:22:04.508 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items’
2017-09-22 10:22:04.570 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.items’
2017-09-22 10:22:04.617 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.items’
2017-09-22 10:24:54.939 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap’
2017-09-22 10:24:54.972 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.sitemap’
2017-09-22 10:24:55.078 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'default.sitemap’
2017-09-22 10:25:02.272 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Slider
2017-09-22 10:25:02.275 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Schlafzimmer_Licht_B’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-09-22 10:25:02.276 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Schlafzimmer_Licht_B’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-09-22 10:25:02.277 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Schlafzimmer_Licht_B’ for widget org.eclipse.smarthome.model.sitemap.Slider
2017-09-22 10:25:15.591 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/Schlafzimmer_Licht_B’ for the unknown item ‘Schlafzimmer_Licht_B’.
2017-09-22 10:25:31.030 [INFO ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/Schlafzimmer_Licht_B’ for the unknown item ‘Schlafzimmer_Licht_B’.

Thank you,
Gernot

I understand you’ve used a qpkg package with openhab 2.2.
can you please share the source of this package?

tx!

I think this is what you are looking for!

I had some problems, like this. Rules and items files when they were saved, they appear in my log twice but they are not loaded, and the items are not updated.
I tried to upgrade from v 2.1 to 2.2 and hoped it solved the problem, but now my openhab is offline :frowning: so I have something is play around with for the weekend :slight_smile: