IpCamera: New IP Camera Binding

Tags: #<Tag:0x00007f6170701358> #<Tag:0x00007f6170701268> #<Tag:0x00007f6170701178>

I should have time over Christmas break, not sure how it will be handled as I was trying an automated way to select the network with out doing any pings. It may have to be looking in the logs for a list of cards and then entering a number as a config for people that find the auto method to not work. Can you post why there are four cards and how they are setup? It may help to consider your use case when doing this.

Could you add it as a free text box in the thing config much like the stream url override and wait for an adaptor to come up matching this, ie ‘server network address’?

I’m running openhab on a qnap NAS (ts-451), it has 4 adaptors each of which has a local address assigned as follows:
1: - normal lan
2: - smart home lan (openhab here)
3: - cctv
4: - vpn gateway (using qvpn on NAS for certain traffic)

The other trouble is if I was to add a docker image or a vm this creates a virtual adaptor too, which is what the binding chose (, I believe as this was first to have an address as it didn’t have to query dhcp as it’s virtual.

hi all, i’m trying to use the binding with my ipcamera Shenzhen. i think a bluecam remark.
the camera reply to this command that i found in an other forum.
Identifier: BLUECOM.GMT

Default ip_address:

Default user interface credentials: admin/

Default command credentials: admin/admin

nmap -sN -r -n -p-1-65535

(null scan (TCP flag header is 0) , do not randomize, no DNS resolution, all ports)

-O - enable OS detection

nmap port open results:

6554 - tcp (video streams)
8080 - http-proxy
9527 - tcp (command)

On power up the camera first tries to find and then tries to contact: - Beijing Kuancong - amazon.com - USA - amazon.com - Europe

OCX download www.cam158.com

High and low resolution video streams


Command port (use login user and password – configuration and control items)

ip_address:9527/status.htm – Device status
ip_address:9527/ip.htm – Basic Network Settings - Obtain IP from DHCP Server (uncheck for manual), http port: 9527
ip_address:9527/wireless.htm – Wireless LAN - Using Wireless Lan (check) - SSID, Authentication
ip_address:9527/ddns.htm – DDNS Service activation, parameters
ip_address:9527/Onvif.htm – ONVIF Stream settings ‘open’
ip_address:9527/RTSP.htm – RTSP Stream ‘open’ - port 10554 (must be wrong, should be 6554)
ip_address:9527/ptz.htm – PTZ - not available
ip_address:9527/multidev.htm – Multi-Device Settings (accessible from Internet)
ip_address:9527/user.htm – Administrator, Operator, Visitor
ip_address:9527/alias.htm – Alias Settings - IPCAM
ip_address:9527/datetime.htm – Timezone, NTP Server
ip_address:9527/recordpath.htm – Local record path - file length, time, reserved space, cover
ip_address:9527/recordsch.htm – Record schedule SD card format, capacity, recording options, time schedule
ip_address:9527/voice.htm – Voice setting (Mute, English, Chinese)
ip_address:9527/alarm.htm – Motion detect, audio detect, mail notification, upload image, arming time schedule
ip_address:9527/mail.htm – Mail service settings
ip_address:9527/ftp.htm – FTP service settings
ip_address:9527/upgrade.htm – Upgrade Device Firmware, Embedded Web UI (Browse)

param=14&value=0 PIR off
param=14&value=1 PIR on
ip_address:9527/videostream.cgi?loginuse=admin&loginpas=admin -
ip_address:9527/snapshot.cgi?loginuse=admin&loginpas=admin - get jpeg image (704x576)

Get a jpeg image (for motion detection)

curl “” -o test.jpeg

get_status.cgi? -> admin/ - reset


This is my configuration

and this is the openhab’s log… the camera is online but not images, not moving etc…

2019-11-08 10:27:42.701 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:

2019-11-08 10:27:42.733 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:42.739 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:0 GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:42.751 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: failure(java.lang.IllegalArgumentException: a header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f: ,), version: HTTP/1.1)

HTTP/1.1 200 OK

Server: GoaHead

2019-11-08 10:27:42.802 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 URL:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:47.701 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:

2019-11-08 10:27:47.726 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:47.729 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:0 GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:47.739 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: failure(java.lang.IllegalArgumentException: a header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f: ,), version: HTTP/1.1)

HTTP/1.1 200 OK

Server: GoaHead

2019-11-08 10:27:47.791 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 URL:/snapshot.cgi?loginuse=admin&loginpas=admin

==> /var/log/openhab2/events.log <==

