Reolink updates Learn More
Meet Reolink at IFA 2024! Learn More
Reolink Q&A Learn More
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Greetings. Given my disgust with Reolink not providing any API documentation I started trying to uncover some things myself. I found the following link which mentions a few examples of how to query for a list of recordings from the API.https://reolink.com/wp-content/uploads/2017/01/Reolink-CGI-command-v1.61.pdfI was able to use the instructions to successfully query my RLC-410-5MP for its list of recordings using the google advanced rest client. I was able to query the exact name of each file as shown in the document.Next I started a wireshark packet capture and performed a web login using firefox to one of my cameras. Wireshark was able to capture a number of calls to the api.cgi file that are able to query a good amount of information. The commands I've been able to document so far all follow the standard shown below and require being sent as a POST header as shown in the documentation.http://xx.xx.xx.xx/cgi-bin/api.cgi?cmd=GetAbility&rs=test&user=username&password=passwordSnapSearchGetAbilityGetIrLightsGetDevInfoGetLocalLinkGetOsdGetEncGetImageGetIspA few of these commands require you to also include some additional parameters in the body of the POST request usually to specify the channel to query. GetOsd is one such example.[{ "cmd":"GetOsd", "action":0, "param":{ "channel": 0 } }]You can peck around by changing the URL. I've tried various things like cmd=Status and things like that, but so far have come up blank. You'll know if you find something that works because the response will be something different than "cmd" : "Unknown". My purpose behind this is to find how to query to determine if the camera has recently detected motion so I can integrate that into HomeAssistant.Reolink's lack of documentation around the API is ridiculous in this day and age. The fact that a customer who has purchased multiple cameras is having to result to packet sniffing across a network is not good. Hopefully this thread can become the start of a community based documentation that Reolink doesn't seem to be willing to provide.
Another interesting query:http://xx.xx.xx.xx/cgi-bin/api.cgi?cmd=GetAlarm&rs=test&user=user&password=passwordPOST Body:[{ "cmd":"GetAlarm", "action":1, "param":{ "Alarm":{ "channel": 0, "type": "md" } } }]Output: (notice the interesting ASCII art of my actual motion detection mask)[ { "cmd" : "GetAlarm", "code" : 0, "initial" : { "Alarm" : { "action" : { "mail" : 1, "push" : 1, "recChannel" : [ 0 ] }, "channel" : 0, "enable" : 1, "schedule" : { "table" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, "scope" : { "cols" : 80, "rows" : 60, "table" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, "sens" : [ { "beginHour" : 0, "beginMin" : 0, "endHour" : 6, "endMin" : 0, "sensitivity" : 10 }, { "beginHour" : 6, "beginMin" : 0, "endHour" : 12, "endMin" : 0, "sensitivity" : 10 }, { "beginHour" : 12, "beginMin" : 0, "endHour" : 18, "endMin" : 0, "sensitivity" : 10 }, { "beginHour" : 18, "beginMin" : 0, "endHour" : 23, "endMin" : 59, "sensitivity" : 10 } ], "type" : "md" } }, "range" : { "Alarm" : { "action" : { "mail" : "boolean", "push" : "boolean", "recChannel" : [ 0 ] }, "channel" : 0, "enable" : "boolean", "schedule" : { "table" : { "maxLen" : 168, "minLen" : 168 } }, "scope" : { "cols" : { "max" : 80, "min" : 80 }, "rows" : { "max" : 60, "min" : 60 }, "table" : { "maxLen" : 6399 } }, "sens" : [ { "beginHour" : { "max" : 23, "min" : 0 }, "beginMin" : { "max" : 59, "min" : 0 }, "endHour" : { "max" : 23, "min" : 0 }, "endMin" : { "max" : 59, "min" : 0 }, "id" : 0, "sensitivity" : { "max" : 50, "min" : 1 } }, { "beginHour" : { "max" : 23, "min" : 0 }, "beginMin" : { "max" : 59, "min" : 0 }, "endHour" : { "max" : 23, "min" : 0 }, "endMin" : { "max" : 59, "min" : 0 }, "id" : 1, "sensitivity" : { "max" : 50, "min" : 1 } }, { "beginHour" : { "max" : 23, "min" : 0 }, "beginMin" : { "max" : 59, "min" : 0 }, "endHour" : { "max" : 23, "min" : 0 }, "endMin" : { "max" : 59, "min" : 0 }, "id" : 2, "sensitivity" : { "max" : 50, "min" : 1 } }, { "beginHour" : { "max" : 23, "min" : 0 }, "beginMin" : { "max" : 59, "min" : 0 }, "endHour" : { "max" : 23, "min" : 0 }, "endMin" : { "max" : 59, "min" : 0 }, "id" : 3, "sensitivity" : { "max" : 50, "min" : 1 } } ], "type" : "md" } }, "value" : { "Alarm" : { "action" : { "mail" : 1, "push" : 1, "recChannel" : [ 0 ] }, "channel" : 0, "enable" : 1, "schedule" : { "table" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, "scope" : { "cols" : 80, "rows" : 60, "table" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111100000000000000000000000000000000000000000000000000000111111111111111111111111111111111111000000000000000000000000000000000000000011111111111111111111111111111111111111111111100000000000000000000000000000011111111111111111111111111111111111111111111111111111100000000000000000000000011111111111111111111111111111111111111111111111111111111110000000000000000001111111111111111111111111111111111111111111111111111111111111111000000000011111111111111111111111111111111111111111111111111111111111111111111111111000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, "sens" : [ { "beginHour" : 0, "beginMin" : 0, "endHour" : 6, "endMin" : 0, "id" : 0, "sensitivity" : 25 }, { "beginHour" : 6, "beginMin" : 0, "endHour" : 12, "endMin" : 0, "id" : 1, "sensitivity" : 25 }, { "beginHour" : 12, "beginMin" : 0, "endHour" : 18, "endMin" : 0, "id" : 2, "sensitivity" : 25 }, { "beginHour" : 18, "beginMin" : 0, "endHour" : 23, "endMin" : 59, "id" : 3, "sensitivity" : 25 } ], "type" : "md" } } }]
Another example for those of you needing to reboot your cameras remotely. A simple call to the url below will initiate an immediate reboot assuming the webserver on the camera is still working. Also, it doesn't appear to matter what url you actually call, as in my example below I called foobar.cgi and was able to issue an API call to get the performance counters (CPU and codec rate). You can even call these by just pasting the URL into your browser or calling with CURL or wget as they don't take any input...easy!http://xx.xx.xx.xx/cgi-bin/api.cgi?cmd=Reboot&rs=test&user=user&password=passwordhttp://xx.xx.xx.xx/foobar.cgi?cmd=GetPerformance&rs=test&user=user&password=password
Dear rhatguyThank you for you API insights & discoveryAPI documentation should be indeed mandatory & open!!We will test those call one on Argus Pro modelBut before do you know what variable is expected into the rs variable ?Thanks
The RS variable doesn't appear to be used. You can put anything you want in it.
This api calls working with Argus series? I try some, but no success...
suto: unfortunately I don't have any details about the Argus as I don't own any. Also unfortunately I've been unsuccessful in my ultimate goal of finding a page that simply tells if the camera has recently detected motion. Seems like such a basic function that is addressed simply in many of the access methods, but alas I haven't been able to find a way to query it.
Great idea!!!Is there any way to integrate motion notifications using these commands i.e. by creating command line sensor in Home Assistant? I came across some that works with different camera but if possible below could be modified:
– platform: command_linename: “camera bedroom motion”device_class: switchcommand: curl -k –silent “http://:/get_status.cgi?loginuse=&loginpas=” | grep -oP “(alarm_status=).*?(;)”value_template: >-{%- if value == “alarm_status=0;” -%}off{%- elif value == “alarm_status=1;” -%}on{%- endif -%}scan_interval: 1.5
Unfortunately there doesn't seem to be a "get_status" url that anyone has been able to find or that Reolink will let us know about. It seems like a very basic function, but with no API documentation and no way to find what functions the camera supports, we're left to either sniff the network or try to break open a firmware file to understand what functionality is actually there.
This is why I'm getting more and more dissappointed with Reolink, pretty basic stuff is missing!!! Shame on you Reolink.
Same here, really need some basic API calls to enable/disable E-mail alerts, FTP uploads and Alarm sound.Reolink, if you're reading this, the cameras are good, but you need to step up the game on integration and fast, everything's connected these days.
Hi all, thanks so much for all your good suggestions and ideas.We will collect and forward all your great ideas to our senior engineer for future development.
They say this alot, but never seem to act on anything said. API Documentation, a must. HTML5 Support (or a Flash Replacement) a Must.
Sorry for the inconvenience. We will use the HTML5 to place the Flash. And we are working hard on this and will finish this update by the end of the year.
old post but did help me sort out the search command from that PDF ...github.c0m/freeload101/SCRIPTS/blob/master/Bash/Reolink%20API%20Full%204K.bash
Welcome Back!
Hi there! Join the Commnunity to get all the latest news, tips and more!