IpCamera: New IP Camera Binding

Tags: #<Tag:0x00007fc8f072aa18> #<Tag:0x00007fc8f072a928> #<Tag:0x00007fc8f072a860>

i am using 2 hikvision ds-2cd2041g1-idw1 with the binding,add them as hikvision with Api cameras and they r working just fine.
My question is …can we use somehow the 2 way audio feature?One of my cameras is at my front door and it would be so cool to have a 2 way audio to speak to visitors when they press my openhab doorbell.Is there a way to add that feature to a habpanel widget?Just an idea…

There are some users reporting video and image elements are having issues if your sitemap file is stored in the DataBase, but it you use a real file to store the sitemap in it then works. Test and then visit github issues under the main UI repo I think it was.

@JSamijn I can confirm that I can reproduce it here and will look into this as a bug.

@Constantinos_Contis Yes 2 way audio would be good, just need to wait until we have someone with the right skills to add it. Using the camera as an output speaker from audio files is probably not that hard, compared to using mics on someones phone/computer.

Hi matt,
you mean copy the code from the Main UI page and put in a X.sitemap file inside the “old” fordels ?

Yes

Hi to all,
I am new using this IpCamera Binding, first on 2.5, and now on 3.0.1. I am using with 4 Foscam cameras. I enable and dissable the motion detecion of the cameras with http binding, but I use the IPCamera binding to create a gif when motion detected and send it with telegram.
But… sometimes work and sometimes don’t :-(… I have to enable / disable motion detection with the binding? or is not necessary?

And, I have in all cams updateImageWhen=“0”, but in trace I still see a Sending camera: GET: http://XXXXXX/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2 for all cams every 2 seconds (as this is the time I put on pollTime), I have supposed that the binding only get a “status update” to see if camera has detected motion (camera detect motion and send email and images to and FTP, but OH only realizes sometimes).

And I have other side-effect, that I think is related to this binding… memory leaks… memory is slowly increassing during several days until I need to reboot OH. Is possible?

My system is running on a miniPC using Windows 10.

Thanks in advance!
Ruben

I found and fixed a few issues for Foscam cameras and created a build for ppl to test whilst the changes are reviewed and merged.

That thread should contain info on the alarm not always working. You dont need to use the binding to enable/disable you can do it either way.

Anything is possible as there are so many different combinations to use this binding in it is impossible to test all of them when I don’t own all cameras on the market, having said that I would be very surprised if it was when your not using the image channel. The best thing to do is to uninstall the binding and see if the memory stops increasing, if it does then you know the binding is the cause and we can fault find further, but lets not guess until we know for sure which binding is the cause on your system.

I think that is this binding, because I haven’t have this issue since I installed it (only other time have this issue with Alexa binding, but that issue was adressed and corrected some time ago). I am using OH a lot of time and the only new binding that I have is this one. In any case, I have just uninstalled it and test again.

Also I have the problem of not motion detection… The camera detect motion (and send me emails and upload to FTP), but the binding doesn’t fire the motion detection item. So by now, I have disabeled the binding and program a simple time rule to check the motion detection manually.

I report here in a couple of days.

Thanks in advance.

Ruben

Read my last post again, I found and fixed an issue that was stopping motion detection under V3 there is already a build you can test with.

I added an ip camera to the system and found that the image is updated every 6-8 seconds. However, I did everything according to the instructions. can someone tell me what the problem may be? Hikvision DS-2CD 2020 camera. openhab 2.5. changing the video quality on the cameras does not help. (New user from Belarus). Thank you in advance

There is on OH 3.1 files SNAPSHOT?

And I have actually disabeled the binding, and now I don’t have the “memory leaks” problem, so I am sure that is due to binding… But I can’t reproduce why it happens, because in a moment, there are a increment in memory that doesn’t return to system. But is not a fixed hour… it happens randomly during the day, not related to any event or rule. I am recording all day resources and persist with influxdb.

Thanks in any case.
(I have build manually a rule to check the motion detection without the binding).

Ruben

Hi - I’m trying to get this working with a hacked Dafang camera that has an RTSP feed.

Here are the camera settings - for codec I can also select h264 or mjpeg:

and here are the thing settings:

If I go to http://openhaburl:8001 I just get a blank screen.

I’ve tried a number of changes but can’t seem to get anything to work. Am I missing something dumb or does this not work? I have an Onvif camera that is working fine.

so i am willing to buy the hikvision DS-KV6113-PE1 video doorbell and i was wondering if its possible to have a trigger channel when someone presses the doorbell button ,using this binding…?

hi
did resolve your issue? i have the same problem!!!

Best wishes

sometimes at one of my hikvision camera i get in the log…

[WARN ] [era.internal.handler.IpCameraHandler] - !!!! Camera possibly closed the channel on the binding, cause reported is: Connection reset by peer

after some seconds camera feed is normal again…
anyone knows why is that?

is the video from the camera showing with a delay or not?

no ,no delay at all.

can I see the configuration?

@matt1 i understand that OH3 plugins are probably your focus from this point forward - I havent had a chance to look into upgrading my OH2.5.11 install to OH3.

But i’ve been having problems getting Alarms to work 100% on my cameras.

I’m running a Hikvision NVR (model: DS-7616NI-I2 / 16P) and multiple Turret ColorVu Hikvision Cameras (Model:DS-2CD2347G1-LU).

I have added my cameras two ways:

  1. Directly though the NVR IP address and specifying nvrChannel=#
  2. Directly to the Camera IP address with the nvrChannel removed (defaults to 1)

Both setups has yielded the same results on these units. Alarms are intermittently triggered. I get the alarms 100% everytime though the Hik-Connect app which indicates the alarm is triggered and the "
“Notify Surveillance Center” is checked off and working.

The Thing for “lineCrossingAlarm” is never triggered On/OFF and i have been getting mixed results by using the “lastMotionType” thing, i will get the alarm most of the time and then it will just stop.

With TRACE enabled for the plugin i see all the xml events but nothing updated for my items:

<ipAddress>192.168.2.58</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>10:12:fb:e3:56:28</macAddress>
<channelID>1</channelID>
<dateTime>2021-02-25T23:10:55-5:00</dateTime>
<activePostCount>67</activePostCount>
<eventType>linedetection</eventType>
<eventState>active</eventState>
<eventDescription>linedetection alarm</eventDescription>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>1</regionID>
<sensitivityLevel>100</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>500</positionX>
<positionY>981</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>502</positionX>
<positionY>17</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
</DetectionRegionList>
<channelName></channelName>
<Extensions version="1.0" xmlns="urn:psialliance-org">
<serialNumber xmlns="urn:selfextension:psiaext-ver10-xsd">DS-2CD2347G1-LU20200917AAWRE80568520</serialNumber>
<eventPush xmlns="urn:selfextension:psiaext-ver10-xsd">IO&amp;&amp;DS-2CD2347G1-LU20200917AAWRE80568520,2021-02-25T23:10:55-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
:```

Try updating your firmware as this may be a bug in the camera. It all looks fine except the camera is not sending “–boundary” which will stop it working, my guess is you will see the working alarms start with that and the ones that don’t have it missing. A multipart http message I’m pretty sure needs to start with a boundary tag so contact HIK support.

Hi @matt1,
I can confirm i am running the absolute latest firmware versions for both the NVR and Camera. I took a look deeper into the TRACE logs and it apepars i am getting the --boundary its just on a seperate line?

I’m testing my cameras though both methods directly though the NVR and directly to the camera as you can see in the logs.

192.168.3.254 = NVR with nvrChannel specified.
Any other IP is ipCamera binding talking directly to the camera.

Content-Type: application/xml; charset="UTF-8"
Content-Length: 861

<?xml version="1.0" encoding="utf-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<ipAddress>192.168.3.254</ipAddress>
<portNo>80</portNo>
<protocolType>HTTP</protocolType>
<macAddress>ec:c8:9c:9d:d4:be</macAddress>
<dynChannelID>6</dynChannelID>
<channelID>6</channelID>
<dateTime>2021-02-25T20:18:52-5:00</dateTime>
<activePostCount>22</activePostCount>
<eventType>linedetection</eventType>
<eventState>active</eventState>
<eventDescription>linedetection alarm</eventDescription>
<channelName>Front Yard</channelName>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>0</regionID>
<RegionCoordinatesList>
</RegionCoordinatesList>
<TargetRect>
<X>0.000000</X>
<Y>0.000000</Y>
<width>0.000000</width>
<height>0.000000</height>
</TargetRect>
</DetectionRegionEntry>
</DetectionRegionList>
</EventNotificationAlert>
:
2021-02-25 20:18:53.918 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 861

<?xml version="1.0" encoding="utf-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<ipAddress>192.168.3.254</ipAddress>
<portNo>80</portNo>
<protocolType>HTTP</protocolType>
<macAddress>ec:c8:9c:9d:d4:be</macAddress>
<dynChannelID>6</dynChannelID>
<channelID>6</channelID>
<dateTime>2021-02-25T20:18:52-5:00</dateTime>
<activePostCount>22</activePostCount>
<eventType>linedetection</eventType>
<eventState>active</eventState>
<eventDescription>linedetection alarm</eventDescription>
<channelName>Front Yard</channelName>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>0</regionID>
<RegionCoordinatesList>
</RegionCoordinatesList>
<TargetRect>
<X>0.000000</X>
<Y>0.000000</Y>
<width>0.000000</width>
<height>0.000000</height>
</TargetRect>
</DetectionRegionEntry>
</DetectionRegionList>
</EventNotificationAlert>
:
2021-02-25 20:18:54.714 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 1254

:
2021-02-25 20:18:54.715 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.2.58</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>10:12:fb:e3:56:28</macAddress>
<channelID>1</channelID>
<dateTime>2021-02-25T20:18:52-5:00</dateTime>
<activePostCount>411</activePostCount>
<eventType>linedetection</eventType>
<eventState>active</eventState>
<eventDescription>linedetection alarm</eventDescription>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>1</regionID>
<sensitivityLevel>100</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>500</positionX>
<positionY>981</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>502</positionX>
<positionY>17</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
</DetectionRegionList>
<channelName></channelName>
<Extensions version="1.0" xmlns="urn:psialliance-org">
<serialNumber xmlns="urn:selfextension:psiaext-ver10-xsd">DS-2CD2347G1-LU20200917AAWRE80568520</serialNumber>
<eventPush xmlns="urn:selfextension:psiaext-ver10-xsd">IO&amp;&amp;DS-2CD2347G1-LU20200917AAWRE80568520,2021-02-25T20:18:52-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
:
2021-02-25 20:18:55.261 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 837

:
2021-02-25 20:18:55.261 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.2.174</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c0:51:7e:c2:c5:33</macAddress>
<channelID>1</channelID>
<dateTime>2021-02-25T20:18:53-5:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName></channelName>
<Extensions version="1.0" xmlns="urn:psialliance-org">
<serialNumber xmlns="urn:selfextension:psiaext-ver10-xsd">DS-2CD2347G1-LU20201103AAWRE96761883</serialNumber>
<eventPush xmlns="urn:selfextension:psiaext-ver10-xsd">IO&amp;&amp;DS-2CD2347G1-LU20201103AAWRE96761883,2021-02-25T20:18:53-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
:
2021-02-25 20:18:55.619 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 1254

:
2021-02-25 20:18:55.619 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.2.58</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>10:12:fb:e3:56:28</macAddress>
<channelID>1</channelID>
<dateTime>2021-02-25T20:18:53-5:00</dateTime>
<activePostCount>412</activePostCount>
<eventType>linedetection</eventType>
<eventState>active</eventState>
<eventDescription>linedetection alarm</eventDescription>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>1</regionID>
<sensitivityLevel>100</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>500</positionX>
<positionY>981</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>502</positionX>
<positionY>17</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
</DetectionRegionList>
<channelName></channelName>
<Extensions version="1.0" xmlns="urn:psialliance-org">
<serialNumber xmlns="urn:selfextension:psiaext-ver10-xsd">DS-2CD2347G:
2021-02-25 20:18:55.620 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:1-LU20200917AAWRE80568520</serialNumber>
<eventPush xmlns="urn:selfextension:psiaext-ver10-xsd">IO&amp;&amp;DS-2CD2347G1-LU20200917AAWRE80568520,2021-02-25T20:18:53-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
:
2021-02-25 20:18:55.620 [DEBUG] [g.ipcamera.internal.HikvisionHandler] - Unhandled reply-1-LU20200917AAWRE80568520</serialNumber>
<eventPush xmlns="urn:selfextension:psiaext-ver10-xsd">IO&amp;&amp;DS-2CD2347G1-LU20200917AAWRE80568520,2021-02-25T20:18:53-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
.```