Feedback-loop using UI page in OH3

Hi,

can anyone more clever than me please help me?

I ran into a problem while configuring the new pages in Openhab3. When I configure a stepper or a knob for my radiator my logfile starts to go crazy as if there is some kind of feedback-loop:

2021-01-08 14:40:06.163 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.1 °C to 16.00 °C
2021-01-08 14:40:06.211 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 16.1
2021-01-08 14:40:06.216 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 16.1
2021-01-08 14:40:06.224 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 16.1 °C
2021-01-08 14:40:06.320 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.1 °C to 19.00 °C
2021-01-08 14:40:06.446 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.86
2021-01-08 14:40:06.453 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.86
2021-01-08 14:40:06.461 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.00 °C to 18.86 °C
2021-01-08 14:40:06.499 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.86 °C to 19.00 °C
2021-01-08 14:40:06.539 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.86
2021-01-08 14:40:06.545 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.86
2021-01-08 14:40:06.552 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.00 °C to 18.86 °C
2021-01-08 14:40:06.667 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.86 °C to 19.50 °C
2021-01-08 14:40:06.784 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 19.32
2021-01-08 14:40:06.789 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 19.32
2021-01-08 14:40:06.797 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.50 °C to 19.32 °C
2021-01-08 14:40:06.883 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 19.32
2021-01-08 14:40:06.888 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 19.32
2021-01-08 14:40:07.704 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.32 °C to 19.50 °C
2021-01-08 14:40:07.880 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.50 °C to 18.50 °C
2021-01-08 14:40:08.009 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.400000000000002
2021-01-08 14:40:08.016 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.400000000000002
2021-01-08 14:40:08.024 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 18.400000000000002 °C
2021-01-08 14:40:08.069 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.400000000000002 °C to 18.50 °C
2021-01-08 14:40:08.096 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.400000000000002
2021-01-08 14:40:08.102 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.400000000000002
2021-01-08 14:40:08.111 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 18.400000000000002 °C
2021-01-08 14:40:08.235 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.400000000000002 °C to 16.00 °C
2021-01-08 14:40:08.341 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 16.1
2021-01-08 14:40:08.346 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 16.1
2021-01-08 14:40:08.358 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 16.1 °C
2021-01-08 14:40:08.455 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.1 °C to 16.00 °C
2021-01-08 14:40:08.468 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 16.1
2021-01-08 14:40:08.485 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 16.1
2021-01-08 14:40:08.505 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 16.1 °C
2021-01-08 14:40:08.679 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.1 °C to 18.50 °C
2021-01-08 14:40:11.404 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.400000000000002
2021-01-08 14:40:11.416 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' received command 18.400000000000002
2021-01-08 14:40:11.420 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.400000000000002
2021-01-08 14:40:11.426 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'HH_EG_BU_Heizung_0SollTemp' predicted to become 18.400000000000002
2021-01-08 14:40:11.431 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 18.400000000000002 °C
2021-01-08 14:40:11.445 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.400000000000002 °C to 18.50 °C
2021-01-08 14:40:12.243 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 19.00 °C
2021-01-08 14:40:12.979 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.00 °C to 16.00 °C
2021-01-08 14:40:13.654 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 18.50 °C
2021-01-08 14:40:14.335 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 18.00 °C
2021-01-08 14:40:14.965 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.00 °C to 20.00 °C
2021-01-08 14:40:15.327 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 20.00 °C to 16.50 °C
2021-01-08 14:40:15.650 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.50 °C to 17.50 °C
2021-01-08 14:40:15.972 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 17.50 °C to 16.50 °C
2021-01-08 14:40:16.302 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.50 °C to 17.50 °C
2021-01-08 14:40:16.649 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 17.50 °C to 17.00 °C
2021-01-08 14:40:16.998 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 17.00 °C to 16.50 °C
2021-01-08 14:40:17.377 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.50 °C to 20.00 °C
2021-01-08 14:40:20.122 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 20.00 °C to 16.50 °C
2021-01-08 14:40:21.255 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.50 °C to 16.00 °C
2021-01-08 14:40:21.755 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 19.50 °C
2021-01-08 14:40:22.090 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.50 °C to 19.00 °C
2021-01-08 14:40:22.419 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.00 °C to 16.00 °C
2021-01-08 14:40:22.749 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 19.00 °C
2021-01-08 14:40:23.133 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.00 °C to 19.50 °C
2021-01-08 14:40:23.457 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 19.50 °C to 18.50 °C
2021-01-08 14:40:23.775 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 18.50 °C to 16.00 °C
2021-01-08 14:40:24.133 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'HH_EG_BU_Heizung_0SollTemp' changed from 16.00 °C to 18.50 °C

This only stops if leave (close) the page.

