Rollershutter Dynamic Icons only partially working

  • Platform information:
    • Hardware: RPI4
    • OS: openhabian
    • openHAB version: 2.5.2

Issue:
I have rollershutters within my system. I am using Slider and/ or Switch elements to control them.

Example Item:

Rollershutter   DG_Atelier_Rollershutter_p "" <none> (DG_Atelier, gShutter, gShutterP {channel="freeathome:raffstore:8cc0094d:percentage"}

Example in Sitemap:

Slider item=DG_Atelier_Rollershutter_p label="Atelier (Garage)" icon="rollo"

Icons in icons/classic:

Screen Shot 2020-05-05 at 10.16.18

From openhab-cli console

openhab> items list | grep gShutterP
EG_LivingRoom_Rollershutter_TL_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[EG_LivingsRoom, gShutter, gShutterP])
DG_Bedroom_Rollershutter_Right_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[DG_Bedroom, gShutter, gShutterP])
OG_Kinderspielzimmer_Rollershutter_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[OG_Kinderspielzimmer, gShutter, gShutterP])
DG_Atelier_Rollershutter_Terasse_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[DG_Atelier, gShutter, gShutterP])
OG_Kinderschlafzimmer_Rollershutter_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[OG_Kinderschlafzimmer, gShutter, gShutterP])
gShutterP (Type=GroupItem, BaseType=NumberItem, Members=14, State=0.96428571, Label=Rollo State, Category=null)
OG_Arbeitszimmer_Rollershutter_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[OG_Arbeitszimmer, gShutter, gShutterP])
DG_Atelier_Rollershutter_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[DG_Atelier, gShutter, gShutterP])
EG_Eating_Rollershutter_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[EG_LivingsRoom, gShutter, gShutterP])
EG_Toilet_Rollershutter_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[EG_Toilet, gShutter, gShutterP])
EG_LivingRoom_Rollershutter_TR_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[EG_LivingsRoom, gShutter, gShutterP])
DG_Bedroom_Rollershutter_Left_p (Type=RollershutterItem, State=50.0, Label=, Category=none, Groups=[DG_Bedroom, gShutter, gShutterP])
OG_Kinderschlafzimmer_Rollershutter_Garage_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[OG_Kinderschlafzimmer, gShutter, gShutterP])
EG_Kitchen_Rollershutter_p (Type=RollershutterItem, State=100, Label=, Category=none, Groups=[EG_Kitchen, gShutter, gShutterP])
OG_Bathroom_Rollershutter_p (Type=RollershutterItem, State=100.0, Label=, Category=none, Groups=[OG_Bathroom, gShutter, gShutterP])

As you can see there are sometimes values = 100.0 and sometimes it’s 100. And that leads to sometimes icons that work and sometimes it’s not working, depending on the number format of the value field, where 100.0 is with correct icon and 100 is w/o correct item.

I also tried using a Slider element with the following extras: minValue=0.0 maxValue=100.0 step=0.5
But also then it defaults to 0 or 100 instead of 0.0 and 100.0 and therefore does not show the right icon.

Any suggestions what I can do to enforce the right numeric value (double)?

Edit: I just checked… in classic UI (web, chrome) it is working fine, my issues seems to be related to the iOS app?

Thanks and best,
David

openHAB icon picker image server shouldn’t care about Item state precision. In your case state=100 or state=100.0 should both return rollo-99.png. And that apparently works for ClassicUI.

Something odd about the way IoS requests icon, then.

Is it only the 100/100.0 case that goes wrong? 100 is the upper bound for numeric dynamic icons. value 101 should return the default rollo.png. You’ve not said exactly what see that is “wrong”. I wonder if a float of 100.0 is returning 100.000001 somewhere.

Thanks for the reply.

It’s unfortunately not only 100. It is always returning rollo.png (default) instead of rollo-0.png, rollo-1.png or rollo-99.png. Only in case I sent the state to 0.0 or 100.0 or 75.0 e.g. in a rule, then it’s done right.

I know that 100.0 and 100 should be treated the same and discovered this strange behaviour by chance when looking at the console output.

Best,
David

Okay, sounds like a bug for numeric icons in iOS app then.