Not able to use OH-Slider anymore after upgrade to OH4

I upgraded from 3.4.2 to 4.0.2 on my Raspberry pi4 couple of days ago. Since then i’m having an issue with the OH-Slider component in the Main UI. It’s working strange but not usable. Sometimes the light goes on on full brightness after using the slider, other times the slider is giving %NAN% and isn’t movable. Other times the slider does slide but the light doesn’t change.

I couldn’t find anything on the forum so i’m creating this new topic as I think the problem is within my configuration because this is a widely used component and someone must have noticed if this is a bug.

For clearance, my lights do work with my rules. I almost never adjust the light because of a Scene system I build. But for the Scenes to be adjusted, i need those OH-Slider items (or could do it in the Hue app, but that’s not a sollution :slight_smile: ) Also in the Basic UI everthing works normally, I can adjust my lights with the (completely different) Slider component.

I tested it with one of my Hue lights:
Dimmer Dressoir "Dressoir lamp" <light> (lgWoonkamer,gWoonkamer_scene) { channel="hue:0100:001788ac5c8f:hue_dressoir:brightness", ga="Light" }

and tested it with just a dimmer item:

Dimmer TestDimmer "TestDimmer"

For both it’s a different situation. For the TestDimmer item, I can set all values except for 0% and 100%. The TestDimmer item just doesn’t receive the 0% and 100% values.

For the Hue light it’s even more strange. It’s just random what values it accepts, sometimes the light goes on, other times it doesn’t react. But it’s never possible to set it to 0%. In the developer mode the OH-Slider item becomes %NAN% after reloading the browser window, but the widget never does this in a normal page. Mostly when the light goes on, it isn’t able to adjust anymore, the Item does not receive the sliding values anymore after that.

This is a part of my test widget:

                      - component: oh-list-item
                          title: Test Slider
                            - component: oh-slider
                                color: white
                                item: Dressoir
                                label: true
                                noborder: false
                                noshadow: false
                                outline: true
                                releaseOnly: true
                                scale: false
                                step: "1"
                                  --f7-range-bar-active-bg-color: '=vars.type != true ? "linear-gradient(to left,#fbf1b8 0%,#fcbc36 50%,#000000 100%)" : "linear-gradient(to left,#ec9b00 0%, #9de9fc 100%)"'
                                  --f7-range-bar-bg-color: black
                                  --f7-range-bar-border-radius: 10px
                                  --f7-range-bar-size: 8px
                                  --f7-range-knob-box-shadow: 0 0px 0px rgba(60, 50, 0, 0.9)
                                  --f7-range-knob-color: "#CCCCCC"
                                  --f7-range-knob-size: 18px
                                  --f7-range-label-text-color: black
                                  color: white
                                  margin-left: 30px
                                  margin-top: 0px
                                  width: 200px
                                unit: "%"
                                vertical: false
                                visible: true

I found the issue. I read this afternoon on the forum restoring backups could be causing problems. I restored a backup from 3.4.2 and that is causing this problem. I installed a new raspberry pi with OH4 and the problem is gone with only restoring the openHAB-conf directory.

So I will install 3.4.2 again (openhabian 1.8), restore the backup and upgrade to 4.0.2

So it was my fault the oh-sliders didn’t work correctly.

Ok I’m lost with this one. The problem is back and I really don’t know how to solve it.

A little history on this.

At first I installed openhabian with openhab 4.0 on my Raspberry pi 4. I reverted my backup (openhab-cli backup --full) after installing. After that everythink works, rules, main ui, influx, etc. Except for the slider widget.

So I tested this with another raspberry pi, clean install, no restoring the backup and the problem is gone.

I started with a clean install again. Installed openhabian 1.8 with the boot option to install 3.4.5 with java 11. I reverted the backup from 3.4.2 and this has run for about a week now without any problems.

