- Platform information:
- Hardware: Raspi 4, 2 GB RAM, 16 GB SD card
- OS: openhabian (OH3)
- Java Runtime Environment: openjdk version “11.0.11” 2021-04-20 LTS
- openHAB version: 3.1.0 - Release Build
Issue of the topic:
I created a floor plan page. On a Raspi 3 running pi-hole (a webserver is included) I stored a simple index.html and the plan as img0.jpg. The file index.html is
< html>
< img src=“img0.jpg”>
< /html>
(I needed to add a blank between the < and the first character otherwise it is not displayed here. In the file there is no blank.)
When I open on my PC http://192.168.1.107/oh_files the browser (Firefox) shows the floor plan. When I use this URL in the field Image URL openhab does not show the floor plan. Why does my browser resolve the URL and show the image and openhab does not?
I tried to directly address the image and put into the field the URL http://192.168.1.107/oh_files/img0.jpg. Surprisingly the floor plan is now displayed. (Well, you need to adjust width and heigth because OH is using 1000 by default regardless of the pixels of the image)
Here the code without the marker sections (they work fine anyway):
config:
label: House 1st floor
sidebar: true
order: “”
imageUrl: http://192.168.1.107/oh_files/img0.jpg
imageWidth: 1024
imageHeight: 724
In the end I got it working but I thought it is just a workaround. Any thoughts why the index.html does not produce the intended effect?
Günther