IpCamera: New IP Camera Binding

camera
ip-cam
onvif
Tags: #<Tag:0x00007fd31184e1f8> #<Tag:0x00007fd31184dd70> #<Tag:0x00007fd31184dc30>

(Greg) #321

I found a firmware file online. Now I have firmware V5.2.5 build 141201. Now I have to see if it will work with this binding.


(_) #322

https://www.hikvision.com/en/Support/Downloads/Firmware/3

Baseline Firmware_IPC_ML_V5.4.5 170123 (2XX2)

upport models:
DS-2CD2012-I, DS-2CD2012F-I(W), DS-2CD2022-I, DS-2CD2022F-I(W), DS-2CD2032-I, DS-2CD2032F-I(W), DS-2CD2112-(I), DS-2CD2112F-I(W)(S), DS-2CD2122F-I(W), DS-2CD2132-(I), DS-2CD2132F-I(W)(S), DS-2CD2212-I5, DS-2CD2232-I5, DS-2CD2312-I, DS-2CD2332-I, DS-2CD2412F-I(W), DS-2CD2422F-I(W), DS-2CD2432F-I(W), DS-2CD2512F-IB, DS-2CD2532F-I(W)(S), DS-2CD2612F-I(S) , DS-2CD2622F-I(S), DS-2CD2632F-I(S) ,DS-2CD2712F-I(S), DS-2CD2722F-I(S), DS-2CD2732F-I(S), DS-2CD2T12-I3/I5/I8, DS-2CD2T22-I3/I5/I8, DS-2CD2T32-I3/I5/I8


(Skinah) #323

New build 30-06-2018 has following changes:

  • HIKVISION now may be able to trigger your alarm or other devices like a IR flood light via a cameras output.
  • New changes in last few builds have passed my testing on both my cameras and have run for 24 hours with no errors and a stable picture output.

@Kristo
New build has the ability to trigger the alarm output. Let me know if it works as I can not test it here. The switch will send ‘low’ when moving to the OFF switch position and ‘high’ when moving to the on position. Maybe use the expire binding to move the switch back to the position you desire ready for the next trigger or use rules. I am hoping this does not cause issues as it then will work for users which setup high or low without the need to ask the camera what is setup and parse the reply. To see the new channel you may need to remove and add the camera again unless you use texual config then it will be automatic.

@TexasGreg
Just a heads up that HIKVISION disable the CGI/API by default and you need to enable it in the cameras setup page. I am not sure what firmware is needed to use the binding, nor in which versions it is disabled by default but be sure to look and enable it before thinking the binding does not work.


(YF) #324

Hi guys,

It looks like the binding is getting more and more mature. I am wondering if those that have had the binding working with their cameras could post the manufacturer and exact model? Also, is there any recommendation on the best outdoor IP Camera to buy feature-wise, and budget-wise? These info would be great help for user like myself looking to get an outdoor IP Cam.

Much appreciated,

YF


(_) #325

@matt1
After quick testing no reaction.
Which output you are triggering ID 1 ?

I just thinnking if you can add status checking for input ID 1 to see if triggering will visible


(Skinah) #326

It is ID 1 if you have the NVR channel set to 1, or 2 if set to NVR channel 2. If you enable TRACE you will see it in the logs and you may see the camera reply with a helpful error message.


(_) #327

@matt1
Log:

/ISAPI/System/IO/outputs/1/trigger is going to be:

<IOPortData xmlns=“http://www.isapi.org/ver20/XMLSchema”>
<outputState>high</outputState>
</IOPortData>

response:

<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/IO/outputs/1/trigger</requestURL>
<statusCode>3</statusCode>
<statusString>Device Error</statusString>
<subStatusCode>deviceError</subStatusCode>
</ResponseStatus>

I think this is issue with My cam as i checked Motion detection off/on item and is giving same response.

Status items like line cross detection … are working ok

DO you think it can be an issue with Firmware i’m using 5.45 as this is newest one for this cam

small update:
after checking with curl it working very well
curl -T out1high.xml http://admin:password@192.168.2.10:80/ISAPI/System/IO/Outputs/1/trigger

response:

<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<requestURL>/ISAPI/System/IO/Outputs/1/trigger</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>


(Skinah) #328

New build 01-07-2018 has following changes:

  • HIKVISION Two bug fixes for PUT requests so users of this brand should upgrade. @Kristo this should hopefully fix your issues.

(Skinah) #329

I just updated the first post in this thread with a list of cameras that people have mentioned already, but all models from a brand that has an API listed as working “should” work.

As for the best outdoor camera, that depends on budget and your requirements and this question is better asked on a camera forum. Some cameras can ID a license plate on a car and tell you when X car is home. Face detection and many other features may really change which camera you wish to buy, and on this topic you need to be careful as enabling h265 on my camera turns off the ability to do some of these smart alarms. Read the manual before you buy if certain features are important. Starlight/darkfighter features are another thing that puts the price up.


(YF) #330

@matt1 Thanks matt. That’s very helpful.


(_) #331

@matt1
thanks new build fix issue also now motion act/de is working

can you please add also reading of input state and if possible output state (in case of swtiching by other app)?


(_) #332

