Moving my quest on GitHub Issue #41 @ipCamera to the forums to not only bother poor Matt and maybe get some more help from the community.
I’m using OH2.5 on RPi4_4GB using Openhabian on SD card.
I’m only using the bindings
- ipcamera
- network
- expire
- astro
I have two HIKVISION DS-2CD2T46G1-4I/SL cameras deployed working properly through their own web interface as well as through my Synology Surveillance Station.
My situation:
ipcamera is working fine for some time. It does properly react to updateImageNow or updateGif. I have simple rules setup which detect the SMART alarm states, trigger a GIF creation and send this through Pushover. I have setup a Habpanel to manually trigger alarms or the updateImageNow or updateGif switches for testing.
Turning log:level to DEBUG on ipcamera you can see, that in this normal state the following statements occur:
2019-12-26 14:01:02.587 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.101/ISAPI/Streaming/channels/101/picture
2019-12-26 14:01:02.587 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET: http://192.168.1.100/ISAPI/Streaming/channels/101/picture
My issue:
However, after an apparently random time passing, typically a few hours, one of the camera stops updating and get’s stuck - followed by the other one after some additional random time (up 12-20 hours later).
Taking a look at the OH logs, you no longer see the GET requests for the cameras (or just for one, if the other is “stuck”).
In this state, triggering the switches [e.g. through Habpanel] does not do anything. E.g. when triggering updateGif the snapshot files in the local folder do not change.
What i have tried / had a look at:
- Looking at the OH log end Eventlog. There’s no hint towards errors (except for an IOException, but this does not occure every time:
2019-12-26 12:12:47.358 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - !!! Camera has closed the channel URL:/ISAPI/Streaming/channels/101/picture Cause reported is: {} java.io.IOException: Connection reset by peer
- Matt has also hinted me in the direction of checking for OOM problems. However, nothing like that in the logs. I increased Xmx just to be on the safe side to 512. This did not solve the issue.
- SYSLOG does not show a crash or something related to OH [karaf].
I’m happy for any suggestion of what to check next.
One idea:
Is there any reason, why any of the polling threads, that ipcamera binding creates, could stop or be stopped? Can i diagnose something like this (java threads being aborted or stopped, or whether they are running or not?)