[SOLVED] Dynamic Icons not working for me with custom icons and contacts

  • Platform information:
    • openHAB version: 2.4
  • Issue of the topic: Dynamic icons not working in some cases

OK, i use dynamic items in multiple places … so one example is my windows… there it works like a charm

Group:Contact:OR(OPEN,CLOSED) G_Contacts      "Fenster [MAP(de.map):%s]"         <fts_window_m1w>

Contact ContactState_Window_Sport   "Fenster Sport Rechts"   <fts_window_m1w>   (G_Contacts,G_Sport)     {channel="avmfritz:HAN_FUN_CONTACT:main:Window_Sport_R:contact_state"}
Frame label="Fenster" 							visibility=[G_Contacts==OPEN] {
		Group item=G_Contacts 						visibility=[G_Contacts==OPEN] {
			Text item=ContactState_Window_Sport     visibility=[ContactState_Window_Sport==OPEN]
		}
	}	

icons are called : fts_window_m1w-open.png , fts_window_m1w-closed.png, fts_window_m1w.png in case no state is valid

Now i use the exact same approch for my locks on the temperature regulators…

Group:Contact:OR(OPEN,CLOSED)   G_Temperature_Lock         "Bediensperre [MAP(lck.map):%s]"            <secur_my>            (G_Heating)

Contact                         DeviceLocked_Alex          "Bediensperre Büro Alex [MAP(lck.map):%s]"  <secur_my>              (G_Temperature_Lock)    {channel="avmfritz:FRITZ_DECT_301:main:Heat_Alex:device_locked"}
Frame label="Bediensperre" visibility=[G_Temperature_Lock==OPEN] {

Group item=G_Temperature_Lock visibility=[G_Temperature_Lock==OPEN] {
Default item=DeviceLocked_Alex visibility=[DeviceLocked_Alex==OPEN]
}
}

icons named secur_my-open.png, and secur_my-closed.png and secur_my.png for fail / no state

on any state here the secur_my.png is shown, not changing for open or closed states … the visibility works fine, just not the icons, btw, i tried to just for testing remove the whole mapping stuff in case something goes wrong here, didnt help. also with the windows the maps and icons are working

can someone see whats wrong ?

Nope should work, did you restart OH after making these changes?

nope, i didnt restart, but now i checked and it works … sometimes its smarter to let it go, just wait a few hours and then check again …

was looking for an error for almost an hour and now it works without a change … whatever it was, at least now it works as intended and i can confirm, i am not too dumb :wink:

thx

1 Like

I am actually having the same issue on OH2.4 and I’m afraid it still not working for me, even after a full reboot of OH (running openhabian on an RPi 3B+).
Using custom icon set for a leak sensor. I have 3 files seven under the icons/classic folder:

  • selfwater.png
  • selfwater-open.png
  • selfwater-closed.png

All 3 worked just fine for me with OH 2.3 with the same items.
Anyone…!?

Just as an update, I did that if I go to Configure on: PaperUI -> Configuration -> Services -> UI -> Basic UI, and change the “Icon format” from “vector” to “bitmap”, it will show the icons in the browser. However, no such luck with the iOS app UI. The icons will still not show up there.
Bug…!?

There’s a similar vector/bimap setting for ClassicUI. I don’t know if either relates to IoS app, but it’d be worth trying that too.

I have to say, I honestly believed your suggestion would BS… but it seems like the iOS app takes it’s configuration from the classic UI…! :flushed:

I did not have classic UI installed, so, installed it and changed the icon format to bitmap as well from vector and lo and behold… iOS icons now appear as well…!!!

I am interested though, why this change all of a sudden to manually configure something that worked without any issues up to 2.3. Devs!?

I’m surprised too :slight_smile:
but I did wonder if IoS app was using some method to get icons dating from OH1

Didn’t think about having to install ClassicUI , that’s a big drawback really. Maybe there’s textfile that can be edited to look like Classic=bitmap to avoid the install.

I’m guessing you already found the github issues list, and should make the point that this part of IoS needs modernizing.

@Moshe_Dahan, @rossko57 I can’t remember where I read it, but it’s been mentioned that iOS only works with bitmap.:neutral_face: No mention about needing to have ClassicUI installed but good find none the less.:+1:

@Schelli thanks for editing the title to start with [Solved].:+1: Also, if you would, please click the square box on the post that provided the solution.

Thanks