Foscam fi9901ep Video Stream does not appear in Basic UI

  • Platform information:
    • RPi3+ and FOSCAM FI9901EP
    • Raspbian 10 (buster)
    • openjdk version “1.8.0_222”
    • openHAB version 2.4.0-1
    • IP Camera addon:
  • Issue: The video stream doesn’t appear in my Basic UI.
    All in PaperUI, I created:
  • Binding: “IpCamera” by Matthew Skinner
  • Thing: ““FOSCAM” IP camera with ONVIF and API support.”
  • Channels: Since this is a fixed camera, I created only the seemingly relevant channels for such a camera: ZOOM, MJPEG URL, RTSP URL, Image URL

I configured the basic UI sitemap in many different ways, which all don’t work. Cf. Sitemap file below.
The first of the 4 frames has the configuration that seems the closest to what it should be, I think. But it doesn’t yet show the video in the panel:

  • On my Windows PC, in Firefox, when I open the Basic UI, a popup windows asks me which program to use to show the url. When I specify VLC, then I get the stream into VLC. Not in the basic UI frame.
  • In the OpenHab Android client, the frame mentions “Cannot GET /rtsp://…/videoMain”

If I change the word “Webview” to “Video” in the first frame, then Firefox on Windows displays a Video rectangle in which the message “No video with supported format and MIME-type found.”

There appear no errors in /var/log/openhab2, when I open the basicUI.

How should I try to solve this problem?
Thanks in advance.

sitemap Thuis label=KlepAutomatisatie
Frame label=“KlepCamera”
Webview item=KlepCamera url=“rtsp://<my_uid>:<my_pwd>@<camera_ip>:88/videoMain”
Frame label=“KlepCamera 2” icon=“camera”
Video item=KlepCamera url=“http://<camera_ip>:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=<my_uid>&pwd=<my_pwd>”
Frame label=“KlepCamera 3” icon=“camera”
Video url=“rtsp://<my_uid>:<my_pwd>@<camera_ip>:88/videoMain” encoding=“mjpeg”
Frame label=“KlepCamera 4” icon=“camera”
Webview item=KlepCamera url=“https://<camera_ip>:443/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=<my_uid>&pwd=<my_pwd>”

This works for me:

Video url="" encoding="mjpeg"

And please use code fences: grafik

Thank you.
To translate your url to my config, I take it, I must change the port number to my camera’s port, being 88.
So I now tried Video url="http://<ip address>:88" encoding="mjpeg"
The result is that on Firefox-Windows, there is a small icon with a broken image object.
On the OpenHab client interface, nothing is displayed in the frame.
I already tried all the variations I can think of, including your suggestion. Nothing has worked. I think what I need is a way to find out what is going wrong…

Get the video working in a normal browser first and then try openhab second. The readme file for the ipcamera binding has a link you need to call on foscam cameras before they will allow mjpeg streams. Found under setup instructions for foscam.

Thanks for the pointer. So I think I found what you referred to:

  1. To ensure that the camera’s 2nd stream, named “SubStream”, is configured to send an mjpeg video stream:


  1. To get the video stream into a web browser:


I see I must first resolve the issues at the level of the camera before working at the OpenHab integration. The camera is proving difficult though.
When calling the first command, setSubStreamFormat, with format=0, (H.264), the result is success:


When calling the same command with format=1, (mjpeg), the result is an error in firefox and MS Edge: Return value -3. (undocumented).
This same command with the same format value of 1, results in success (0) in firefox on an Android phone.
I don’t see a possible explanation for these outcomes.

The second command, GetMJStream, doesn’t work in any of the browsers. The message is

The connection was reset while the page was loading.