UI5 - Changing the Sensor icon to display a Window instead

For those of you interested, (I know that some people had been asking that same question for a long time, not sure if I ever found and easy/clear answer) so there it is; Thru some struggle, I managed to change a device icon to make it a “window” (instead of a “door”)

I know some people frown upon “hacking” the standard files, and maybe most of you find this easy to do, but I assume that some other people (like me) are not so versed with XML & JSON etc… so it’s worth a post. I am extremely “beginner” and I am not sure if I did this the best possible way, but it seems to work fine. Those of you out there who understand all this better, feel free to tell us what is dangerous about what I did (if any), or tell us if it could have been done in a better way.

And for those of you who want to try my “Window” icons, there are 6 files that I attached to this post. To install them, what I did was to upload the 2 XML files and the JSON file via the standard UI5 menu (APPS → Develop Apps → Luup files) I think I probably selected the option “Restart Luup after upload” before pressing the GO button, but I don’t remember for sure.

Also, I wasn’t sure if I could use the same way to upload the 3 PNG files, so I instead SCP’ed into my unit as Root (I downloaded WinSCP for that) and I manually copied the 3 icons into the directory /www/cmh/skins/default/icons

Finally, back in the UI5, I went in the Advanced Tab of my window sensor, and I changed the [device_file] to D_WindowSensor1.xml, and it seems that this did the trick.

Good luck
Enjoy
Claude