[SOLVED] OH3 ipcamera binding and external view

Dear All

please help…
I configured some onvif ip cameras with ipcamera binding, added a image card in main UI and configured as item the mjpeg item.
It works fine if I access main ui from home network or via VPN connection, but if I access from myopenhab.org account or with ddns (no-ip) address it doesnn’t show the stream.

What are the right settings to view stream from external network?

thanks in advance form your help

Livio

I just notice that from external network openhab/ipcamera binding always call internal address that obvously can not work from external network…because after some minuts in the image card i see the classic icon for missing image and if I right click on “open image in another tab” menu I see the internal IP.

There is a way to tell to ipcamera binding or to openha to find try alternative link?

You can use the video item in a sitemap but use autofps.mjpeg when doing that to keep server loads low and don’t leave it open.

Webview does not resolve.

Best to look at setting up one of the methods of connecting directly if you want high frame rate video. Example would be wireguard, openVPN or other methods. By doing this you also get full use of the mainUI features like you are still at home.

Dear Matt

Video item is not compatible with mjpeg strram

I solved using the url of 8mage card, assigning it as myaddressddns.net:port/ipcamera.mjpeg and forwarding port from router to openhab ip

It works from external and also from internal network…even if it seems a little bit stupid to go out and return back inside when in internal network

1 Like

Not correct

Also port forwarding to the outside world is not safe against hackers.

Continuing the discussion from [SOLVED] OH3 ipcamera binding and external view:

Dear Matt,

I am sorry for asking. Could you elaborate a bit more with perhaps an example?. I having the same issue with an ESP32 cam.

The code I am using is:

THING:

Thing ipcamera:generic:Esp32Cam
[
ipAddress=“192.168.0.96”,
gifPreroll=1,
snapshotUrl=“http://192.168.0.96/capture”,
mjpegUrl=“http://192.168.0.96:81/stream”,
ffmpegInputOptions="-f mjpeg",
ffmpegOutput="/tmp/Esp32Camera/", ffmpegInput=“http://192.168.0.96:81/stream
]

SITEMAP:

Frame label=“ESP32 Garae1 Cam”
{
Webview url=“http://192.168.0.102:8080/static/esp32camera.html” height=5 icon=none
}

NOTE:
192.168.0.102 is ip of the Raspberry PI running OH3.
and 192.168.0.96 is ip of ESP32 cam.

it ONLY works while using the internal house - network. But it does not work from external network (away from home) with the same error as you described above.

Thanks in advaced for any help.