How to add background image to openHAB panel?


(Rohit Patil) #1

Please give step by step instructions on setting up a background image for HABpanel.
Writing URL into given setting is not working.
I saved my image manually in etc/openhab2/html and tried to access it “http://myPiaddress:8080/static/home.jpg” , even this didn’t work.
I have no idea how to work with CSS and where to save that file .
Please help

Regards


(Becksen) #2

I have the same issue.

Does anybody has suggestion?

Thanks.


(Yannick Schaus) #3

try a server relative URL i.e. /static/home.jpg (without the protocol, host and port).


(Becksen) #4

Hi ysc,

I found a solution https://community.openhab.org/t/display-local-images/2592/9

Copy the files to conf/icons/classic and address them via the following URL:
url="http://serverip:8080/icon/filename.png"

Works fine for me. Important the spelling of the url path. “icon” is correct although you store it on /icons/classic on the filesystem.

Best regards.


(Craig Bennett) #5

… and the resource in \conf\html

where to put the file is what hung me up for a few moments


(jamac) #6

I’m new to OH2 and am struggling with this too. I’m running OH2 on an Openhabian RPi 3 B+ with Habpanel on an iPad as my front end.

My problem is that i can’t seem to load a background image via Habpanel’s settings page. I suspect I’m not specifying the image path correctly.

I’ve placed the jpg image in openHab-conf/icons/classic but can’t seem display it in Habpanel.

I’ve tried:
http://[ipaddress]:8080/openHAB-conf/icons/classic/image.jpg
http://[ipaddress]/openHAB-conf/icons/classic/image.jpg
/openHAB-conf/icons/classic/image.jpg
/icons/classic/image.jpg

What am i doing wrong???


(jamac) #7

Ok. So after a lot of trial and error the following worked for me.

Place the jpg in http://[ipaddress]/openHAB-conf/html

In Habpanel’s panel settings page, set the ‘background image’ setting to /static/image.jpg