Image not showing up in /etc/openhab/html

I am already trying for a few days to add a simple image to the floorplan.
When i read the readme file it should be really easy .Still it does not work.

When i use a external url with the same image on a server it show up.

When i use the following it does not show up.

/static/woonkamer.jpg
http://localhost:8080/static/woonkamer/jpg
/woonkamer.jpg

I used the same image on a external server and then it works, looks like a permission issue but the permissions are ok.

see permissions:

-rwxr-xr-x 1 openhab openhab 91122 sep 20 19:28 beganegrond.jpg
drwxrwxr-x 2 openhab openhab 4096 sep 20 22:36 house
-rw-r–r-- 1 openhab openhab 451 jun 27 08:19 index.html
-rw-r–r-- 1 openhab openhab 282 jun 27 08:19 readme.txt
-rwxr-xr-x 1 openhab openhab 100592 sep 20 19:29 verdieping.jpg
-rwxr-xr-x 1 openhab openhab 57530 sep 20 22:45 woonkamer.jpg
-rwxrwxrwx 1 openhab openhab 57530 sep 20 22:56 woonkamer.png

When i try this url

http://localhost:8080/woonkamer.jpg
I only see a tiny block

Already installed openhab3 3x times and still the same issue.

Get 's me crazy, should be so easy

any thoughts ?

Welcome to the forums.

In the floorplan image url field try just:

static/woonkamer.jpg

with no leading /

where do you use the url like ?
In case you use localhost your browser needs to run on the OH machine.
In case you use your browser on your local computer and OH does not run on that machine you need to use the OH IP or OH host’s name in the URL.

Hi,

static/woonkamer.jpg does not work as well. :frowning:

pages → floorplan and then image url

I already tried it with the IP adress and the hostname, no result.
It is a virtual machine running on ubuntu with openhab 3.3.0 in the same network.

still this when i try it in a browser

HTTP ERROR 404 Not Found

URI: /static/woonkamer.jpg
STATUS: 404
MESSAGE: Not Found
SERVLET: /:app

Can you access any of these other files using /static/filename?

Is this, in fact, the contents of the $OH_CONF/html directory?

total 44
drwxr-xr-x 3 openhab openhab 4096 sep 21 17:19 html
drwxr-xr-x 3 openhab openhab 4096 sep 19 19:08 icons
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 items
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 persistence
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 rules
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 scripts
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 services
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 sitemaps
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 sounds
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 things
drwxr-xr-x 2 openhab openhab 4096 sep 19 19:08 transform
aydin@aydin-virtual-machine:/etc/openhab/html$ ls -l /etc/openhab/html
total 324
-rwxr-xr-x 1 openhab openhab 91122 sep 20 19:28 beganegrond.jpg
drwxrwxr-x 2 openhab openhab 4096 sep 20 22:36 house
-rw-r–r-- 1 openhab openhab 451 jun 27 08:19 index.html
-rw-r–r-- 1 openhab openhab 282 jun 27 08:19 readme.txt
-rwxr-xr-x 1 openhab openhab 100592 sep 20 19:29 verdieping.jpg
-rwxr-xr-x 1 openhab openhab 57530 sep 20 22:45 woonkamer.jpg
-rwxrwxrwx 1 openhab openhab 57530 sep 20 22:56 woonkamer.png

None of the files are accesible from the browser.
Only from a remote server. I tried many images

i don;t have the /conf folder anymore. see above

Justins question about

is refering to if the variable $OH_CONF ( I think it should be $OPENHAB_CONF ) is pointing to /etc/openhab . If yes it should show the content of /etc/openhab/html but if it is pointing to a different directory it may explain why the files are not shown and the browser returns 404.

To check this log in to the openhab karaf console and enter

env |grep "openhab\."

This should return something like ( this is based on a pi installation ) :

String          openhab.conf    /etc/openhab
String          openhab.home    /usr/share/openhab
String          openhab.logdir  /var/log/openhab
String          openhab.runtime /usr/share/openhab/runtime
String          openhab.servicecfg /usr/share/openhab/runtime/services.cfg
String          openhab.userdata /var/lib/openhab

this
env |grep “openhab.”
does not returen anything

It is installed on ubuntu, everything works except the images

openhab-cli info returns

Version: 3.3.0 (Build)

User: root (Active Process 2657)
User Groups: root

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab | openhab:openhab
OPENHAB_CONF | /etc/openhab | openhab:openhab
OPENHAB_LOGDIR | /var/log/openhab | openhab:openhab

URLs: http://192.168.1.61:8080
https://192.168.1.61:8443

Are there any errors in your browser console when OH tries to access the image?

none

while your output shows

mine shows that the process runs with openhab privileges:

User:        openhab (Active Process 920)
User Groups: openhab tty dialout audio bluetooth gpio

Ok, that is weird , i Will check if i can change that

That is not possible to change. I will try a new installation again

Installed openhabian on raspberry and no issues.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.