Did somone have a issue with - i think is comming form image refresh each 5s from 2 cams

[ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'EventSubscriber.receive()' on 'org.eclipse.smarthome.core.internal.items.ItemUpdater@527936': Java heap space


(_) #333

I’m tesitng now binding with WBOX cam (rebranded Hikvision) result:
Motion status - works
Enable/Dis Motion control - Not working


(bernd_boehm) #334

I have identified an other possible issue in Instar Cams:

I have set up an Item to enable the Audio Alarm: Switch Keller_audio_alarm “Audio Alarm” { channel=“ipcamera:INSTAR:17bd8366:audioAlarm”}

But when I switch it on, nothing happens.

There might be a confusion because the Audio alarm has two ways. An alarm that is triggered when a sound is recorded and an Alarm that can be played via Audio. I am looking for the latter.


(Skinah) #335

@Kristo
Does it work with the same isapi URL via curl?

@bernd_boehm
The binding does the former and you want the latter so this is not a bug.


(bernd_boehm) #336

Hmm… pity than there is still a redundancy:

The binding offers two things that apparently to do the same:
ipcamera:INSTAR:17bd8366:enableAudioAlarm
ipcamera:INSTAR:17bd8366:audioAlarm


(_) #337

@matt1
Yes with same api and working with curl under same command.


(Ahmed Saad) #338

Hello!
I have an IP Camera that support ONVIF as in the picture,

I installed the binding, There is some Errors ,and these the blogs.

2018-07-03 16:35:33.008 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_updateImageNow-ipcamera:ONVIF:acadd52a:updateImageNow' has been added.

2018-07-03 16:35:33.026 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_image-ipcamera:ONVIF:acadd52a:image' has been added.

2018-07-03 16:35:33.043 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_pan-ipcamera:ONVIF:acadd52a:pan' has been added.

2018-07-03 16:35:33.053 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_tilt-ipcamera:ONVIF:acadd52a:tilt' has been added.

2018-07-03 16:35:33.062 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_zoom-ipcamera:ONVIF:acadd52a:zoom' has been added.

2018-07-03 16:35:33.071 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_videourl-ipcamera:ONVIF:acadd52a:videourl' has been added.

2018-07-03 16:35:33.081 [.ItemChannelLinkAddedEvent] - Link 'ipcamera_ONVIF_acadd52a_imageurl-ipcamera:ONVIF:acadd52a:imageurl' has been added.

2018-07-03 16:35:33.124 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:acadd52a' changed from UNINITIALIZED to INITIALIZING

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

2018-07-03 16:35:33.141 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:35:33.221 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:35:33.223 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:35:33.225 [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.

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

2018-07-03 16:35:33.238 [hingStatusInfoChangedEvent] - 'ipcamera:ONVIF:acadd52a' 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.

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

2018-07-03 16:36:37.123 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:36:37.221 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:36:37.223 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:36:37.225 [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.
2018-07-03 16:36:37.221 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:36:37.223 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:36:37.225 [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.

2018-07-03 16:37:41.122 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:37:41.209 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:37:41.216 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:37:41.223 [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.

2018-07-03 16:38:45.122 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:38:45.192 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:38:45.196 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:38:45.202 [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.

2018-07-03 16:39:49.122 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:39:49.194 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:39:49.199 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:39:49.205 [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.

2018-07-03 16:40:53.122 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.49:80

2018-07-03 16:40:53.199 [ERROR] [l.internal.messaging.saaj.client.p2p] - SAAJ0008: Bad Response; Not Found

2018-07-03 16:40:53.202 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:192.168.1.49, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found

2018-07-03 16:40:53.206 [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.



(Skinah) #339

You need to change the way onvif port to 8080 to match the settings of your camera. U have port 80 selected


(Fernando Gomes) #340

After update from ipcamera-12-06-2018.zip, the image from camera binding is broken, but if I enable debug log, appears to work:

2018-07-05 22:08:30.667 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.1.53, URL:/webcapture.jpg?command=snap&channel=1
2018-07-05 22:08:30.667 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Just locked in main1
2018-07-05 22:08:30.668 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Just unlocked main1
2018-07-05 22:08:30.671 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created… 1 channels tracked (some of these may be closed).
2018-07-05 22:08:30.674 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Trying to lock in main2
2018-07-05 22:08:30.675 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Just locked in main2
2018-07-05 22:08:30.675 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Just unlocked in main2
2018-07-05 22:08:30.676 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:0 GET:/webcapture.jpg?command=snap&channel=1
2018-07-05 22:08:30.771 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel marked as closing, channel:0 URL:/webcapture.jpg?command=snap&channel=1
2018-07-05 22:08:31.182 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has no Content-Length header, we have to guess how much RAM.
2018-07-05 22:08:31.186 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - handlerremover trying to lock
2018-07-05 22:08:31.188 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - handlerremover has lock
2018-07-05 22:08:31.189 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 URL:/webcapture.jpg?command=snap&channel=1
2018-07-05 22:08:31.190 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - handlerremover trying to unlock
2018-07-05 22:08:31.191 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - handlerremover has unlocked
2018-07-05 22:08:31.192 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler. URL:/webcapture.jpg?command=snap&channel=1

Anyone can help?

Best Regards,