Camera is an IPC-HDW2100. They are a little bit older than current generation. I tested with both firmware 2.420.0.0 (the most current I could locate) and then downgraded (due to a different issue) to 2.212.1.0 with similar results. The only different was that the /cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion URL returned “error” in 2.212.1.0 versus a 0 byte response in 2.420.0.0
When initially running the binding, I observed that I was able to use enableMotionAlarm to turn the motion detect event on and off in the camera settings. However, with it set on, I was not receiving any motion events within openHAB. I see that the motion events are being logging in the camera logs – they just don’t seem to flow to OH.
That’s great that it’s listening to the event stream and not polling. The event stream behaved as expect and returned the following with motion at the camera:
-- myboundary
Content-Type: text/plain
Content-Length:37
Code=VideoMotion;action=Start;index=0
-- myboundary
Content-Type: text/plain
Content-Length:37
Code=VideoMotion;action=Start;index=0
-- myboundary
Content-Type: text/plain
Content-Length:36
Code=VideoMotion;action=Stop;index=0
It was not necessary to remove any of the alarm codes to get the VideoMotion event, even though the camera does not support some of them.
Checking back with openHAB logs, there’s still no VideoMotion event. Only the same repeating config messages from before:
2018-08-23 10:27:30.221 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.14.229, URL:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion
2018-08-23 10:27:30.229 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 6 channels tracked (some of these may be closed).
2018-08-23 10:27:30.236 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for GET:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion
2018-08-23 10:27:30.239 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:1 GET:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion
2018-08-23 10:27:30.242 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera at IP:192.168.14.229, URL:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.251 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 6 channels tracked (some of these may be closed).
2018-08-23 10:27:30.259 [TRACE] [ipcamera.internal.MyNettyAuthHandler] - MyNettyAuthHandler is now setup for GET:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.264 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Have re-opened the closed channel:2 GET:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.632 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2018-08-23 10:27:30.635 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel marked as closing, channel:2 URL:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.639 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Packet back from camera is not matching HttpContent DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2018-08-23 10:27:30.642 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 6, cap: 6/6, unwrapped: PooledUnsafeDirectByteBuf(ridx: 103, widx: 103, cap: 1024)), decoderResult: success)
2018-08-23 10:27:30.645 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is :Error
2018-08-23 10:27:30.704 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 URL:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.707 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler. URL:/cgi-bin/configManager.cgi?action=getConfig&name=CrossLineDetection
2018-08-23 10:27:30.726 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2018-08-23 10:27:30.729 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel marked as closing, channel:1 URL:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion
2018-08-23 10:27:30.733 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Packet back from camera is not matching HttpContent DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2018-08-23 10:27:30.736 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 6, cap: 6/6, unwrapped: PooledUnsafeDirectByteBuf(ridx: 103, widx: 103, cap: 1024)), decoderResult: success)
2018-08-23 10:27:30.739 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is :Error
2018-08-23 10:27:30.744 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:1 URL:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion
2018-08-23 10:27:30.746 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Closing CommonCameraHandler. URL:/cgi-bin/configManager.cgi?action=getConfig&name=VideoMotion