IpCamera: New IP Camera Binding

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>
.```

Here is an example where a LineCrossing alarm was triggered it did not update my items. The only update i got was for the LastEvent.

Items:

String    G_EXT_CAMERA_GarageFrontLeft_Alarm                "Garage Front Left Alarm"             (SecurityCameras)                            {channel="ipcamera:hikvision:garageleft:lastMotionType", expire="5s,state=NoAlarm"}
//Line Crossing
Switch    G_EXT_CAMERA_GarageFrontLeft_LineCrossing             "Line Crossing Enable/Disable"        (SecurityCameras)                            {channel="ipcamera:hikvision:garageleft:enableLineCrossingAlarm"}
String    G_EXT_CAMERA_GarageFrontLeft_LineCrossingAlarm        "Garage Front Line Crossing Alarm"    (SecurityCameras,GarageFront_Alarms)         {channel="ipcamera:hikvision:garageleft:lineCrossingAlarm"}

Trace Log that triggered the event:

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

:

2021-02-26 10:32:01.171 [TRACE] [g.ipcamera.internal.HikvisionHandler] - HTTP Result back from camera is 	:--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 1254
<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-26T10:32:00-5:00</dateTime>
<activePostCount>611</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-26T10:32:00-5:00,1.0</eventPush>
</Extensions>
</EventNotificationAlert>

The only Event that changed:

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

2021-02-26 10:32:01.173 [vent.ItemStateChangedEvent] - G_EXT_CAMERA_GarageFrontLeft_Alarm changed from NoAlarm to lineCrossingAlarm

Hi, Iā€™m an experienced OH user and developer, but new to the camera topic.

Do you have recommendations for cameras working best with the binding, have

  • a good feature set
  • fully supported by the binding
  • proper support WiFi
  • can be used outdoor
  • no cloud (for security reasons)
  • be able to record on NAS
  • at a reasonable price (< 150ā‚¬)?

Does somebody has experience with Mibao, it looks cheap, but is commended by amazon and has 4,5* from 500 customers.

A couple of things, please always start your own thread especially when it will mean multiple messages and long traces.

I have not used textual in a while now but it should be a Switch item. See if it works with the GUI method if you use OH3.

Then that will cause an issue, the binding requires it all to be in the one message currently, if it is getting split up then that will require some changes in the binding. So far you have not given me a log output that has not been cut short that shows it is occuring which makes it very hard to know whats going on when the messages are cut to pieces.