OH3 IPCamera Stream via Cloud

  • Platform information:
    • Hardware: x86/ Core2 Duo / 4G
    • OS:CentOS 7
    • Java Runtime Environment: Zulu Java 11
    • openHAB version:3.3
    • ISP Bandwidth: 500Mbps (Fiber)
      Issue: IP Camera Stream will not render via OpenHab Cloud

I have a pair of Amcrest / Dahua IP Cameras bound to my server; when I open an OH3 page containing a single WebFrame Card for the MJPEG stream on the same subnet, I can see the video stream. However, when I try to open same page via myopenhab.org, I get a blank block; it’s as if the myopenhab.org connector is not proxying the video.

My server is running at 192.168.90.114; my cameras are on the network at .119 and .138 respectively. Suggestions are greatly welcome.

One page that shows video stream while on network but not from cloud:

config:
  label: backporch_view
  layoutType: fixed
  fixedType: canvas
  gridEnable: true
  screenWidth: 705
  screenHeight: 522
blocks: []
masonry: []
grid: []
canvas:
  - component: oh-canvas-layer
    config: {}
    slots:
      default:
        - component: oh-canvas-item
          config:
            x: 0
            y: 0
            h: 522
            w: 704
          slots:
            default:
              - component: oh-webframe-card
                config:
                  title: backporch video
                  src: http://192.168.90.114:8080/ipcamera/e527269573/ipcamera.mjpeg
                  height: 500

myopenhab only forwards HTTP traffic from your openHAB instance on 8080 (or whatever port you have it on). In the example above you are telling the web browser to frame specifically 192.168.90.114, and not a URL relative to the page, which it won’t be able to connect to outside your network. You can try using a relative link style, so just /ipcamera/e527269573/ipcamera.mjpeg and the browser may then resolve the host you have entered in the URL bar in your browser.

Also note that there is a video widget that might be better suited for ipcamera streams.

1 Like

got it working; too bad the widgets don’t handle that relative addressing automatically