2019-11-08 10:27:52.648 [vent.ItemStateChangedEvent] - Azimuth changed from 153.9958881237165 ° to 154.24468189742086 °

2019-11-08 10:27:52.661 [vent.ItemStateChangedEvent] - Elevation changed from 23.964394694529478 ° to 24.04038843790722 °

2019-11-08 10:27:52.670 [vent.ItemStateChangedEvent] - Diffuse_Radiation changed from 105.94218879750758 W/m² to 106.08175261299178 W/m²

2019-11-08 10:27:52.678 [vent.ItemStateChangedEvent] - Total_Radiation changed from 267.8630844990612 W/m² to 269.08593069868414 W/m²

==> /var/log/openhab2/openhab.log <==

2019-11-08 10:27:52.701 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:

2019-11-08 10:27:52.715 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:52.719 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:0 GET:/snapshot.cgi?loginuse=admin&loginpas=admin

2019-11-08 10:27:52.729 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: failure(java.lang.IllegalArgumentException: a header name cannot contain the following prohibited characters: =,;: \t\r\n\v\f: ,), version: HTTP/1.1)

HTTP/1.1 200 OK

Server: GoaHead

2019-11-08 10:27:52.781 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 URL:/snapshot.cgi?loginuse=admin&loginpas=admin

What i’m wrong? Someone could help me?

HIgher Resolution on SnapShot Images

I’ve been running this binding for a few years now; works fantastic! I have the HIKVision system connected to it and I’d like to get better resolution on the SnapShot image item.

My 8 cameras are setup in PaperUI tied through a NVR.

Is this possible? If so, how?

Best, Jay

Hi. I upgraded to the newest version of the binding and created two things that connect to Hikvision cameras. The resolution of the camera picture is 4K, downloaded picture sizes are around 250k each, update interval 4s. The problem is that after a few hours all java heap is consumed and OH stops working. Also, the ongoing load is above 115% of 4-core RPI (while without the IP camera things it is 15%). Something apparently is consuming memory and CPU time. How can I help to diagnose that?

You need to turn off the image channel from updating, I find it halves the CPU load and also stops a memory leak. This is covered in the readme for the binding and as it literally turns off 1 line of code that sends the snapshot to the Openhab Image item I am certain this is in the Openhab framework and not the binding. The Image item was never designed to take large pictures changing often.

Ask HIK support, it will be a change in the cameras settings.

anyone knows if this binding supports the motion detection of Foscam fi9902p? It should right? As I see it, it’s the new model of the fi9900P.
Thanks and best regards

If the camera has the Foscam HD api implemented then it should work. The older non HD cameras have not been implemented into the binding unless we get a volunteer to do the work. DISCLAIMER: Since I don’t work for foscam you need to do your own research. See the first post of this thread that explains what is implemented for each brand as you may want to purchase a different camera based on what features you need.

Hi, i´m looking for a good cam for my front door. I have seen some cams on aliexpress. dahua ipc-hdw4433c-a has 4MP, 2,8mm lens and an angle of view of 81°.

Another cam, KingCam cam with 4MP has 2,8mm lens too, but angle of view is 120°.
(disadvantage, it doesn´t provide mjpeg stream, only h264/h265. So not easy to use in openhab…)

Can somebody tell me, why the difference in angle of view is so big - even with the same lens?

Anybody knows the dahua cam? Is the angle of view really only 81° with the 2,8mm lens?

If you want the ability to trigger a door latch to remote open the door or to use the cameras alarm terminals for doorbell operations then you will need the right dahua model. So much more automation is possible if U stick to cams with an API that this binding supports.

A fish eye lens may explain the view difference or it may be a typo as the specs in AliExpress often are wrong.

Hello Matt could you check my post please

I can’t get my camera working correctly.



clould you please share yout settings. I have the same cameras and i can not get them works

2019-11-16 17:11:09.374 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera Dispose() called.

2019-11-16 17:11:09.382 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera restarting.

2019-11-16 17:11:09.419 [me.event.ThingUpdatedEvent] - Thing 'ipcamera:ONVIF:93595891' has been updated.

2019-11-16 17:11:10.425 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Following NPE occured when trying to connect to the camera with ONVIF.java.lang.NullPointerException

2019-11-16 17:11:10.428 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Since an NPE occured when asking the camera about PTZ, the PTZ controls will not work. If the camera does not come online, give the camera the wrong ONVIF port number so it can bypass using ONVIF and still come online.

2019-11-16 17:11:10.430 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.

2019-11-16 17:15:50.983 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:93595891' changed from OFFLINE (CONFIGURATION_ERROR): Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL. to UNINITIALIZED

