I have had a look at the code for the HikvisionHandler and so far as I can tell (I am far from a practised Java coder) for each EventNotification stanza received, there should be a TRACE message of “HTTP Result back from camera is…”.
But I am seeing nothing. Wireshark seems to confirm no continuous traffic to openhab. On closing openhab, I see that the status is 0 for the alertStream. The documentation indicates that 0 is a stream closing, but my suspicion is that it is already closed.
There is an entry in the logs which indicate that the alertstream is re-starting, but no recorded confirmation of successfull re-start in the logs
.
This is a log from close down to restart. A large number of /picture/ logs have been removed.
//openhab closing down
2020-03-28 15:20:03.722 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 1 for URL:/ISAPI/Streaming/channels/101/picture
2020-03-28 15:20:03.796 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 1 for URL:/ISAPI/Streaming/channels/101/picture
2020-03-28 15:20:03.796 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 1 for URL:/ISAPI/Streaming/channels/101/picture
2020-03-28 15:20:03.797 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 0 for URL:/ISAPI/Event/notification/alertStream
2020-03-28 15:20:03.797 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Channel status is 0 for URL:/ISAPI/System/IO/inputs/1/status
//openhab restart
2020-03-28 15:20:51.600 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'camera.items'
2020-03-28 15:20:52.861 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'camera.things'
2020-03-28 15:21:02.706 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'camera.rules'
2020-03-28 15:21:18.890 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - The SERVER_PORT = -1 which disables a lot of features. See readme for more info.
2020-03-28 15:21:19.891 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:192.168.1.212:80
2020-03-28 15:21:19.989 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:20.068 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - We got an ONVIF error404:<!DOCTYPE html>
2020-03-28 15:21:20.209 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.1.212 is now online.
2020-03-28 15:21:20.255 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:20.290 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2020-03-28 15:21:20.294 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:20.301 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 178, cap: 178/178, unwrapped: PooledUnsafeDirectByteBuf(ridx: 612, widx: 612, cap: 1024)), decoderResult: success)
2020-03-28 15:21:20.303 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is :<!DOCTYPE html>
2020-03-28 15:21:20.310 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2020-03-28 15:21:20.311 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 178, cap: 178/178, unwrapped: PooledUnsafeDirectByteBuf(ridx: 612, widx: 612, cap: 1024)), decoderResult: success)
***********LARGE NUMBER of 101/picture requests
2020-03-28 15:21:24.176 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:24.179 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2020-03-28 15:21:24.180 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 178, cap: 178/178, unwrapped: PooledUnsafeDirectByteBuf(ridx: 612, widx: 612, cap: 1024)), decoderResult: success)
2020-03-28 15:21:24.181 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is :<!DOCTYPE html>
2020-03-28 15:21:24.207 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:24.209 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:24.210 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
2020-03-28 15:21:24.211 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 178, cap: 178/178, unwrapped: PooledUnsafeDirectByteBuf(ridx: 612, widx: 612, cap: 1024)), decoderResult: success)
2020-03-28 15:21:24.211 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - HTTP Result back from camera is :<!DOCTYPE html>
2020-03-28 15:21:24.214 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - The alarm stream was not running for camera 192.168.1.212, re-starting it now
2020-03-28 15:21:24.215 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Event/notification/alertStream
2020-03-28 15:21:24.217 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
2020-03-28 15:21:24.219 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.212/ISAPI/Streaming/channels/101/picture
I have probably done as much as I can in diagnostics and testing with available logfile information.