Openhab Sitemap Pictures publish OH-Cloud

Hi,

I am running OH v2 on a Windows Host. Everything is working. I have changed my camera control. So these are now collected from a surveillance software and I can show them on a good and fast way via item URL in the sitemap.

This is only possible if I am accessing the OH sitemap internally. Externally without VPN the images will not showed in this way. If I change the IP from the local surveillance station to the local IPs of the cameras directly I can see them also via internet in the sitemap.

The question is now if there is an easy way to store the image (maybe every second) in an item and publish this item aswell so that I can have access to it also from outside?

Thanks

Using what widget? can we see?

Image sitemap widget has a baby proxy and refresh functions.

Its just a frame with the image in it:
image

Do you mean this?

Yep. Here’s one of mine that I can see from off-site. (OH2.5 on Win)

Image label="Yard Cam10" url="http://192.168.1.50:80/mobile/channel10.jpg" refresh=16500

and it updates by refresh.

What does one of those look like? I’m reading this as meaning “It works fine except for this URL (the station)”.

Hi,

if I use this link:

Image url="http://192.168.0.85/action/snap?cam=0&user=<user>&pwd=<password>" refresh=1000

I can see the picture also from outside! This is also an internal IP from my home network. If I switch to this line:

Image url="http://192.168.0.165:8090/grab.jpg?oid=1&size=1280x720" refresh=1000

It shows nothing from outside. The difference in the IP address is, that the 0.85 points directly to the camera. The 0.165 is the device where Openhab is running on (localhost).

I have changed to your suggestion:

Image label="Test" url="http://192.168.0.165:8090/grab.jpg?oid=1&size=1280x720" refresh=16500

But still no picture from outside. But its nearly the same I have already…

And there is a port number involved. That shouldn’t make any difference, of course. In both cases the viewer should be trying to fetch an image from a proxy servlet in openHAB using a URL something like
http://youropenhab:8080/proxy?sitemap=default.sitemap&widgetId=01020000&t=1633686921137
and the URL you put in your widget completely hidden.

What do yours look like? (inspect at the browser)

this is the link for the URL which is reachable from outside:

http://192.168.0.165:8080/proxy?sitemap=house.sitemap&widgetId=03020000&t=1642163846691

And this one is not reachable from outside:

http://192.168.0.165:8080/proxy?sitemap=house.sitemap&widgetId=03020001&t=1642163955682

So its nearly the “same”…

Well, in reality both those links are surely ‘reachable’ but you don’t get the return picture you expect. What do you get when pasting hem directly in browser address bar? It’s going to be one of those silly things like jpg/jpeg difference. The images have been supplied from different sources.

If that really means the station image widget works on local internet, then the proxy servlet is happy with it. What is different remotely? The browser that you are using, or the content allowed to pass through a firewall or reverse proxy?

I am accessing with the OpenHAB App from iOS. In this app the local IP and the OpenHAB credentials are inserted.
If the local one is not reachable the app changes to the myopenhab access. Every item, widget and so on is working with this way except these camera pictures!

Is there maybe another option with a rule or something like this that I can store the current image in an item?

Anyone has another idea what I can check? I have still the error that the pictures only shows up if I am using the webcam IP adresses instead of the IP adress of the OH system where my iSpy is also running.

In local network everything is working absolut fine and with speed. I am now thinking about to implement a rule which saves the pictures every second in a local jpg file which is stored on the OH server but I think that this can be a problem with the OH performance if the rule is triggered every second isn’t it?

So, did another test: have installed my surveillance system on another device than the OH system itself to ensure that not this is the issue.
Also in the local network everything is working but outside the image still not showing. So this is not the issue…

today I did another investigation and checked the URLs. There is a port specified in the URL which is not working from outside:

not working: https://home.myopenhab.org:443/proxy?sitemap\u003dhouse\u0026widgetId\u003d03020000

working: https://home.myopenhab.org/proxy?sitemap\u003dhouse\u0026widgetId\u003d0302030200

The link is nearly the same except the port. Is there something I can change for test if this results in this issue?

https in the URL means port 443 is being used.

Yes I know…but this is the only difference in this two links. The link with https where the port is dedicated specified at the end is not working. The other link is working because I can see the picture from outside my homework without issues.

Or is there anything else I can check or configure so that this is working?

why don’t you use then the URL without the port ?

that is the question…I have no idea how…the both URL are read out through the developer tools in my browser when I am accessing my basic ui sitemap. This is the only differense I see in the both pictures, that one is not working but the other one is working.
I have no idea why “:443” is part of the one link which is not workin and I don’t know how to prevent this!?

Both URLs are part of your sitemap right ?
Can you post the sitemap code in code fences - not as screenshot ?

Sure, this is the internal code from my sitemap:

This is not working:

Frame label="Live Bild Terrasse" {
Image url="http://192.168.0.166:8090/grab.jpg?oid=3&size=1280x720" refresh=1000
}

And these both URLs from other cameras are working:

Frame label="Live Bild Haustür" {
Image url="http://192.168.0.85/action/snap?cam=0&user=user&pwd=pw" refresh=1000
}
Frame label="Live Bild Gartenhaus" {
Image url="http://192.168.0.140/cgi-bin/api.cgicmd=Snap&channel=0&rs=Test&user=user&password=pw" refresh=1000
}

If I am internally at my home network everything is fine. If I disable my WiFi on my phone and connect over myopenhab its not showing the picture anymore!

this is valid for the one URL that is not working, correct ? The two others are ok ?