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).
Dear All,I have been using some Reolink API commands for quite a long time with no issues. I have integrated such commands in Home Assistant through cURL commands. However, I upgraded my NVR to the latest version a few days ago. Since then, some commands are still working but some are not. Specifically, I am missing the command to enable/disable PUSH notifications, which is a very useful option to be automated upon leaving and returning home.These are the commands I issued until it stopped working:TO ENABLE:
curl -H "Content-Type: application/json" -X POST -d ''[{"cmd":"SetPushV20","param":{"Push":{"enable":1}}}]'' "http://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]"
TO DISABLE:
curl -H "Content-Type: application/json" -X POST -d ''[{"cmd":"SetPushV20","param":{"Push":{"enable":0}}}]'' "http://[NVR_IP]/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]"
According to latest API version v7, these commands haven't changed. However, the response to such cURL commands is now the following:
curl: (3) bad range in URL position 2: [param:{Push:{enable:1}}] ^
Taking into the account such error, I have been trying different command parameters order. If I issue the following command, response is different (I am adding the --insecure option because it seems that Reolink new firmware accepts https requests only, and the certificate is a self-signed one):
curl -X POST -H "Content-Type : application/json" -d "[{"cmd": "SetPushV20","param": {"Push": {"enable": 1}}}]" "https://[NVR_IP]/cgi-bin/api.cgi?cmd=SetPushV20&user=admin&password=[PASSWORD]" --insecure
RESPONSE:
[ { "cmd" : "SetPushV20", "code" : 1, "error" : { "detail" : "please login first", "rspCode" : -6 } } ]
It seems this command works. But, response is asking to login first, although the credentials are passed in the command in the same way it used to work before latest firmware upgrade. I know there is a TOKEN option, but I'd rather to use the "short-session" access option, because it is more convenient for the purpose. Nevertheless, I have tried the token option and behaviour is the same.In order to compare with another command, the response of the following command is fine:
curl "https://192.168.0.55/api.cgi?cmd=GetPushV20&user=admin&password=Cabanillas2015" --insecure
[ { "cmd" : "GetPushV20", "code" : 0, "value" : { "Push" : { "enable" : 0, "schedule" : { "channel" : 0, "table" : { "AI_DOG_CAT" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "AI_PEOPLE" : "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "AI_VEHICLE" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "MD" : "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "scheduleEnable" : 1 } } } ]
As you can see, the command response is the expected, and no "please loging first" message is issued, so I think there is a specific issue with certain commands, or the SetPushV20 one at least.Typing some NVR information below for reference:NVR Model: RLN8-410NVR Hardware Version: N2MB02Config Version: v3.0.0.0Firmware Version: v.3.1.0.211_22102413For the moment, I think I will downgrade the NVR, because this feature is quite important for me.In the meantime, is anyone experiencing the same problem? Any way to fix this, please?Thanks in advanced.Sésar
Welcome Back!
Hi there! Join the Commnunity to get all the latest news, tips and more!