Changing Switch Icon

I thought I’d have a go at changing the icon for a generic switch (Fibaro FBR-223) so it doesn’t appear as a lightbulb icon.

It was actually fairly straightforward - with the caveat that since I hacked the existing BinaryLight1 json file it will probably get reverted on upgrade; however, it probably doesn’t break anything even if that happens, because it should go back to looking like a bulb.

Full disclosure - I’ve had this working for all of 24 hours…


0. Do a backup !

  1. Make sure your device is category 3, sub-category 0.

  2. In Apps - Develop apps - Luup files : download and save D_BinaryLight1.json

  3. Edit that file to change the first two img values (associated with subcategory_num = 0) to the name of your images (in my case binary_switch_off.png and binary_switch_on.png)

  4. Upload the file to replace the original

Now upload the necessary images - my examples are attached, they need to be PNG, 60x60, with appropriate transparency etc I guess to look OK.

  1. Use SCP (e.g. WinSCP) connect to the Vera using the normal root login

  2. Drop the two PNG images into /www/cmh/skins/default/img/devices/device_states

Restart Luup, hard-refresh the browser, and it should work.

For things which actually are lights, use sub-category 1 or 2.

Annoyingly, the implementation on mobile apps seems to be random - iOS shows sub-categories 0 and 2 as remote-control switches, whereas Windows shows them as a bulb and a generic device. This change makes no difference.

New discovery - it doesn’t work when going through the Vera “relay”.

Which means the “relay” is not a relay at all but must be (pointlessly) implementing some of the Mios functionality >:(

Yes… I am having the same problem. See my post below: “Symbols used for units”

[quote=“rge, post:2, topic:195415”]New discovery - it doesn’t work when going through the Vera “relay”.

Which means the “relay” is not a relay at all but must be (pointlessly) implementing some of the Mios functionality >:([/quote]
There has been a lot of discussion on changing icons in the forums. See,12368.msg93074.html

There was also some discussion of this particular issue, but I can’t find it right now. I think amg0 had some thoughts on a clever way to work around the Mios servers to get icons from your unit if you used the AltUI. You could try using Google to search for it.

Thanks for the link - since that was last updated in 2015 it looks like this is a dead feature request.

In the meantime I’ve found that using category 27 (“appliance”) seems to give better default icons (i.e. a generic Z-Wave one); I also improved the icons a bit.

Look at this link for some good information:

Looks like AltUI does fix this and you can see some attempts at other workarounds.

Thanks - I tried AltUI but don’t really like it. UI7 has absurd amounts of white space and poor screen usage, lack of configurability, and the performance is poor, but I still prefer the design and simplicity compared to AltUI.

The remote access thing doesn’t bother me much anyway - I use my own proxy by preference, so the icons do work - it was more for info of anyone else using this.

But having proper icon support so they also appear on iOS or other mobile apps would surely be a sensible feature. Even if it was a limited but much larger choice of icons it would be a big improvement.

As it is I’m seriously thinking about moving to something like RaZberry - I didn’t go that way because I wanted a simple out of the box experience - hah, I should have done my research better :frowning: MCV should really take these forums more seriously, they’re surely the only thing keeping Vera alive.

I have an Raspberry Pi with a UZB stick running openLuup/Z-way/AltUI at a different location than my Vera (UI5). Cudanet has put together some good turn key images for this, but I created my own system to learn about it. It would have been very difficult to have started directly with it because so much is taken from the Vera that you need it as a base. And in fact you need the Vera to get some of the plugins to get them over to openLuup. Others have hybrid systems with both openLuup and the Vera co-located. openLuup and AltUI appear to be more stable and features and bugs are quickly acted upon. But you also have the Z-way stack in there too which is pretty good, but adds another layer of complexity. Once you let your mind wander you can start contemplating Homeseer or OpenHAB too.