IpCamera: New IP Camera Binding

Need more info. Are u doing textual config or using UI? Remove that config from your things file.

Sorry, this is my textual config

Thing ipcamera:onvif:001 "Batu Camera"
[
    ipAddress="192.168.xx.xx",
    username="admin",
    password="xxxxxx",
    onvifPort=80,
    port=80,
    serverPort=54324,
    pollTime=20000,
    updateImageWhen=0,
    snapshotUrl="ffmpeg",
    mjpegUrl="ffmpeg",

    gifPreroll=0,
    gifPostroll=20,
    gifOutOptions="-filter_complex fps=4,scale=480:-2:flags=lanczos,setpts=0.25*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",

    ffmpegInput="rtsp://192.168.1.45:554/ISAPI/Streaming/channels/401",
    ffmpegOutput="/etc/openhab2/html/sv3ccamera/",
    ffmpegLocation="/usr/local/bin/ffmpeg",
    onvifMedia_Profile=1,
    ipWhitelist="DISABLE"
]

Shoud I remove what?

That is the reason. The config is a String which means you need to use quotes updateImageWhen="0" I forget if this was changed, but it now needs quotes. But since the option 0 is the default, you can delete this completely from the thing file.

Delete this as it no longer exists (readme may refer to it but that is wrong) See the section on how to record to mp4 and gif as that should clear it up. Also there is a bug if you want to record GIF, best to download the fixed jar from the download link in the first post of this thread.

The rest of the things file looks good.

1 Like

String corrected (commented out as it’s the default)
After removing gifPostroll and even gifPreroll Still there this message that I post here in the complete text

2020-09-23 22:12:10.229 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSystemDateAndTime

2020-09-23 22:12:10.247 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV=β€œhttp://www.w3.org/2003/05/soap-envelope” xmlns:SOAP-ENC=β€œhttp://www.w3.org/2003/05/soap-encoding” xmlns:xsi=β€œhttp://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=β€œhttp://www.w3.org/2001/XMLSchema” xmlns:wsa=β€œhttp://schemas.xmlsoap.org/ws/2004/08/addressing” xmlns:wsdd=β€œhttp://schemas.xmlsoap.org/ws/2005/04/discovery” xmlns:chan=β€œhttp://schemas.microsoft.com/ws/2005/02/duplex” xmlns:wsa5=β€œhttp://www.w3.org/2005/08/addressing” xmlns:xmime=β€œhttp://www.w3.org/2005/05/xmlmime” xmlns:xop=β€œhttp://www.w3.org/2004/08/xop/include” xmlns:wsrfbf=β€œhttp://docs.oasis-open.org/wsrf/bf-2” xmlns:tt=β€œhttp://www.onvif.org/ver10/schema” xmlns:wstop=β€œhttp://docs.oasis-open.org/wsn/t-1” xmlns:wsrfr=β€œhttp://docs.oasis-open.org/wsrf/r-2” xmlns:tan=β€œhttp://www.onvif.org/ver20/analytics/wsdl” xmlns:tdn=β€œhttp://www.onvif.org/ver10/network/wsdl” xmlns:tds=β€œhttp://www.onvif.org/ver10/device/wsdl” xmlns:tev=β€œhttp://www.onvif.org/ver10/events/wsdl” xmlns:wsnt=β€œhttp://docs.oasis-open.org/wsn/b-2” xmlns:c14n=β€œhttp://www.w3.org/2001/10/xml-exc-c14n#” xmlns:wsu=β€œhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd” xmlns:xenc=β€œhttp://www.w3.org/2001/04/xmlenc#” xmlns:wsc=β€œhttp://schemas.xmlsoap.org/ws/2005/02/sc” xmlns:ds=β€œhttp://www.w3.org/2000/09/xmldsig#” xmlns:wsse=β€œhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:timg=β€œhttp://www.onvif.org/ver20/imaging/wsdl” xmlns:tmd=β€œhttp://www.onvif.org/ver10/deviceIO/wsdl” xmlns:tptz=β€œhttp://www.onvif.org/ver20/ptz/wsdl” xmlns:trt=β€œhttp://www.onvif.org/ver10/media/wsdl” xmlns:ter=β€œhttp://www.onvif.org/ver10/error” xmlns:tns1=β€œhttp://www.onvif.org/ver10/topics” xmlns:trt2=β€œhttp://www.onvif.org/ver20/media/wsdl” xmlns:tr2=β€œhttp://www.onvif.org/ver20/media/wsdl” xmlns:ewsd=β€œhttp://www.onvifext.com/onvif/ext/ver10/wsdl” xmlns:exsd=β€œhttp://www.onvifext.com/onvif/ext/ver10/schema” xmlns:hikwsd=β€œhttp://www.onvifext.com/onvif/ext/ver10/wsdl” xmlns:hikxsd=β€œhttp://www.onvifext.com/onvif/ext/ver10/schema” xmlns:tnshik=β€œhttp://www.hikvision.com/2011/event/topics”>SOAP-ENV:BodySOAP-ENV:FaultSOAP-ENV:CodeSOAP-ENV:ValueSOAP-ENV:Sender</SOAP-ENV:Value>SOAP-ENV:SubcodeSOAP-ENV:Subcode</SOAP-ENV:Subcode></SOAP-ENV:Subcode></SOAP-ENV:Code>SOAP-ENV:Reason<SOAP-ENV:Text xml:lang=β€œen”>Error 401: HTTP 401 Unauthorized</SOAP-ENV:Text></SOAP-ENV:Reason></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

