Hi All,
Today I started adding the Reolink API into the ipcamera binding and wish to find people that are capable/willing to test and provide TRACE level logs to show what is wrong since I do not own a camera of this brand. Feature requests are welcome so long as you look through the API documentation to see if it is possible first, and then if possible post some output from your camera when you use the url with curl, or the Google Advanced REST client. They need to be POST and have the http headers that the API outlines for it to work.
Reolink API V8 April 2023 is found here:
Reolink Camera API User Guide_V8 (Updated in April 2023) | Reolink Community
To test you can use curl commands in your linux terminal like this:
curl -k -H 'Content-Type:application/json' -X POST -d '[{"cmd":"Login", "param":{ "User":{ "Version": "0", "userName":"youUserNameHere", "password":"yourPasswordHere"}}}]' http://CameraIPhere/api.cgi?cmd=Login&token=null
To use the alpha/beta version of the binding you need to do the following:
- Uninstall the merged binding
- drop the unzipped jar file into the addons folder
- install the
tellstick
binding to provide the dependency libraries that this binding needs. - Pause or Delete your existing camera thing if it is already setup and try using the auto discovery to find the camera.
- Add the camera as a āreolinkā thing type if not auto found, and set the nvr channel config correctly.
If you opt to just pause your working camera, you may find it does not get auto found and you will be able to setup manually a new reolink thing. This way you can switch between the working ONVIF thing and the newer REOLINK thing just by pausing and unpausing the one you wish to use. If it works then there is little reason to go back to ONVIF.
Because it is alpha/beta, as new channels get added, you will need to delete and re-add the thing to be able to see and use the new channels, but this will only apply to reolink thing types, you can leave any other types alone.
Main source code is found in the PR here:
[ipcamera] Add Reolink API support by Skinah Ā· Pull Request #14728 Ā· openhab/openhab-addons (github.com)
Whats new and needs testing?
Please report back if you try a feature and it works so I can tick them off and get this ready to be merged with a PR.
- Auto Discovery and gets found as a Reolink thing type. Needs testing.
- No need to provide URLS and the NVR channel config allows it to work behind a NVR. Needs testing.
- humanAlarm Human AI detection. Tested to work.
- carAlarm Vehicle AI detection. Needs testing.
- animalAlarm Dog and Cat AI detection. Needs testing.
- faceDetected Face AI detection. Needs testing.
- activateAlarmOutput triggers the Siren in the camera. Needs testing.
- enableLED Controls the white LED of the camera. Needs testing.
- autoLED Controls the IR LED to OFF or AUTO. Needs testing.
- enableAudioAlarm controls the audio alarm ON/OFF/Threshold. Needs testing.
- enableMotionAlarm should turn motion on and off but I need the json packet tested with curl first.
- enableFTP controls the ftp uploading. Needs testing.
- enableRecordings controls the cameras internal recordings. Needs testing.