IpCamera: New IP Camera Binding

matt1,

With the polling set at 1 sec, the motion alarm has been working very reliable for close to 24 hours now. Thank you for all the work you put it the binding! Could you add a one or two sentences regarding the correlation between the polling period and the motion alarm to the first message of this thread and the read me file? It could help to avoid confusion similar to what I had.

With pointer from you and Timmi, I see the various values for IMAGE_UPDATE_EVENTS. If I set the value to 4 (refresh image during motion alarm), there is strange behavior, after couple of minutes of updates, the image no longer update when I click on the UpdateImageNow switch. Here’s the log immediately after clicking on the switch (note that motion alarm continues to work, but image is no longer refreshed):

2018-12-27 22:02:44.225 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.0.185,    URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.230 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 2 channels tracked (some of these may be closed).
2018-12-27 22:02:44.237 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.240 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:2   GET:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.268 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - 401: Normal for DIGEST authorization.  URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.271 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - 401: Mark as closing, the  channel:2   GET:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.277 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Resending using a fresh DIGEST         URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.280 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.0.185,    URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.287 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 3 channels tracked (some of these may be closed).
2018-12-27 22:02:44.293 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.298 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:3   GET:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.304 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Login to AMC01857529401DFB3",qop="auth",nonce="2109503158",opaque="c030d02c0c128144ebfd5edcf11b54ffad75c010"
Connection: close
CONTENT-LENGTH: 0
2018-12-27 22:02:44.308 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel marked as closing, channel:2   URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.311 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - EmptyLastHttpContent
2018-12-27 22:02:44.314 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent some kind of message.Bytes=0
2018-12-27 22:02:44.317 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent last part of the message.Bytes=0
2018-12-27 22:02:44.320 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2   URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.324 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:3   URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.326 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler.           URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:44.327 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler.           URL:/cgi-bin/snapshot.cgi?channel=0

2018-12-27 22:02:53.781 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - !!!! Channel was found idle for more than 15 seconds so closing it down
2018-12-27 22:02:53.784 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - EmptyLastHttpContent
2018-12-27 22:02:53.786 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent some kind of message.Bytes=0
2018-12-27 22:02:53.787 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent last part of the message.Bytes=0
2018-12-27 22:02:53.789 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:1   URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:53.791 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler.           URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.683 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - The alarm checking stream was not running, going to clean channels and re-start it now.
2018-12-27 22:02:54.686 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - ******** Cleaning channels for camera at 192.168.0.185 *********
2018-12-27 22:02:54.687 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Clean channels is now locked
2018-12-27 22:02:54.689 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.691 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.692 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:54.694 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is -1 for URL:/cgi-bin/snapshot.cgi?channel=0
2018-12-27 22:02:54.696 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Clean channels is now unlocking
2018-12-27 22:02:54.697 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.0.185,    URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.700 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 0 channels tracked (some of these may be closed).
2018-12-27 22:02:54.705 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.707 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:0   GET:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.732 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - 401: Normal for DIGEST authorization.  URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.735 [DEBUG] [ipcamera.internal.MyNettyAuthHandler] - 401: Mark as closing, the  channel:0   GET:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.737 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Resending using a fresh DIGEST         URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.739 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.0.185,    URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.742 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 1 channels tracked (some of these may be closed).
2018-12-27 22:02:54.746 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for    GET:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.747 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:1   GET:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.750 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Login to AMC01857529401DFB3",qop="auth",nonce="368394585",opaque="c030d02c0c128144ebfd5edcf11b54ffad75c010"
Connection: close
CONTENT-LENGTH: 0
2018-12-27 22:02:54.753 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel marked as closing, channel:0   URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.755 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - EmptyLastHttpContent
2018-12-27 22:02:54.757 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent some kind of message.Bytes=0
2018-12-27 22:02:54.758 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent last part of the message.Bytes=0
2018-12-27 22:02:54.760 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0   URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.762 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler.           URL:/cgi-bin/eventManager.cgi?action=attach&codes=[All]
2018-12-27 22:02:54.763 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 2099 16:00:00 GMT
Connection: Keep-Alive
Content-Type: multipart/x-mixed-replace; boundary=myboundary
2018-12-27 22:02:54.766 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Packet back from camera is multipart
2018-12-27 22:02:54.767 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Packet back from camera is HttpMessage
2018-12-27 22:02:54.770 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 188, cap: 188/188, unwrapped: PooledUnsafeDirectByteBuf(ridx: 188, widx: 188, cap: 1024)), decoderResult: success)
2018-12-27 22:02:54.771 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Camera has sent some kind of message.Bytes=0
2018-12-27 22:02:54.774 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is        :HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 2099 16:00:00 GMT
Connection: Keep-Alive
Content-Type: multipart/x-mixed-replace; boundary=myboundary