Hello,

I apologize by advance because I think the answer will be easy for experienced user but I installed the binding, everything works but I’m sure I did not used the best practices

I just want to have the streams on my sitemap nothing else

I configured 2 cameras in the things file
To display the video then I use the IP of the OpenHab (seems weird, no ?)
I tried with the IP of each camera but then I have no display of the camera so I suppose here the flow is captured by OpenHab then displayed from Openhab in the sitemap

So it works so I can live with that

The only error I have is a INFO msg on the openhab.log every 15 sec per camera (or less)

2020-09-24 00:37:20.607 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera a.b.c.d, re-starting it now
2020-09-24 00:37:23.832 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera e.f.g.h, re-starting it now
2020-09-24 00:37:31.839 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera e.f.g.h, re-starting it now
2020-09-24 00:37:36.619 [INFO ] [era.internal.handler.IpCameraHandler] - The alarm stream was not running for camera a.b.c.d, re-starting it now

OK it’s just INFO msg but how can I suppress them ?

Thanks a lot for your help

My configuration

OpenHab version : 2.5.9

My things :

//Camera
Thing ipcamera:hikvision:001 β€œCamera Garage” @ β€œGarage”
[
ipAddress=β€œa.b.c.d”,
username=β€œxxx”,
password=β€œxxx”,
onvifPort=80, //normally 80 check what it needs
port=80,
serverPort=54324,
ffmpegOutput=β€œ/etc/openhab2/html/cameras/garage/”
]
Thing ipcamera:hikvision:002 β€œCamera Terrasse” @ β€œTerrasse”
[
ipAddress=β€œe.f.g.h”,
username=β€œxxx”,
password=β€œxxx”,
onvifPort=80, //normally 80 check what it needs
port=80,
serverPort=8000,
ffmpegOutput=β€œ/etc/openhab2/html/cameras/terrasse/”
]

My sitemap :

Group item=Camera icon=β€œcamera” label=β€œCamΓ©ra” {
Video url=β€œhttp://xxx:xxx@(ip openhab):54324/ipcamera.mjpeg” encoding=β€œmjpeg”
Video url=β€œhttp://xxx:xxx@(ip openhab):8000/ipcamera.mjpeg” encoding=β€œmjpeg”
}

Is your camera a genuine Hikvision? If not, in your things file change the hikvision to onvif or to generic if your camera does not have ONVIF features.

@Brignoud
Either your login name or pass is wrong, or they may be an incompatibility that needs to be looked at. Start a new thread so all the info is easy to find. I have no idea what brand and model camera you have for example.

Also this line is interesting.
ffmpegInput=β€œrtsp://192.168.1.45:554/ISAPI/Streaming/channels/401”,
Usually that would select the 4th channel on a NVR, posting what details the setup is in a new thread is kind of important.

@matt1

Thx, those are hikvision camera with Onvif

1 x DS-2DE3304W-DE
1 x DS-2DE5184-AE

Regards,

Julien

Do u have the alarms ticked to notify the surveillance centre? You may have none ticked in the cameras web setup pages.

I know this has been asked a lot but this binding seems to be getting better and better with a lot of changes being made very quickly.
How do people have their reolink rlc 410 setup? Do you still use the http/rtsp or basic onvif?
Has anyone gotten the motion alarms to work thats mainly what I’m worried about?
Definitely wish i would have saw this binding before i bought reolink and gone with amcrest, only reason I didn’t is because of the displaying on chromecasts.

Yes :
image

But still see the messages

Try updating to the latest firmware for your camera.

@eljub
The CGI / API is disabled by default on Hikvision cameras, you need to enable it, see…

Hi matt1,

I read it and it’s already activated
image

Then look at the log in TRACE mode.
Get the URL from the log and test it in any browser.
Contact support for the camera if it does not work in a browser.

Lastly you can work around it by setting the camera up as onvif thing type and it should still give u alarms via onvif methods instead of the API. You will loose all the API functions.

Sorry for the screen in Russian, but disable basic authorization and add the user to the table below.

Hello, I’m bought Digoo dg-zxc40 camera but I don’t know how to setup using IP camera binding - onvif. Openhab found the camera,but it is all. Nothing works. The camera supports onvif and in Things is online. When I install Android app, no official app, but altarnative with onvif, camera works fine…

Need a little more info and this link covers what you need to do.

I I’m trying to set through Paper UI.





what happens when you try and open this URL in any browser?

http://openhab:4001/ipcamera.jpg

Replace openhab with the IP or hostname of the openhab server.

If you don’t see a picture when you open the above URL, then see my previous post and follow the advice to:
a) get some trace logs
b) open a new thread.

If you do see a picture, you just need to learn how to use sitemaps or habpanel as a picture will not show in PaperUI.

Hello,

Thanks for your help but still the same issue