Items do not update state

meanwhile I’m pretty sure that my issue is caused by the HTTP Binding (openHAB HTTP Binding).
I’m playing around now with the timeouts in the http.cfg, but until now I haven’t found a proper setting. Whenever I adjust something in my items I do have the issue with the item states.

However, I at least have a workaround now by restarting the http binding :slight_smile:

cheers
martin

What does that mean, what are you doing?

You haven’t shown a single example of any config at all yet.

What does that mean, what are you doing?

hello,

I have a couple of tablets running fully kiosk browser to display my Habpanel DAshboards.
fully kiosk browser offers a Rest API to control it (monitor and configure things in it)
these tablets are in my http.cfg to catch basic devices infos.

timeout=500
tablet1_deviceInfo.url=http://<>:2323/?cmd=deviceInfo&type=json
tablet1_deviceInfo.updateInterval=10000

if fully kiosk browser crashes (which unfortunately happens) the http requsts isn’t answered and timing out. And I assume that the openhab http binding is not really able to hold enough of this problematic requests and is sooner or later crashing.
what I’m trying now: I need to find an update interval which is big enough to compensate/avoid the issue, and small enough that my automations are still working. Of course is the tablet crashes the automation is also not working, but if everything works I would like to see my automation rules working of course.

with regards to adjusting the items:
well, i have some item files in /etc/openhab2/items/, and whenever I modify one of them I face the issue that the item states are not changed anymore (for all items, not only the items in the item file I changed)
actually whenever an item file is loaded again into openhab (even a touch of the file triggers this) the issue occurs.
if config is useful:

Content of file /etc/openhab2/items/test.items
String testitem

cheers
martin

I never liked that “overall” timeout setting in http.cfg, something like
tablet1_deviceInfo.timeout=500
would seem more sensible to me, but there we are.

Although I’d set a bit more generously than that, even for a local network.

There is a “working copy” of this file at http.config , it is worth making sure this matches what you want. If it doesn’t, stop openHAB, delete it, and restart for it be recreated.

Which open the possibility that what is “hanging up” is the notifications system attempting to inform your UI of updates.

hello,

my problem is back again. I did an update to 2.5.4. today, but I do not thing this is causing the issue.
I tried several restarts, with and without cleaning the cache, nothing helped
Meanwhile i disabled nearly all things I have, (beside some network ping things) but nothing helps.
my previous direction, http, binding has obviously nothing to do with the issue.

but since every thing is disabled right now, i can easily show the problem.
Test item, Number, named “testtime”, after a fresh restart, with, or without cleaned cache in console:

openhab> smarthome:status testtime
NULL
openhab> smarthome:send testtime 23
Command has been sent successfully.
openhab> smarthome:status testtime
NULL

it simply does not change it item values …

Has anyone any ideas? Or how to troubleshoot? I’m really running out of ideas,…

thanks
martin

Is there some reason that you expect sending this Item a command to cause its state to change? That does usually happen but it is not guaranteed to happen.
Commands and states are two very different things in openHAB.

What does your events.log tell you happens here?

Things that might happen, when you send a command to an Item:

If your Item has autoupdate disabled - nothing.

If your Item has autoupdate enabled - which is the default case, unless you have changed it - then a short time after the command, autoupdate will predict the likely effect on the Item state, and usually issue a state update to that effect.

But

Obviously if the commands makes no sense for that Item - like sending “123” to a DateTime Item type - no prediction is made. So nothing happens to the Item state.

And

If the Item is linked to any bindings, the bindings get a veto over any autoupdate prediction. For example, if an Item is linked to a device with a disabled or failed Thing, the likely effect of a command on the real remote device is nothing - because the command cannot be sent - so some bindings will veto the autoupdate prediction. So nothing happens to the Item state.

You might consider posting an update to your Item as a completely different test.
smarthome:update I think

Hello,

The item testtime is not linked to any binding, or any thing, it is just an item in an item file.

cat /etc/openhab2/items/test.items
Number testtime

events.log does reflect of course the symptom, commands are good, states are not:

2020-04-25 18:30:33.829 [ome.event.ItemCommandEvent] - Item 'testtime' received command 23
2020-04-25 18:31:05.517 [ome.event.ItemCommandEvent] - Item 'testtime' received command 23
2020-04-25 18:31:17.310 [ome.event.ItemCommandEvent] - Item 'testtime' received command 23
2020-04-25 18:31:54.050 [ome.event.ItemCommandEvent] - Item 'testtime' received command 23
2020-04-25 18:36:19.995 [ome.event.ItemCommandEvent] - Item 'testtime' received command 23

“commands are good and states are not” as written in my initial post, this is actually the problem, since all my rules with “received command” are working, the ones with “changed” are not.

I do know about the differences with item commands and states, and I also consider the fact, that sometimes state change of an item can take a bit longer, in my rules and automation, but in that case it doesn’t update the state at all, not 1 second later, but also not 1hour later. It is simply not doing it.

Your Item definition is still secret from us. Not all commands will produce an effect with all Item types.

Hello,

what do you mean with “item definition”?
there is not more configuration for this item (testtime) as written in my last statement.
Number testtime

Please have a look at my first post in this thread, my problem is not that something is not initially working, it is working and it stops working, without any related change.
I currently have around 2000 items, I add one new item, and non of my 2000 items change their state anymore.

Meanwhile my system is working again, in the past it recovered after i restarted the http bundle. Yesterday this didn’t work, also not starting openhab processes and/or rebooting the entire system. Cleaning the cache didn’t make a difference either.

What finally helped. I removed all my item files, and ally me rule files, from /etc/openhab2/, started openhab. After that I moved all item and rule files back, and restarted the openhab process. Everything was working again. All rule and items files were exactly the same as before, no configuration change!

Any other ideas, or someone observing the issue in the past?

cheers
martin