So today I thought, what could go wrong, I will upgrade openhab. So I backuped everything, files and full backup via openhab-cli backup --full. Cleaned the cache and started openhabian-config, I chose option 2 > upgrade system. After that I chose option 45 > upgrade java 17.

And the problem is back. I stopped openhab again, cleaned the cache, reboot the raspberry pi, but the problem still exists.

Explanation of the problem with the slider widget:

At first it is at 100% for some of the lights (All the lights are actually 0%), others are 0%. When I first slide to a certain value, the light itself sets at 100% brightness, as seen in the Log file. After that sliding does not do anything anymore except 0% value, the light becomes 0%, after that it just stops reacting, also no log entries while sliding. I can control the light via rules and also via the Sitemaps.

For clearance, it also happens with the default sider widget on an new page.

Does anyone have an idea? I think it’s somewhere in my backup but I don’t know where to look to solve this.

This is strange behavior that I haven’t seen any other reports of.

I wonder if it is related to the new UoM configurations. I don’t believe that the update script can do the UoM adjustments if you are using item files.

Does the problem exist if you create a dimmer item through the UI and adjust that with a slider?

I searched a lot on the forum but also didn’t see anything like this. I just created an item via the UI and also an Item via textual config. But both are changing and showing up in the log.

For now it looks like it’s the lights with the channel to the Things from the Hue or shelly binding, I don’t own anymore dimmable objects.

I just tested to remove the channel from a light in text config, but the item still doesn’t change when sliding the widget. What could i debug to check where things go wrong?

What happens if you change the slider so that it is sending 0 → 1 decimals instead of 0 → 100%.

  min: 0
  max: 1
  step: 0.02

That has the same result.

I tried also other stuff:

  • removing the items file and adding it again > no result

  • removing the channel behind one of the items > no result

  • creating a new item with a hue light as channel > it works as normal!

  • I changed the item with another thing > both those light react as normal, but i created only 1 channel

  • I changed again the item > now i control 3 lights with just 1 slider

Dimmer SuperTest1 "Keukentafel test" { channel="hue:0220:001788ac5c8f:hue_koffiespot:brightness", ga="Light" }

When i check this item in the UI, it has 3 channels bound to it:

After removing the item in the text config, and adding it later on, it has the right channel bound to it.

Do you see the same issues if you use a different browser?

The issues where the same in Edge over Chrome. But the strange thing is, it looks like it’s gone.

Dimmer      Schuifpuirechts             "Schuifpui Spot Rechts"                     <light>                 (lgKeuken,gKeuken_scene)                            { channel="hue:0220:001788ac5c8f:hue_schuifpuirechts:brightness" }

I noticed that this one, never had an issue, didn’t notice it before but this light had the right value all along in the ui. And i could change it to a value and it changed, but I failed to test that one.

Dimmer      Keukentafel1                "Keukentafel lamp 1 [(%d %%)]"              <light>                                                                     { channel="hue:0220:001788ac5c8f:hue_keukentafel1:brightness", ga="Light"  }

This light had the problems, so i removed the [(%d %%)], no result. Removed the , ga=“Light”, no result. Left everything removed, removed the item, added it back again and the light works. I was trying this with more of my lights an suddenly all the lights from one group are reacting normal. I’m still testing if everything is normal and am going to try to replicate this again, but not sure if I can.

When I add an item and remove an item, I always wait until the CPU is at low intensity again, to make sure it’s not because of high system load, something isn’t changing.

[edit] - It looks like, when [(%d %%)] Added to the item, the problem is occuring. After removing, I have to remove the item, add it again, and the problem is gone.

OK, so it is a Unit of Measurement problem as I first thought. It’s not clear why this is impacting a dimmer item. I thought UoM was restricted to Number:[Unit] items.

Now that you’ve narrowed it down it might be worth filing a issue.

1 Like

I’m not entirely sure, but it looks like it. I want to test a bit next week and I will file an issue when I’m sure what causes it.

Thnx for your help! :grin::+1:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.