I also had this problem with my lights. My full home was flickering. With Light I worked around this only using ON and OFF… which I do not see a solutions for radiators.

The knob is

component: oh-knob-cell
config:
  title: = Test this
  item: HH_EG_BU_Heizung_0SollTemp
  stepSize: 0.5

The state description of the Item is:

value: " "
config:
  pattern: "%.1f %unit%"
  step: "0.5"

One aditional thnig which I saw when I used a stepper instead of a knob was. Using “+” and “-” did not change the value by 0.5 but by e.g. 3.4 - then directly afterwards the change was made to 0.5.

If I use the setpoint with a sitemap everything is fine.

Is there anything I miss?

Best regards
Peter

I’ll have a go at explaining what is happening, but cannot offer a cure.

  1. The UI reads your Item state, and in response “turns” the knob to whatever position.
  2. “Turning the knob” causes a command to be sent from UI to Item.
  3. Autoupdate sees that, and updates the Item state to a new value.
  4. But there’s real device also getting the command, which does not have the same granularity of data. So shortly afterwards, the Item state gets another update to real value.
  5. This new updated state is seen by the UI, it does not match current knob position exactly, so knob is “turned” again a little bit.
  6. “Turning the knob” once again generates a command and round we go again …

I think the fault here is the UI generating commands in response to “turning the knob” by itself, instead of only when a real user does it.
I couldn’t say if that’s a bug or a configuring problem.

1 Like

Thank you.

I cannot yet verify, but I think I solved the problem without knowing it and meanwhile deleted all evidence. I will just state my assumption. Perhaps someone is able to say if this is possible and I will try to reproduce.

One thing I can say is, that I currently don’t see the loop anymore. The last things I did, was deleting my test-page and shutting down my office-PC before leaving for weekend.

I did testings on two different pages. On one page - my main page - I configured

 step: "0.5"

On the other page - my (now deleted) test page - I might have had some older test-values.

I assume I had the test-page open in the office the whole time while doing my configurations at home. As the knobs on both pages were configured with different steps, there was some kind of ping-pong. One knob realizes that the the current knob position does not fit to the own granularity, so the knob in the office is “turned” a little bit. Then the knob at home does the same - as @rossko57 described much better than me.

I did not know that the UI sends commands when changes were generated from a “non-real-user” input. I assume, this might lead to several problems… but on the other hand I am no expert in these things. I am just glad I now know that.

Additionally I see, that the knobs send the command for every step and not only when I lift my finger. This results in a burst of commands when “turning” the knob which might have made the problem worse. During turning the knob, the above problem already started to change the knob-position “under my pointer” resulting in the next ping-pong between my input and the “automatic turning”.

I did not find a configuration to change the behavior of the knob - so this is just an another assumption.

I now only use stepper and will wait if the problem reappear.

Me neither - this would I’m sure be unwanted, i.e. a bug, but seemed to fit your observed symptoms.

Is there a real device linked to your Item? The existence of a second active UI with different settings would give the observed effects if it’s doing this thing with sending (unwanted) commands.

It should be possible to prove this point by postUpdating the Item state from rule or REST - does that provoke the UI to send a command?

That’s probably by design. Back in the days of OH1 there were debates about whether a slider should send only “final” position (how do you determine that?) or intermediate changes.
Maybe a “max frequency” parameter is in order - sitemap sliders had a sort-of version sendFrequency=

OK - I am not able to reproduce this. It appears, that the UI is not sending this unwanted commands.

I tested a lot and everything worked. When the item was linked to a channel, it jumps a bit but this is not the same.

I don’t know :slight_smile: But I found out that oh-slider-item only sends the command on the final position. This is much better for me as my Homematic-environment limits the qty. of allowed commands per hour. I am now using sliders and it works like a charm.

Thank you for your support!

I am very sure this is the same Problem:

The other thread is more active and has more details.If someone got the same Problem, please check there.

I think you’re right, I experienced the same yesterday with a stepper. And it was on the demo server :laughing: it meant “someone” somewhere in the world had a stepper still displayed set with a step of 1, and my update to set it 0.5 was changed to the next integer every time by this other client. Took me a while to figure it out.

This is obviously a problem but these controls send “change” events and don’t differentiate what caused the change. So I don’t believe it’s impossible to solve, but surprisingly non-trivial.

I am not sure anymore if my problem was caused by this:

“Unfortunately” I deleted the evidence prior to realizing that this solves the issue.

Was a group:avg involved?

If not, this might be two bugs.

Just for clarity - this is UI knobs and sliders only that are affected?

I was able to reproduce the “group:avg-Problem” with steppers but not with knobs.

Already if only the group-item is a slider or a stepper, the problem occurs. The other can be eg. knobs.

Good to know, thanks.