Hi,
I’m starting with my new “sub-project” to integrate an IP camera into OH3 (running on an Raspberry 4B). The IP cam is a Reolink RLC-410W. The support docs say, that this model supports CGI, ONVIF and RTSP.
Unfortunately, I’m struggling with the integration since two days now, and have currently no idea. In a first step, I want to integrate a motion detection and a stream into OH3.
My first approach was to do the integration like for other device via text files (.things, .items). After one day without any success, I’m using web UI for an more agile approach (trial and error). But even by this way, I only run into errors
Things
UID: ipcamera:onvif:c2285df369
label: ONVIF IP Camera
thingTypeUID: ipcamera:onvif
configuration:
mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
ipAddress: 192.168.xx.xx
updateImageWhen: "0"
onvifPort: 8000
gifPreroll: 0
ffmpegLocation: /usr/bin/ffmpeg
serverPort: 9997
ffmpegOutput: /etc/openhab/html/camera1/
ipWhitelist: DISABLE
mp4OutOptions: -c:v copy -c:a copy
pollTime: 1000
password: xxxxxxxx
port: 80
snapshotOptions: -an -vsync vfr -q:v 2 -update 1
ptzContinuous: false
onvifMediaProfile: 0
username: admin
hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
-hls_flags delete_segments -hls_time 2 -hls_list_size 4
gifOutOptions: -r 2 -filter_complex
scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse
ffmpegInput: rtsp://192.168.xx.xx:554/h264Preview_01_main
Additionally I’ve create some test channels and linked them to items, which are used by widgets in Habpanel and Sitemap.
Example: Motion Detection
In Habpanel I use a switch and dummy widget for the status of the respective motion detection item. But when I dance in front of the IP cam, nothing happens. Only the openhab.log file is flooded with the following two lines:
2021-04-21 21:39:37.099 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:onvif:c2285df369 tried updating channel cellMotionAlarm although the handler was already disposed.
2021-04-21 21:39:37.167 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:onvif:c2285df369 tried updating channel lastMotionType although the handler was already disposed.
Has anyone some ideas to push me into the right direction?
Amendment: After reading many IP cam topics here, I’m now more confused, cause by the possibility for other solutions (e.g. HTTP Binding, Zoneminder Binding, etc.) => What are the different advantages/disadvantages for IP cams in OH3.
Thanks in advance!