Volume control works on its own?

Hi

I have a strange issue with the Frontier Silicon binding. I have a (pretty old) Dual radio that I connected to via the binding. In general, everything works. However, the volume control somehow changes the volume on its own.

Specifically, if I set a certain volume, e.g. 40%, the volume briefly rises to this value, but then gradually goes back to a value of about 20%. First, I thought, that can’t be. But it is very reproducible. It only happens, when using the binding in openhab. There is no such effect, when using the UNDOK app and neither when directly calling the API via webbrowser.

I did a short tcpdump to see, if there are indeed commands been send to the radio, and yes, they are!

19:26:33.500536 IP swarm-worker1.mbhome.41158 > 172.17.4.26.http: Flags [P.], seq 1:166, ack 1, win 502, length 165: HTTP: GET /fsapi/SET/netRemote.sys.audio.volume?pin=1234&sid=2038482803&value=10 HTTP/1.1
19:26:34.652128 IP swarm-worker1.mbhome.41164 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:34.666767 IP swarm-worker1.mbhome.41166 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:35.703727 IP swarm-worker1.mbhome.41174 > 172.17.4.26.http: Flags [P.], seq 1:165, ack 1, win 502, length 164: HTTP: GET /fsapi/SET/netRemote.sys.audio.volume?pin=1234&sid=2038482803&value=9 HTTP/1.1
19:26:36.744984 IP swarm-worker1.mbhome.41184 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:36.758551 IP swarm-worker1.mbhome.41186 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:37.905588 IP swarm-worker1.mbhome.41194 > 172.17.4.26.http: Flags [P.], seq 1:165, ack 1, win 502, length 164: HTTP: GET /fsapi/SET/netRemote.sys.audio.volume?pin=1234&sid=2038482803&value=8 HTTP/1.1
19:26:38.945726 IP swarm-worker1.mbhome.41206 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:38.959792 IP swarm-worker1.mbhome.41208 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:40.114890 IP swarm-worker1.mbhome.41220 > 172.17.4.26.http: Flags [P.], seq 1:165, ack 1, win 502, length 164: HTTP: GET /fsapi/SET/netRemote.sys.audio.volume?pin=1234&sid=2038482803&value=7 HTTP/1.1
19:26:41.159703 IP swarm-worker1.mbhome.41230 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1
19:26:41.173256 IP swarm-worker1.mbhome.41232 > 172.17.4.26.http: Flags [P.], seq 1:157, ack 1, win 502, length 156: HTTP: GET /fsapi/GET/netRemote.sys.audio.volume?pin=1234&sid=2038482803 HTTP/1.1

This dump show that the initial command raises the volume to 10 (out of 32, I believe), but then there are following commands that slowly reduce the volume back to 7 (first 9, then 8, then 7).

I have no idea, why that is happening. Can anyone enlighten me?

Thanks

Michael

Does your events.log show any activity on the linked Item?

There’s probably some underlying rounding effect like commanding 32% in openHAB side, sends 10/32 to device, new status 10/32 translates to 31.125% back in openHAB, rounds to 31%, etc.
But why should a new command be sent, even if new status does not match last command?

There is a bug in MainUI stepper widget causing it to respond to state changes with new commands

Older OH3 versions have the same bug with knob widget, and slider too I think.

Thanks for your reply, @rossko57

Now comes the very strange thing: While it was a 100% reproducible yesterday (over several hours), I doesn’t do it anymore today :roll_eyes: I have no idea, what happened.

Anyway, I will see, if that strange “self-control” starts coming back again. If not, then we can move this episode to the category “strange, unexplained events” :crazy_face:

Addendum: It has come back, indeed. I just needed to reload the widget page in the browser and it started to appear again. So maybe it is really related to the issue you mentioned. When I close this browser tab and control the volume via the android app, there is no ghost movement. As soon as a browser tab shows the volume widget, this “self-control” starts again. :face_with_monocle:

I did say to look in your events.log, where you will see unexpected activity.

Identifying your OH version and the type of widget involved - stepper, slider, knob? - will help too.

openhab 3.2 (stable), the widget is a default widget for a dimmer item (slider). I happens on all screens of the new openhab 3 interface. The old classic interface does not show this issue.

Here is a events.log (on level INFO). The slider was moved from 21 to 30. It then gradually moved back to 21:

2022-02-10 07:48:01.220 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 27
2022-02-10 07:48:01.221 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 27
2022-02-10 07:48:01.224 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 21 to 27
2022-02-10 07:48:01.422 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 30
2022-02-10 07:48:01.432 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 30
2022-02-10 07:48:01.437 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 27 to 30
2022-02-10 07:48:02.317 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 30 to 28
2022-02-10 07:48:03.624 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 27
2022-02-10 07:48:03.627 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 27
2022-02-10 07:48:03.634 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 28 to 27
2022-02-10 07:48:04.727 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 27 to 25
2022-02-10 07:48:05.830 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 24
2022-02-10 07:48:05.839 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 24
2022-02-10 07:48:05.844 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 25 to 24
2022-02-10 07:48:06.923 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 24 to 21

Here another log on level DEBUG:

2022-02-10 07:53:21.687 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 42
2022-02-10 07:53:21.698 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 42
2022-02-10 07:53:21.702 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 18 to 42
2022-02-10 07:53:22.799 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 42 to 40
2022-02-10 07:53:23.891 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 39
2022-02-10 07:53:23.894 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 39
2022-02-10 07:53:23.903 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 40 to 39
2022-02-10 07:53:24.980 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 39 to 37
2022-02-10 07:53:26.096 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 36
2022-02-10 07:53:26.097 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 36
2022-02-10 07:53:26.098 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 37 to 36
2022-02-10 07:53:27.186 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 36 to 34
2022-02-10 07:53:28.294 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 33
2022-02-10 07:53:28.299 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 33
2022-02-10 07:53:28.300 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 34 to 33
2022-02-10 07:53:29.367 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 33 to 31
2022-02-10 07:53:30.497 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 30
2022-02-10 07:53:30.499 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 30
2022-02-10 07:53:30.501 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 31 to 30
2022-02-10 07:53:31.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 30 to 28
2022-02-10 07:53:32.701 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 27
2022-02-10 07:53:32.704 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 27
2022-02-10 07:53:32.708 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 28 to 27
2022-02-10 07:53:33.786 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 27 to 25
2022-02-10 07:53:34.903 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RadioBuro_Volumepercent' received command 24
2022-02-10 07:53:34.906 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RadioBuro_Volumepercent' predicted to become 24
2022-02-10 07:53:34.910 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 25 to 24
2022-02-10 07:53:36.003 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RadioBuro_Volumepercent' changed from 24 to 21

I created the same issue at the Add-on some time ago by mistake, because I hadn‘t found this.

I described the reasons there. I also have a working solution locally, but it does not address the UI but the binding. There would also be possibilities to fix this on UI side, e.g. by not changing the sliders to multiples of the step size for incoming values or not sending the adjusted values in these cases. I‘m new to openHAB and really don‘t know the „correct“ way to solve this. If someone would give me a hint if my approach is correct, I could provide a pull request.