Here’s the updated code that matt1 posted:


and

When motion alarmed is triggered, the scripts retrieve x number of snapshots and send it to email.

I see this as a bug as I would prefer things work without needing to read a manual and do work arounds. I will have to find some time to consider how best to handle it, perhaps when the channel closes I can detect that and auto restart it giving full freedom to setting the poll time as you wish.

I’ll take a look at your log later in more depth but I do not see anything at a quick glance. I have not tested that part of the code in a while so may pay for me to test it.

New build “29-12-2018 Take 3” is now available and needs testing under multiple brands for the following changes. I have tested it for a few hours with Dahua cameras only and all seems ok. Older builds are also at the download link should u need to roll back.

  • Fixes for @yfaway who reported a bug where Dahua and Hikvision cameras would not update the snapshot if the bindings setting was set to only update on start or during alarm events. Please report any bugs that occur when these options are selected as there are many alarm types and testing each one starts and stops updating the picture will take time to look for bugs.

  • Binding only closes a channel to the camera if it idles for more than 30 seconds instead of previous 15 seconds. May help Dahua alarm streams to stay open for longer, or it may cause issues.

  • Changes to Dahua alarm detection.

1 Like

Will try with my Hik cameras this evening, thank you.

@matt1

thank you for the hints.
It turned out that the notification via Telegram was much easier than I thought. The Image item can be included directly in the Telegram “Send” command.
Here a copy from the documentation of the “Telegram Action”

rule "Send telegram with Image Item image and caption"
when
    Item Webcam_Image changed
then
    sendTelegramPhoto("bot1", Webcam_Image.state.toFullString, "sent from openHAB")
end

I use this approach for sending an image when motion alarm was triggered.

2 Likes

I had a chance to spend some more time with my Lorex cameras and the IP camera binding and I still can’t get the snapshot image to update in the PaperUI control or HABPanel, unless I run the CGI URL first.

The other thing I can’t seem to get to work is using the built-in camera motion detector and PIR detectors to cause the image to update. Both those sensors will however, send me an email using the built-in Lorex email service.

I was able to write this rule to use a motion sensor on my DSC alarm system to take 5 consecutive snapshots and email them to me.

import java.util.List

rule "Cam Pic"

when

        Item Zone3_ZoneStatus changed from CLOSED to OPEN

then
     
	var i = 0
	while ((i=i+1) < 6) 
        {
        sendHttpGetRequest("http://admin:xxxxxx@192.168.2.21/snapshot.cgi?user=admin&pwd=xxxxx&strm=0")
        executeCommandLine("wget http://admin:xxxxx@192.168.2.21/snapshot.jpg -O /tmp/snapshot" + i + ".jpg")
        Thread::sleep(2000)
	    }


        val List<String> attachmentUrlList = newArrayList(
                "file:///tmp/snapshot1.jpg",
                "file:///tmp/snapshot2.jpg",
                "file:///tmp/snapshot3.jpg",
                "file:///tmp/snapshot4.jpg",
                "file:///tmp/snapshot5.jpg")

        sendMail("xxxxx@gmail.com", "Motion", "Motion Has Been Detected", attachmentUrlList)

end

Unfortunately I can’t seem to add my Hik cameras, when I try to add one as a thing I just get ERROR: 500 - Request failed. I’m running OH Mac 2.4.0 and ipcamera29-12-2018-Take3 here’s my log:

