I wanted to share with you how I use Reolink in Domoticz.
So Here I'm.
Sorry if my english is not perfect.
I didn't know Reolink in the past, I was looking for Dlink, Hikvision, Foscam, etc.. and I saw the Reolink RLC-420 (2 pack).
For the price they are really good and I confirmed they do the job.
As you can see I bought 4.

I was looking for the CGI commands and found only this :
How to Capture Live JPEG Image of Reolink Cameras via Web Browsers : https://support.reolink.com/hc/en-us/ar ... b-Browsers
I will show you how to use all cgi commands.
Introduction
First you need a token to auth.
Code: Select all
url = cgi-bin/api.cgi?cmd=Login&token=null
payload = [{"cmd":"Login","action":0,"param":{"User":{"userName":"youruser","password":"yourpassword"}}}]
Exemple:
Code: Select all
url = cgi-bin/api.cgi?cmd=SetAlarm&token=azeazeaz65454
payload = [{"cmd":"SetAlarm","action":1,"param":{"Alarm":{"channel":0,"type":"md","sens":[{"beginHour":0,"endHour":23,"beginMin":0,"endMin":59,"id":0,"sensitivity":21},{"beginHour":23,"endHour":23,"beginMin":59,"endMin":59,"id":1,"sensitivity":21},{"beginHour":23,"endHour":23,"beginMin":59,"endMin":59,"id":2,"sensitivity":21},{"beginHour":23,"endHour":23,"beginMin":59,"endMin":59,"id":3,"sensitivity":21}]}}}]

Script
PHP script to turn on/off email and push notifications: https://drive.google.com/open?id=1b-2iu ... hOGqW-T4vu
This script is made for my use and write in 5min. You can use others technologies or/and improve it for you use. First I wanted only email notifications and in a second time I added push notifications.
Practice
How I use my script on Domoticz.
My domoticz is installed on my synology, so my apache too.
I can access to my script by url:
Code: Select all
Turn on email
http://yoursynologyip:apacheport/?ip=ipofthecamera&method=enableMotionEmail&action=1
Turn off email
http://yoursynologyip:apacheport/?ip=ipofthecamera&method=enableMotionEmail&action=0
apacheport = apache port.
ipofthecamera = ip of the camera, you need to associate the MAC adress to a static ip.
Create a virtual on/off switch and put the url on Action on and off

Now you can do what you want.
When I leave my house all cameras notifications turn on with my mobile position or scenario.
Same when I come home.