openhab-ios
openhab-ios copied to clipboard
Sliders Start Moving the Wrong Slider Sometimes
Describe the bug On the current version (as of 3 days ago, 31st Jan 2022), if you try to move a slider, the slider above it or below it may move instead. The sliders jump about as you slide your finger from left to right. Sometimes it's not the slider immediately below or above, but one 2-3 sliders above or below. This is not a "fat finger issue".
This has been working properly for years, but now doesn't.
To Reproduce Steps to reproduce the behavior:
- Go to any screen that has a row of sliders
- Click on and drag any slider
- Sometimes the wrong slider will move
Screenshots
In this video I am only adjusting "Max Global Brightness", which is a dummy slider with no channel. The top four sliders are supposed to be updating with new values.
This is the 'flicking" technique, to adjust the sliders back to where they were.
If, on the above screenshot you try to adjust "Max Global Brightness", then quite often "Max Brightness" or ""Speed Control", or "Saturation" will change instead. This happens when you select and drag. If you "flick" the slider with the tip of your finger, you can get it to move a bit. This is the only way I have been reliably able to get sliders to move individually.
Please note this does not happen every time. Sometimes it works fine, others I can't move a slider without others all starting to move.
I have been using this screen for 4 years with no issues. The problem does not happen when using the basic UI either.
App (please complete the following information):
- Breaking version: 2.4.39 (1580410489)
- Last working version: previous version (I believe)
Smartphone (please complete the following information):
- Device: iPhone SE (2020) and iPad Mini 6
openHAB (please complete the following information):
- Version 3.2.0 stable
@NickWaterton: This is concerning.
The videos you provide unfortunately are not visible to me with Safari. I tried with Safari on MacOS and with GitHub app on iOS. Is there an issue on GitHub?
Can you provide server logs to analyse this in more detail?
Hi, real time slider was broken in last update. If i move one slider, other random sliders moves too.
s
@agsochi @NickWaterton please provide additional information: OH version, example sitemap to reproduce the issue, etc.
@weakfl If i touch any slider, random one start moving too, and this random slider name duplicates slider name i touched. OH 3.2.0 - Release Build
On this video i move second dimmer from top, and fourth dimmer moves by yourself .
If i turn off "real-time sliders" in settings - sliders work ok
@agsochi I tried to reproduce this but it's working as expected. I'm not sure if this isn't caused by your config, rules, etc.
![](https://user-images.githubusercontent.com/614985/152677122-3533cc97-b77e-4c0b-879b-359700dd935b.gif)
I removed rules files, same behavior
I found what it is. If i remove groups from item - it work ok If i add item to group - issue back again
OK
Dimmer roomAutodim_CurtLedDim "Потолок" <lamp>
NOT OK
Dimmer roomAutodim_CurtLedDim "Потолок" <lamp> (gAutodimLights, gAutodim)
:)
I had something similar happen on my .sitemap
file recently too. I was intending on opening a issue, but turning off Real-time sliders stopped it from happening (possible culprit).
As mentioned above this only started happened with some of the recent test-flight versions (the build including the Main UI had the problem but not sure if the previous test-flight did, I didn't think so though).
Excerpt from the sitemap file, sitemap file size is 23 KB
:
sitemap ahome label="Home" icon="bw_house" {
...
Frame label="Rooms" {
...
Text label="Front/Kitchen/Dining" icon="col_kitchen" {
Frame label="Sensors" {
Text item=FrontDoor_OpenStatus label="Front Door [%s]" icon="col_door"
Text item=FrontDoor_Temperature label="Front Door Temperature [%.0f °C]" icon="col_temp"
}
Frame label="Devices" {
Slider item=FoyerLight_Brightness label="Foyer Light" icon="col_roof_light_1"
Slider item=KitchenLight_Brightness label="Kitchen Light" icon="col_roof_light_1"
Slider item=DiningRoomLight_Brightness label="Dining Light" icon="col_roof_light_1"
Text label="Automation" icon="col_ai" {
Default item=a_silence_doorbell label="Silence Doorbell" icon="bw_doorbell"
}
}
}
...
}
}
Screencap displaying the problem
https://user-images.githubusercontent.com/6280250/152680044-e6f5af11-c5e4-4985-aeaf-2f380aaab189.mp4
The Foyer Light
and Kitchen Light
both affect each other. (ie, I slide one, the other will respond with typically the same value). It actually causes both lights to change (so not just a visual anomaly, it actually sends the changes to openhab). When you move the slider, for a moment the label in either one will show as the label of the slider you are moving as you can see in the video.
Note that the Dining Light
slider does not get affected by the others and works as expected.
As you can see from Main UI each of the items seems pretty standard to me. Note that these two problem items in openHAB iOS are not connected to one another. I can easily change the brightness in openHAB or Homekit and they do not affect each other.
I have found that "real time sliders" make everything worse, and changes the labels, but turning "real time sliders" off does not fix the issue, it reduces the frequency of the problem, but does not eliminate it.
Here is the relevant part of my sitemap:
Frame item=gDIRECT_LED label="M0 Controls" visibility=[RGBSDisplay_M0_PB!=ON] {
Switch item=DIRECTSRelay_LEDS
//Slider item=DIRECTControllerAll_LEDS
Slider item=DIRECTPathlight_LEDS
Colorpicker item=DIRECT_LEDS
Slider item=DIRECTControllerR_LEDS
Slider item=DIRECTControllerG_LEDS
Slider item=DIRECTControllerB_LEDS
Slider item=DIRECTAll_LEDS
Switch item=DIRECTSAll_LEDS
Switch item=DIRECTSRed_LEDS
Switch item=DIRECTSGreen_LEDS
Switch item=DIRECTSBlue_LEDS
Selection item=DIRECTsequence label="Sequence" mappings=[0="Processing Pixels* (do not use * modes!)",1="None",2="Blank", 3="Rainbow", 4="Replicate*",5="Fade 7", 6="Chase", 7="Rainbow Cycle", 8="Fade HSI", 9="Rainbow HSI", 10="Winter Sparkles", 11="Color Sparkles", 12="Halloween Eyes", 13="Fire"]
Switch item=DIRECTsequence label="Sequence" mappings=[2="Blank", 5="Fade 7", 8="Fade HSI", 7="RBow C", 3="RBow", 9="RBow HSI"]
//Text item=DIRECTsequenceReceived
Text item=DIRECTcurrentinfo valuecolor=["Online"="green"]
Text item=DIRECTcurrentsequence
Slider item=DIRECTSpeed_LEDS
Setpoint item=DIRECTSpeed_LEDS icon="reboot" label="Target Speed [%d]" minValue=0 maxValue=100 step=1
Slider item=DIRECTFade_LEDS
Setpoint item=DIRECTFade_LEDS icon="reboot" label="Target Steps [%d]" minValue=0 maxValue=100 step=4.2
Selection item=DIRECTFade_LEDS icon="fireplace" label="Number of Fires" mappings=[1="One",14="two",22="three"] visibility=[DIRECTsequence==13]
Slider item=DIRECTMaxBr_LEDS
Slider item=DIRECTBr_LEDS
Slider item=DIRECTMax_Br_LEDS
Slider item=DIRECTMin_Br_LEDS
Slider item=DIRECTSaturation_LEDS
//Text item=leds_mA valuecolor=[>13000="red", >10000="yellow", >5000="orange", <=5000="green", <=0="lightgrey"]
Group item=leds_mA valuecolor=[>13000="red", >10000="yellow", >5000="orange", <=5000="green", <=0="lightgrey"] {
Chart item=leds_mA period=4h refresh=30000 service="rrd4j"
Text item=leds_mA valuecolor=[>13000="red", >10000="yellow", >5000="orange", <=5000="green", <=0="lightgrey"]
Text item=DIRECTrgbvalues
Switch item=basementOutlet label="LED Controller Power [%s]"
Switch item=DIRECTSRelay_LEDS label="24V power [%s]"
Switch item=DIRECTsequence label="Sequence" mappings=[2="Blank", 8="Fade HSI"]
Text item=DIRECTcurrentinfo valuecolor=["Online"="green"]
Text item=DIRECTcurrentsequence
Text item=master_uptime
Text item=slave_uptime
Text item=controller_uptime
}
Text item=master_uptime
Text item=slave_uptime
Text item=controller_uptime
Group item=gB label="LED Controller" icon="reboot" {
Switch item=power_cycle_led_controller mappings=[ON="POWER CYCLE"]
Switch item=reboot_led_controller mappings=[ON="REBOOT"] visibility=[back_garden_network==ON]
Switch item=restart_led_controller mappings=[ON="RESTART"] visibility=[back_garden_network==ON]
Switch item=power_cycle_led_controller_usb mappings=[ON="Cycle USB power"] visibility=[back_garden_network==ON]
Switch item=DIRECTreset_slave mappings=[ON="RESET"] //visibility=[back_garden_network_slave==ON]
Switch item=RGBSreset_slave_pi mappings=[ON="RESET Slave"] //visibility=[back_garden_network_slave==OFF]
Switch item=DIRECTreset_slave_indirect mappings=[ON="RESET"] //visibility=[back_garden_network_master==ON]
Switch item=DIRECTreset_master mappings=[ON="RESET"] //visibility=[back_garden_network_master==ON]
Switch item=DIRECTreset_master_indirect mappings=[ON="RESET"] //visibility=[back_garden_network_slave==ON]
Switch item=RGBSreset_master_pi mappings=[ON="RESET Master"] //visibility=[back_garden_network_master==OFF]
Switch item=RGBSusb_power_pi mappings=[ON="Cycle USB power"] visibility=[back_garden_network==ON]
Switch item=DIRECTmask //mappings=[ON="TOGGLE"]
Switch item=DIRECTspiclock mappings=[1000000="1", 2000000="2", 4000000="4", 8000000="8", 12000000="12"]
Text item=master_uptime
Text item=slave_uptime
Text item=PB_uptime
Text item=controller_uptime
}
Group item=gB label="LED Controller Temperatures" icon="temperature" {
Text item=casetemperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Text item=psu1temperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Text item=psu2temperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Text item=psu5volttemperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Text item=picoretemperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Text item=outsidepsu5volttemperature valuecolor=[>75="red", >65="yellow",>50="orange",>35="green",<=35="blue"]
Switch item=Temperature_Chart_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
Chart item=Temperature_Chart period=h refresh=30000 service="rrd4j" visibility=[Temperature_Chart_Period==0, Temperature_Chart_Period==NULL]
Chart item=Temperature_Chart period=D refresh=30000 service="rrd4j" visibility=[Temperature_Chart_Period==1]
Chart item=Temperature_Chart period=W refresh=30000 service="rrd4j" visibility=[Temperature_Chart_Period==2]
}
}
Another video of the problem, "real time sliders" is off. I am only moving "Max Global Brightness", which does not have a channel or a rule attached to it.
Notice the labels do not change with "real time sliders" off, but the problem remains.
@NickWaterton are you using groups for your items? Please provide the relevant *.items file(s) as well.
Yes I am.
Here is the relevant section of my .items file:
/* Garden LED Strip Lights Control */
/* RGBW Control */
Group gRGBW_pi "Garden Light Controller (pi)" <colorwheel> (BackGarden)
Group gDIRECT_LED "Garden Light Controller (Direct)" <colorwheel> (BackGarden)
Group gPB_LED "Garden Light Controller (Pixelblaze)" <colorwheel> (BackGarden)
/* Relay Control - Turns Main LED Power on or OFF */
Switch DIRECTSRelay_LEDS "LED Controller ON/OFF" <shutdown> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSRelay_LEDS" }
/* Auto Start Control - not a real control - software switch */
Number RGBSAuto_start_M0_PB "Auto Start M0 or PB" <select> (gRGBW_pi)
Switch RGBSDisplay_M0_PB "M0 or Pixelblaze" <switch> (gPB_LED)
/* Individual Color Controls */
Dimmer DIRECTWControllerAll_LEDS "RGB Light Control [%d %%]" <switch> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTWControllerAll_LEDS" }
Color DIRECT_LEDS "RGB Light Color picker" <colorwheel> (gDIRECT_LED)
Dimmer DIRECTControllerR_LEDS "Red [%d %%]" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTControllerR_LEDS" }
Dimmer DIRECTControllerG_LEDS "Green [%d %%]" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTControllerG_LEDS" }
Dimmer DIRECTControllerB_LEDS "Blue [%d %%]" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTControllerB_LEDS" }
/* All LEDs */
Dimmer DIRECTAll_LEDS "RGB All [%d%%]" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTAll_LEDS" }
Switch DIRECTSAll_LEDS "RGB All" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSAll_LEDS" }
/* Switches */
Switch DIRECTSRed_LEDS "Red" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSRed_LEDS" }
Switch DIRECTSGreen_LEDS "Green" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSGreen_LEDS" }
Switch DIRECTSBlue_LEDS "Blue" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSBlue_LEDS" }
/* Special Light Functions */
String DIRECTsequence "Sequence [%s]" <select> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTsequence" } //Fake sequence for use with sitemap switch selection
String DIRECTsequenceReceived "Sequence [%s]" <select> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTsequenceReceived" }
String DIRECTcurrentinfo "Info: [%s]" <msg> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTcurrentinfo" }
String DIRECTcurrentsequence "Message: [%s]" <msg> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTcurrentsequence" }
String DIRECTrgbvalues "RGB Values: [%s]" <colorwheel> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTrgbvalues" }
Dimmer DIRECTPathlight_LEDS "Pathlight [%d%%]" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTPathlight_LEDS" }
Dimmer DIRECTSpeed_LEDS "Speed Control" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSpeed_LEDS", autoupdate="false" }
Dimmer DIRECTFade_LEDS "Fade Step Control" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTFade_LEDS", channel="mqtt:topic:fencelights:DIRECTChase_LEDS" }
Dimmer DIRECTMax_Br_LEDS "Max Brightness" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTMax_Br_LEDS" }
Dimmer DIRECTMin_Br_LEDS "Min Brightness" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTMin_Br_LEDS" }
Dimmer DIRECTMaxBr_LEDS "Max Global Brightness" (gDIRECT_LED)
Dimmer DIRECTBr_LEDS "Global Brightness" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTBr_LEDS" }
Dimmer DIRECTSaturation_LEDS "Saturation" (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTSaturation_LEDS" }
/* Special Functions */
Switch DIRECTreset_slave "Reset Slave" <reboot> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTreset_slave", autoupdate="false" }
Switch DIRECTreset_master "Reset Master" <reboot> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTreset_master", autoupdate="false" }
Switch DIRECTreset_slave_indirect "Reset Slave (via master)" <reboot> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTreset_slave_indirect", autoupdate="false" }
Switch DIRECTreset_master_indirect "Reset Master (via slave)" <reboot> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTreset_master_indirect", autoupdate="false" }
Switch DIRECTmask "Mask Mode" <checkbox> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTmask", autoupdate="false" }
String DIRECTspiclock "SPI clock [%d]" <select> (gDIRECT_LED) { channel="mqtt:topic:fencelights:DIRECTspiclock" }
/* RPi Special Light Functions */
Number sequence "Sequence (pi) [%d]" <select> (gRGBW_pi) { channel="mqtt:topic:fencelights:sequence", channel="mqtt:topic:fencelights:selector" } //Fake sequence for use with sitemap switch selection
String currentsequence "Sequence (pi): [%s]" <msg> (gRGBW_pi) { channel="mqtt:topic:fencelights:currentsequence" }
Switch RGBSreset_slave_pi "Reset Slave (pi)" <reboot> (gRGBW_pi) { channel="mqtt:topic:fencelights:RGBSreset_slave_pi", autoupdate="false" }
Switch RGBSreset_master_pi "Reset Master (pi)" <reboot> (gRGBW_pi) { channel="mqtt:topic:fencelights:RGBSreset_master_pi", autoupdate="false" }
Switch RGBSusb_power_pi "Cycle USB power" <reboot> (gRGBW_pi) { channel="mqtt:topic:fencelights:RGBSusb_power_pi", autoupdate="false" }
Switch RGBSmask_pi "Masked mode (pi)" <checkbox> (gRGBW_pi) { channel="mqtt:topic:fencelights:RGBSmask_pi", autoupdate="false" }
There is a rule triggered by DIRECTBr_LEDS
which sets the value to DIRECTMaxBr_LEDS
value if you try to set the value higher than DIRECTMaxBr_LEDS
, which is why there is no channel for DIRECTMaxBr_LEDS
.
Could be related to an issue on reusable cells. @weakfl: try to have more than a screenful of cells in your test sitemap
Maybe a bug in merge of storyboard files
I could reproduce the issue in demo mode on simulator: Main Menu -> Widget Overview -> PERCENT-BASED WIDGETS, wiggle around when real-time sliders are selected. I haven't found the fix yet
@weakfl is there a structural issue here? Would we need to have a view model that holds the information and configures the cells? If so, why did it work up to now?
@timbms I doubt this has ever worked as intended.
Could be related to an issue on reusable cells.
Could be. Since the widget is not captured it might easily have changed when the closure executes, sending the value to the wrong widget.
Would we need to have a view model that holds the information and configures the cells?
Of course that would be a better approach. The view shouldn't store the widget at all imho.
Unrelated rant: we should look at raising the deployment target to iOS 13. Think SwiftUI, MVVM, Concurrency, Combine, etc...
I use to use an iPhone 6 which meant no iOS 13.
If you do consider upping the target os, consider what important features and fixes you want to bring in before it happens so that those with older iDevices don't miss out!
@Cossey we would definitely try to have a stable version that includes important features and bug fixes before we increase the deployment target.
But at some point we'll have to make a cut to be able to use new frameworks that facilitate development. After all the iPhone 6 has been released more than 7 years ago.
@Cossey we would definitely try to have a stable version that includes important features and bug fixes before we increase the deployment target.
But at some point we'll have to make a cut to be able to use new frameworks that facilitate development. After all the iPhone 6 has been released more than 7 years ago.
I couldn't agree more. At some time we need to make a clear cut. We could still release a separate app that stays on target iOS 11 and continues to support OH 1.x However, as most users are on OH 3 and 2 and can upgrade to the latest iOS, the standard app should stay up to date with technology. We carry around so much legacy in the app. This slows down development and requires effort we cannot provide in a hobby project.
Of course that would be a better approach. The view shouldn't store the widget at all imho.
Yes, this is a design flaw. To be addressed swiftly.
https://user-images.githubusercontent.com/73140050/153727617-4c3acc16-3d58-4191-9426-8b6e343835dc.MOV
I‘m having the same issue. In the video I’m moving „Dimmer rechts“ and the other sliders start moving by the themselves after the update. In addition the names of the sliders keep switching by themselves. Got this issue since the last update. I‘m using App Version 2.4.41( IPhone 13 Pro with IOS 15.3) and OpenHAB 2.5.
@a-umar : please try to switch real-time sliders off. This could lessen the problem.
@a-umar : please try to switch real-time sliders off. This could lessen the problem.
@timbms Thanks for your reply. I already tried it. But the problem stays the same my case :(
@weakfl any idea for a quick fix ?
@timbms I'll try to look into this at the weekend…
With the new app update the issue is still there. Any updates on this issue? It’s pretty unusable for me right now :(
Same Problem here,
i activated and deactivated lifetime-sliders ….it seems to work……but after restarting the app, I done it again…..so every restart : lifetime sliders Active=Deactive…….stay in touch
Yeah, same here. Frustrating when turning down the living rooms light, the kids room light up...
@timbms Have you any updates on this issues? Best regards!
@weakfl : I deactivated real-time sliders to get over the problem - at least I was able to interact with the demo site. Maybe you can release on TestFlight for others to test.
Issue is still there in 2.4.56. If i replace function body of displayWidget in SlideUITableViewCell so that there is only
customTextLabel?.text = widget.labelText
in it (nothing else) and then changing the slider value. While changing the value and after the change some crazy reordering within the sliders occure. I try to debug but i'm not so deep into ios development. Maybe some of the developers of the ios app can have a look.