2019-11-16 17:15:51.015 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera Dispose() called.

2019-11-16 17:15:51.017 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera restarting.

2019-11-16 17:15:51.032 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:93595891' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)

2019-11-16 17:15:51.841 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:93595891' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2019-11-16 17:15:52.869 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.

2019-11-16 17:15:52.873 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:93595891' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.

2019-11-16 17:18:06.874 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera Dispose() called.

2019-11-16 17:18:06.877 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - ipCamera restarting.

2019-11-16 17:18:06.902 [me.event.ThingUpdatedEvent] - Thing 'ipcamera:ONVIF:93595891' has been updated.

2019-11-16 17:18:07.901 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.

Thanks a lot!


I have found a rtsp link and it works good in vlc player.
How can i add to oh? I added it in bindings setup, but nothing happend…

HI Michael @thisisIO,

I had to change/modify the source code of this binding and recompile it for me to work with my Reolinks. A simple reconfiguration was not possible. However I am no longer using this binding, I developed an own solution based on OpenCV.

Best regards

1 Like

HI Matt,

i have made a Thing

Thing ipcamera:ONVIF:001 "Camera Entrance" @ "Cameras" [

and installed FFMPEG.

Now i get gifs here /tmpfs/camera1/ipcamera.gif when i push the button to create a gif.
But i have no mjpeg.

I get only m3u8 with following contents inside:


rtsp://admin:123456@192.168.XX.XX:554/h264Preview_01_main - this stream works in VLC Player.

I have intalled HLS Plugin in Chrom

And put in sitemap

     Text label="Android Stream" icon="camera"{
    Video url="" encoding="mjpeg"

    Text label="iOS Stream" icon="camera"{
        Webview url="" height=15

When i call http://192.168.XX.XX:55551/ipcamera.m3u8 i still have not video((( http://prntscr.com/py7u8z

Maybe it have to be trigged to start the stream or please tell me, why can it be?


The binding can only create a animated GIF and HLS streams from a rtsp source. There is another method to use ffmpeg in a different thread on this forum on how to create mjpeg if your camera does not have a normal http url for the stream. Most likely it will chew CPU so I am not keen to add the feature when you can offload it to a server running motion or any of the other packages. The readme has more info on this please take the time to read it.

to setup mjpeg with the binding you need to setup this config STREAM_URL_OVERRIDE.

Quote from readme file…

A HTTP URL for MJPEG format streams only, RTSP not supported.


If you can not get HLS working check…

  1. The camera is producing h264 and NOT mjpeg to the url you have given the binding via FFMPEG_INPUT.
  2. Call the url and within 30 seconds call it a second time as the first call will start the stream and if you do not have enough buffered it may stop/runout. Calling it a second time should tell you this.
  3. Use TRACE or DEBUG log output to show the ffmpeg output and this will tell you if your machine hits 1x speed for realtime. Slower setup will either take time to reach 1x or will never reach it.

Thanks Matt,

  1. Here is the infos about stream It seems to be h264 http://prntscr.com/pyex8z
  2. You mean call in browser this link two tiomes at the same time - if so then nothing happens http://prntscr.com/pyez9r (((
  3. I have shut down snapshots in thing

to make log more reaadable. But now the log of ipcamera is empty (with TRACE on), also if i call this link in chrome

Matt, by the way - if i get Gifs (that are made from RTSP) this means that RTSP works. But why i can not see it?

@matt1, can you help me with this problem ? I can provide more log if you want.


Below text is a reply to you all as I have very little spare time and prefer to get real coding done instead of reading posts that either have been answered before or have had zero effort by poster to look at trace level log and the readme or searched forum…

No idea, my crystal ball is broken. Read the trace level log output to learn more. The binding only creates a GIF it does not display it so if the file is created nothing is wrong…

See reply above, without log output you have not tried to look into this yourself. The readme explains two different ways you can get the GIF top be created, if 1 does not work then try the other STREAM VS SNAPSHOTS…

I will be ignoring posts that don’t demonstrate

Having read the readme file at GitHub for this addon. Countless hours have gone into making sure it is a helpful readme. If the readme does not make sense, then please post what needs attention and I WILL update it with better info.
Looked at the trace level logs to see what is happening when you have an issue. The binding tells you a lot of info to give you clues as to what is wrong.
Searched this thread using any errors or keywords to find the other peoples posts that I have already answered.

The entire post is not aimed at any 1 person and I am not angry, just making it clear why I will ignore some posts. I am a volunteer with a busy life and your issues are not high on my list especially if you cant be bothered to help yourself. Keep post short and clear and show you have done work.