Caused by: java.lang.ClassNotFoundException: javax.xml.soap.SOAPException cannot be found by org.openhab.binding.ipcamera_2.4.0.201812291002
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
at org.openhab.binding.ipcamera.internal.IpCameraHandlerFactory.supportsThingType(IpCameraHandlerFactory.java:34) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.createThingOfType(ThingRegistryImpl.java:247) ~[?:?]
at org.eclipse.smarthome.io.rest.core.internal.thing.ThingResource.create(ThingResource.java:207) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[?:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) ~[?:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[?:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[?:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[?:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[?:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) ~[?:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) ~[?:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) ~[?:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) ~[?:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) ~[?:?]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[?:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
... 10 more

New build 31-12-2018 has following changes:

  • Bug fixed for Hikvision reported by @JSamijn where the intrusion and PIR alarms would turn on but not back off.
  • HIK Fixes for updating snapshot when events are occuring.
  • Improvement for when the polling time is longer then the time the alarm it triggered for, this ensures a snapshot is not missed when the setting is to only take snapshots during alarms.
  • Dahua + Amcrest fixes for when NVR setting was > 0 alarm controls would not refresh correctly.
  • Amcrest multiple fixes for audio alarm controls now refresh.

@keiron1992
I have tested it with Hikvision cameras today and found no issues that would stop it from working. If you are new to openhab I would suggest you check for typos if you did textual config. Also try giving the binding the wrong ONVIF port deliberately as SOAP is related to ONVIF and that is mentioned in your log… Perhaps you did not enable ONVIF? this is mentioned in the first post of this thread and has a video on how to enable it.

Hi @matt1,

Could you find time to implement - Dahua Output control -https://github.com/Skinah/IpCamera/issues/15

Br
K

Hello @matt1 , congratulations for the work done.
Can a camera with RTSP be integrated?

Sure it can be added, it is just not simple, will have way more support requests and the best way may be to add a new feature to the openhab framework. Snapshots are low bandwidth low cpu and just work with most cameras.

https://github.com/Skinah/IpCamera/issues/22

Thank you for your reply, I will read it carefully.
An advice
I have a video camera with low cost Sricam SP019, to do some tests after I wanted to buy 5 to control the children, that I wanted to integrate with OH, what do you advise me to do?
I need the night, rotation, zoom, preset, low cost.
I did some tests, with CMSClient it works well with all the features (I have not tried presets) but with ispy I only see the image while PLZ does not work, maybe I’m wrong.
I am available to do any tests.

Aggiunta:
Con ONVIF Device Manager funziona sia video che PLZ, spesso si vede il messaggio di connessione caduta
rtsp://ipXXXXXX:554/onvif1

My advise is don’t buy super cheap no name cameras and buy the ones which have an api and this binding was written for. If you need PTZ features I would look at Amcrest cameras as I know they work.

Hello,

Thank you for this binding. I am using OH for knx and Sonos. I would like to add my Hikvision camerass to it. So this binding looks perfect for it.

Thank you

Read the first post or the readme… hint, TRACE.

First of all, thanks for all the effort put into this binding.

I am just starting to use it with a Dahua PTZ camera, but I have some issue in combination with Habpanel and am wondering if anyone has similar experience.
In Habpanel I use an image widget where the source is set to an OH image item from the cam image. The image is displayed, however on each refresh a warning message is generated: org.eclipse.jetty.http.HttpParser ] - URI is too large >8192

When checking the HTTP source the URI contains the complete image ( size approx. 32KiB )

I wonder why the Jetty HTTP parser complains: I would expect the only one parsing the URI would be the browser.

When viewing the cam image in basic UI the URI is also 32KiB, hoewever no warning message is generated. What is the difference here between basic UI and habpanel ?

Any suggestions welcome.

This is not to do with the binding as the binding only sends to the image item and this happens all the time even when the UI is closed. The openhab framework is responsible to display the image to the UI so a new thread should be opened for this as it may be a bug in the openhab framework.

See

Works with HIKVISION DS-2CD2383G0-I with paperUI and with manual code (not exactly the same code as in the readme code).
Also works with truvision cam (rebranded hikvision as far as I know).

Thank you matt1.

1 Like

Thank for great binding!
I see that some people complain about that as well

My logs are full of this update, anyway to stop that ?
2019-01-05 20:54:08.011 [vent.ItemStateChangedEvent] - FC_Image changed from raw type (image/jpeg): 220959 bytes to raw type (image/jpeg): 220661 bytes

2019-01-05 20:54:12.909 [vent.ItemStateChangedEvent] - ipcamera_DAHUA_d7318bdd_image changed from raw type (image/jpeg): 220661 bytes to raw type (image/jpeg): 220293 bytes

2019-01-05 20:54:12.960 [vent.ItemStateChangedEvent] - FC_Image changed from raw type (image/jpeg): 220661 bytes to raw type (image/jpeg): 220293 bytes

2019-01-05 20:54:17.858 [vent.ItemStateChangedEvent] - ipcamera_DAHUA_d7318bdd_image changed from raw type (image/jpeg): 220293 bytes to raw type (image/jpeg): 220432 bytes

2019-01-05 20:54:17.905 [vent.ItemStateChangedEvent] - FC_Image changed from raw type (image/jpeg): 220293 bytes to raw type (image/jpeg): 220432 bytes

2019-01-05 20:54:22.955 [vent.ItemStateChangedEvent] - ipcamera_DAHUA_d7318bdd_image changed from raw type (image/jpeg): 220432 bytes to raw type (image/jpeg): 219994 bytes

2019-01-05 20:54:23.033 [vent.ItemStateChangedEvent] - FC_Image changed from raw type (image/jpeg): 220432 bytes to raw type (image/jpeg): 219994 bytes