I’m running OH3 (openhabian 1.6) on RPi4.
When creating a floorplan, I’d like to use custom icons for various markers.
I have successfully tried icons from openhab: and f7: sets; however, custom icons do not work for me.
I’ve uploaded my icons to $conf/icons/classic folder as both png and svg.
Let’s say I have an icon: $conf/icons/classic/myicon.svg. Then I create a marker:
you could add two version of the icon, one green and one Grey and name them:
myicon-on.svg myicon-off.svg and a default/stateless version called myicon.svg
@rlkoshak do you suggest that I should prepend also custom icons with oh: prefix, as in oh:myicon ?
I’ve tried that just now and sadly, it didn’t help.
I’ve used myicon, oh:myicon and openhab:myicon respectively and neither one succeeded.
However, http://openhab-host:8080/icon/myicon renders just fine.
Yes, I would expect that custom icons would need oh prefix.
It might be the case that custom OH icons are not supported in Pages. I’ve not tried to use them. But if they are supported, they would almost certainly need to have the oh:prefix.
I see. Nevertheless, the oh:myicon (in my case it is oh:lght) works not.
For the record, i have lght, lght-on and lght-off present both in png and svg and, as I wrote previously, they are readable and recognized when addressed directly. Just in Pages, namely floorplan, they do not appear.
I assume, that won’t help you, as I did nothing special here. But the system can’t find your icon, as you can see in the Markers overview (it should show up there)
If you inspect the element where your icon should be, what path is shown?
Funny thing is that http://192.168.2.3:8080/icon/lght (that’s my openhabian host IP) resolves to the icon, i.e. I see the icon image rendered.
But: when trying to access http://192.168.2.3:8080/icon/lght?format=svg&anyFormat=true, nothing shows up.
It looks like there is some problem with the svg version of the icon.
I’ll try to recreate it and will get back here soon.
Turns out the problem was within the files I used.
I have successfully created a new icon with Inkscape (svg) and converted it to png via Photoshop.
With these new icons, everything works as expected.
However, this thread has not been pointless, as I discovered only here that even custom icons should be prefixed with oh:.
@RGroll, @rlkoshak, thank you very much for your assistance, you’ve lead me in the correct direction.
I created some icons on boxy-svg.com, and these did not show up. What I did wrong is making them too small and not using the whole canvas. This is vector stuff, so the canvas is the limit.
Additionally, the filenames need to be small letters only.