mnpg / Reolink_api_documentations

Reolink API official and unofficial documentations
30 stars 5 forks source link

Reolink (PoE) doorbell API - auto_reply #1

Closed timvdsm closed 8 months ago

timvdsm commented 1 year ago

Hi, do you have any idea what would be the commands used to activate the auto_reply functions of the (PoE) doorbell?

Scherm­afbeelding 2022-12-30 om 02 30 51

Or the commands to manually send an auto-reply message (from the reolink app)?

Many thanks!

mnpg commented 1 year ago

hi @timvdsm, here are the commands i've found in the doorbell firmware : GetPowerLed

GetAudioFileList SetAudioFileList GetAudioReply SetAudioReply DeleteAudioFile

i ain't got a reolink doorbell. If you can send me the json of the commands Get** (GetAudioFileList or GetAudioReply) returns by these commands, i can help you :

In the command below, change #IP# to the IP address of the cam and#username# and #password# (an admin account credentials) by your own values and also change the command #GET# by the command `Get` called**. The URL is in https, change it to http if it doesn't work

curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"#GET#\",\"action\":1,\"param\":{\"channel\":0}}]" "https://#IP#/cgi-bin/api.cgi?user=#USERNAME#&password=#PASSWORD#"

UPDATE: i've asked Reolink (on reddit) to update their latest API Guide (The V7 released in september) to add the new commands found in the newer cameras : doorbell, trackmix or RLC-823_16X

Regards

timvdsm commented 1 year ago

Hi many thanks. I can just send this curl command in a terminal window of my macbook? Or how/where should I trigger this curl command? And where will the json be saved?

This command is correct (just need to change the username & pw off course :-)

curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"GetAudioFile\",\"action\":1,\"param\":{\"channel\":0}}]" "https://#192.168.1.106#/cgi-bin/api.cgi?user=USERNAME&password=PW"

mnpg commented 1 year ago

Yes, the command is good. Just erase the # caracters in the IP address. Waiting for your answer

UPDATE: i think that the curl command works in the mac terminal

timvdsm commented 1 year ago

[ { "cmd" : "Unknown", "code" : 1, "error" : { "detail" : "not support", "rspCode" : -9 } } ]

mnpg commented 1 year ago

Sorry, The command is GetAudioFileList

timvdsm commented 1 year ago

Sorry ... my bad :-)

[ { "cmd" : "GetAudioFileList", "code" : 0, "initial" : { "AudioFileList" : [ { "audioLen" : 3, "fileName" : "I'm sorry. I think you've knocked on the wrong door.", "fileSize" : 30720, "id" : 0, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, we will be right there. Please wait a moment.", "fileSize" : 32640, "id" : 1, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, please leave the package at the door. We will get it later.", "fileSize" : 38720, "id" : 2, "type" : "alarm" }, { "audioLen" : 5, "fileName" : "Achterlaten poortje", "fileSize" : 46080, "id" : 3, "type" : "reply" }, { "audioLen" : 3, "fileName" : "I'm sorry. I think you've knocked on the wrong door.", "fileSize" : 30720, "id" : 0, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, we will be right there. Please wait a moment.", "fileSize" : 32640, "id" : 1, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, please leave the package at the door. We will get it later.", "fileSize" : 38720, "id" : 2, "type" : "alarm" }, { "audioLen" : 5, "fileName" : "Achterlaten poortje", "fileSize" : 46080, "id" : 3, "type" : "reply" } ] }, "range" : { "AudioFileList" : { "fileNum" : 4, "id" : { "max" : 15, "min" : 0 } } }, "value" : { "AudioFileList" : [ { "audioLen" : 3, "fileName" : "I'm sorry. I think you've knocked on the wrong door.", "fileSize" : 30720, "id" : 0, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, we will be right there. Please wait a moment.", "fileSize" : 32640, "id" : 1, "type" : "alarm" }, { "audioLen" : 4, "fileName" : "Hi, please leave the package at the door. We will get it later.", "fileSize" : 38720, "id" : 2, "type" : "alarm" }, { "audioLen" : 5, "fileName" : "Achterlaten poortje", "fileSize" : 46080, "id" : 3, "type" : "reply" } ] } } ]

timvdsm commented 1 year ago

FYI: Thisone is an auto-reply I created myself ... and gave the name: "Achterlaten poortje"

"audioLen" : 5, "fileName" : "Achterlaten poortje", "fileSize" : 46080, "id" : 3, "type" : "reply"

mnpg commented 1 year ago

Ok, can you send me return json of the command GetAudioReply

timvdsm commented 1 year ago

It's GetAutoReply :-)

[ { "cmd" : "GetAutoReply", "code" : 0, "range" : { "AutoReply" : { "enable" : "boolean" } }, "value" : { "AutoReply" : { "enable" : 1, "fileId" : 3, "timeout" : 2 } } } ]

timvdsm commented 1 year ago

And FYI ... these are the settings in my reolink doorbell webUI. Keep in mind this is just to configure the auto-reply schedule.

Scherm­afbeelding 2022-12-31 om 13 52 49

You have a setting for the waiting time after which the reply message should be triggered and then off course the auto-reply message itself.

Scherm­afbeelding 2022-12-31 om 13 52 59

Unfortunately I am not able to manually trigger a specific auto-reply message from the webUI, this is only available in the reolink app. Can I check somewhere what the commands are to manually trigger a specific auto reply message?

mnpg commented 1 year ago

So,

with the command SetAudioReply, you can set the status of the Audio Reply (ON/OFF) with the field enable and also the Audio File that you want to hear as a reply (field fileId) and the waiting time (field timeout -NB: time in seconds-)

In you case : FileId = 3 that correspond with the field id from the GetAudioFileList :

{ "audioLen" : 5, "fileName" : "Achterlaten poortje", "fileSize" : 46080, "id" : 3, "type" : "reply" }

from your files, here some examples. Tell me if they work :

In the command below, change #IP# to the IP address of the cam and#username# and #password# (an admin account credentials) by your own values. The URL is in https, change it to http if it doesn't work

timvdsm commented 1 year ago

Remark: I used SetAutoReply as SetAudioReply is not known. However it seems the status is not updated in the reolink app or the reolink webUI. For example when i send the command to set the auto-reply to OFF

[
   {
      "cmd" : "Unknown",
      "code" : 1,
      "error" : {
         "detail" : "please login first",
         "rspCode" : -6
      }
   }
]
timvdsm commented 1 year ago

As you can see the auto-reply is not set to off when I do the following:

timv@MBP-van-Tim ~ % curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"SetAutoReply\",\"action\":1,\"param\":{\"enable\":0,\"channel\":0}}]" "https://192.168.1.106/cgi-bin/api.cgi?user= USERNAME&password=PW"
[
   {
      "cmd" : "SetAutoReply",
      "code" : 0,
      "value" : {
         "rspCode" : 200
      }
   }
]
timv@MBP-van-Tim ~ % curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"GetAutoReply\",\"action\":1,\"param\":{\"channel\":0}}]" "https://192.168.1.106/cgi-bin/api.cgi?user=USERNAME&password=PW"
[
   {
      "cmd" : "GetAutoReply",
      "code" : 0,
      "range" : {
         "AutoReply" : {
            "enable" : "boolean"
         }
      },
      "value" : {
         "AutoReply" : {
            "enable" : 1,
            "fileId" : 3,
            "timeout" : 2
         }
      }
   }
]
mnpg commented 1 year ago

Sorry, i omit a parameter in the SetAutoReply ( and not SetAudioReply :) ) command (the parameter AutoReply after "param" ). try again and tell me if it works :

In the command below, change #IP# to the IP address of the cam and#username# and #password# (an admin account credentials) by your own values. The URL is in https, change it to http if it doesn't work

timvdsm commented 1 year ago

Is it possible that for activation you also need the other parameters to set like fileID, timeout?

mnpg commented 1 year ago

Cool!

Is it possible that for activation you also need the other parameters to set like fileID, timeout?

i think you're right, test first the field enable with the fileId parameter only :

curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"SetAutoReply\",\"action\":0,\"param\":{\"AutoReply\":{\"enable\":1,\"fileId\":3,\"channel\":0}}}]" "https://192.168.1.106/cgi-bin/api.cgi?user=USERNAME&password=PW"

and on the other hand, with all the parameters :

curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"SetAutoReply\",\"action\":0,\"param\":{\"AutoReply\":{\"enable\":1,\"fileId\":3,\"timeout\":2,\"channel\":0}}}]" "https://192.168.1.106/cgi-bin/api.cgi?user=USERNAME&password=PW"

NB : perhaps, the field channel is not necessary

timvdsm commented 1 year ago

Ahoi we have a winner!! :-)

Many thanks!!!! :-)

timvdsm commented 1 year ago

So that’s for the auto-reply schedule. can I do any troubleshooting for manually trigger the messages themself? That’s only available through the app.

![Uploading A0AB1DF7-12DE-43CD-BF38-7F4ED1C40182.jpeg…]()

timvdsm commented 1 year ago

You see the auto-reply schedule (green auto icon) and then you can manually also trigger a specific message (for 1 time)

644648FA-A61A-451C-AB73-BC78D9B94EFF

mnpg commented 1 year ago

It's very cool, thanks for your help too.

I'm not sure we can do it through api. Like the 2 way audio, i think we must use the reolink app (pc or smartphone) to create one. FYI. As i see in the return json of the GetAudioFileList, you can create several reply messages (12 max if i count it right).

timvdsm commented 1 year ago

Ow that’s great news, will check tonight/tomorrow how many I can create myself 😁 will keep you updated

timvdsm commented 1 year ago

Happy NY!!! :-)

It seems that you can indeed create 12 custom messages your own (next to the 3 preconfigured). So you were right. I see that for custom messages you create it gets "type" : "reply" For the 3 already preconfigured reply messages it's "type" : "alarm" I created 12 custom messages: Achterlaten poortje, Afgeven bij buren, Test 1 ... Test 10 Afterwards it says, you can't add any custom messages anymore.

[
   {
      "cmd" : "GetAudioFileList",
      "code" : 0,
      "initial" : {
         "AudioFileList" : [
            {
               "audioLen" : 3,
               "fileName" : "I'm sorry. I think you've knocked on the wrong door.",
               "fileSize" : 30720,
               "id" : 0,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, we will be right there. Please wait a moment.",
               "fileSize" : 32640,
               "id" : 1,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, please leave the package at the door. We will get it later.",
               "fileSize" : 38720,
               "id" : 2,
               "type" : "alarm"
            },
            {
               "audioLen" : 5,
               "fileName" : "Achterlaten poortje",
               "fileSize" : 46080,
               "id" : 3,
               "type" : "reply"
            },
            {
               "audioLen" : 5,
               "fileName" : "Afgeven bij buren",
               "fileSize" : 45056,
               "id" : 4,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 1",
               "fileSize" : 11264,
               "id" : 5,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 2",
               "fileSize" : 12800,
               "id" : 6,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 3",
               "fileSize" : 13312,
               "id" : 7,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 5",
               "fileSize" : 11264,
               "id" : 8,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 4",
               "fileSize" : 10752,
               "id" : 9,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 6",
               "fileSize" : 11264,
               "id" : 10,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 7",
               "fileSize" : 11264,
               "id" : 11,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 8",
               "fileSize" : 12800,
               "id" : 12,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 9",
               "fileSize" : 10240,
               "id" : 13,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 10",
               "fileSize" : 11264,
               "id" : 14,
               "type" : "reply"
            },
            {
               "audioLen" : 3,
               "fileName" : "I'm sorry. I think you've knocked on the wrong door.",
               "fileSize" : 30720,
               "id" : 0,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, we will be right there. Please wait a moment.",
               "fileSize" : 32640,
               "id" : 1,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, please leave the package at the door. We will get it later.",
               "fileSize" : 38720,
               "id" : 2,
               "type" : "alarm"
            },
            {
               "audioLen" : 5,
               "fileName" : "Achterlaten poortje",
               "fileSize" : 46080,
               "id" : 3,
               "type" : "reply"
            },
            {
               "audioLen" : 5,
               "fileName" : "Afgeven bij buren",
               "fileSize" : 45056,
               "id" : 4,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 1",
               "fileSize" : 11264,
               "id" : 5,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 2",
               "fileSize" : 12800,
               "id" : 6,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 3",
               "fileSize" : 13312,
               "id" : 7,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 5",
               "fileSize" : 11264,
               "id" : 8,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 4",
               "fileSize" : 10752,
               "id" : 9,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 6",
               "fileSize" : 11264,
               "id" : 10,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 7",
               "fileSize" : 11264,
               "id" : 11,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 8",
               "fileSize" : 12800,
               "id" : 12,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 9",
               "fileSize" : 10240,
               "id" : 13,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 10",
               "fileSize" : 11264,
               "id" : 14,
               "type" : "reply"
            }
         ]
      },
      "range" : {
         "AudioFileList" : {
            "fileNum" : 15,
            "id" : {
               "max" : 15,
               "min" : 0
            }
         }
      },
      "value" : {
         "AudioFileList" : [
            {
               "audioLen" : 3,
               "fileName" : "I'm sorry. I think you've knocked on the wrong door.",
               "fileSize" : 30720,
               "id" : 0,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, we will be right there. Please wait a moment.",
               "fileSize" : 32640,
               "id" : 1,
               "type" : "alarm"
            },
            {
               "audioLen" : 4,
               "fileName" : "Hi, please leave the package at the door. We will get it later.",
               "fileSize" : 38720,
               "id" : 2,
               "type" : "alarm"
            },
            {
               "audioLen" : 5,
               "fileName" : "Achterlaten poortje",
               "fileSize" : 46080,
               "id" : 3,
               "type" : "reply"
            },
            {
               "audioLen" : 5,
               "fileName" : "Afgeven bij buren",
               "fileSize" : 45056,
               "id" : 4,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 1",
               "fileSize" : 11264,
               "id" : 5,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 2",
               "fileSize" : 12800,
               "id" : 6,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 3",
               "fileSize" : 13312,
               "id" : 7,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 5",
               "fileSize" : 11264,
               "id" : 8,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 4",
               "fileSize" : 10752,
               "id" : 9,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 6",
               "fileSize" : 11264,
               "id" : 10,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 7",
               "fileSize" : 11264,
               "id" : 11,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 8",
               "fileSize" : 12800,
               "id" : 12,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 9",
               "fileSize" : 10240,
               "id" : 13,
               "type" : "reply"
            },
            {
               "audioLen" : 1,
               "fileName" : "Test 10",
               "fileSize" : 11264,
               "id" : 14,
               "type" : "reply"
            }
         ]
      }
   }
]
timvdsm commented 1 year ago

By the way ... I am trying to do some troubleshooting for manually trigger the reply messages themself. I just want to trial and error to see if the command is correct. For manually triggering the siren for example it uses AudioAlarmPlay So I was thinking about using: AudioReplyPlay or AutoReplyPlay However i always get a reply "cmd" : "Unknown"

Any idea what it could be as there should be any logic in it :-)

timvdsm commented 1 year ago

And FYI I saw you mentioned somewhere ... GetPowerLed

This is the reply I get ...

[
   {
      "cmd" : "GetPowerLed",
      "code" : 0,
      "range" : {
         "PowerLed" : {
            "eDoorbellLightState" : [ "On", "Off", "NotSupport" ],
            "state" : [ "On", "Off" ]
         }
      },
      "value" : {
         "PowerLed" : {
            "channel" : 0,
            "eDoorbellLightState" : "On",
            "state" : "On"
         }
      }
   }
]
starkillerOG commented 1 year ago

Thank you very much for figuring out these commands! I have incorporated them in the new reolink-aio 0.5.5 release: https://github.com/starkillerOG/reolink_aio/releases/tag/0.5.5 I will make new HomeAssistant entities for the official homeassistant integration to use these commands.

timvdsm commented 1 year ago

@starkillerOG Many thanks! Great news! They will be updated in the next HA update?

These are the commands for the automatic Auto-Reply settings. Would love to know how you can manually trigger one of the Auto-Reply messages (by clicking in the app on the blue arrow). However it's not supported in the web UI, so i can't check for the commands. It's only available in the reolink client app.

starkillerOG commented 1 year ago

@timvdsm I have asked the reolink firmware engineer that I am in contact with and it is not yet build into the API in the firmware, so the command does not exist. I have requested them to add it to the API, and they will but it will probably take a quite some time (few months).

timvdsm commented 1 year ago

@starkillerOG well that would be awesome!! They also confirmed me they are working on 2-way audio through onvif profile-T. Then I guess this will be the perfect doorbell :-)

starkillerOG commented 1 year ago

You can follow the progress in this PR: https://github.com/home-assistant/core/pull/89656

starkillerOG commented 1 year ago

There is a new firmware version available for the doorbells, has anyone figured out if this firmware included a command to trigger the auto reply?

timvdsm commented 1 year ago

There is a new firmware version available for the doorbells, has anyone figured out if this firmware included a command to trigger the auto reply?

Although they confirmed to me that it would be integrated in the new firmware, this is the reply I got today from reolink support: Sorry that we haven't programmed it into this firmware version yet. It will be available in the next firmware. Could you please wait for it again?

So I think we have to wait a little bit longer.

FYI: scrypted succeed in getting 2-way audio woking through onvif 🤩

starkillerOG commented 1 year ago

@timvdsm thanks for sharing this info. We will have to wait in that case.

mnpg commented 1 year ago

I've found a new command in this latest firmware : GetEvents . But i don't know what kind of information that treat, probably a log file not sure

starkillerOG commented 1 year ago

@mnpg GetEvents can be used to get the motion + AI + visitor event status in one command. It is already used by the reolink-aio library. Reolink added this command at my request to be able to poll the status of the doorbell visitor event.

mnpg commented 1 year ago

Cool @starkillerOG, good news! Thanks you that your request has effect to the devs. Hope they are more comprehensive with our demands as developpers and that they can give us more informations about how the API works. It's very cool that you have a contact with them. As i said, if you need some infos from the newer firmware unpacked (decrypted), tell me. Just for my info : for the plugin, what kind of infos or functionalities you'll planned to add in the future?

starkillerOG commented 1 year ago

@mnpg currently I am focusing on user experiance, so solving all kinds of bugs for edge cases, making repair issues to notify users if they have a misconfigured setup which is cuasing problems (especially when there network configuration does not allow the ONVIF pushes to reach the HA device).

New things I am waiting on Reolink to add are:

mnpg commented 1 year ago

@starkillerOG, i don' t know quite well HA. Do you think there is a simply way to add through lovelace interface the ability to create privacy mask, detection zone or surveillance schedulers?

starkillerOG commented 1 year ago

@mnpg privacy mask and detection zone will not be easy and will probably not be added anytime soon. Surveillance scheduels are already possible because their are switches to turn on/off the features in HA (record, push notify, alarm etc) and you can really easily make automations to control those switches using schedules and times in HA.

mnpg commented 1 year ago

Privacy mask is easy when you use SVG file to set the masks zone. The only way through HA is to stock the SVG files somewhere and called them as a list of files to apply. I can send you part of my batch file that treat this case if you will. NB : you must need a SVG lib for python to read the SVG file

mnpg commented 1 year ago

Hi @starkillerOG , i think it's a good think to add in HA witch network ports is open or not and add binary sensors for that. What do you think?

mnpg commented 1 year ago

FYI, i have created several examples of scripts, based on @jasonk bash script, that can help to configure some features not include in HA. Take a look at my repo > folder Bash-script

EDIT ; if you have some informations about newer commands from the reolink devs (not include in the official api guide), I'm interested of to have them.

starkillerOG commented 1 year ago

I will let you know when I get new undocumeted commands. privicy masks and network port configuration is to advanced to expose to regular HA users, they schould just use the reolink app for such advanced configurations.

starkillerOG commented 1 year ago

@timvdsm @mnpg I just saw reolink uploaded a new firmware version for the doorbell (POE and WIFI) hopefully the quick reply command is now included, could one of you check?

timvdsm commented 1 year ago

Hi, I have the new firmware installed. Is there any general command I can use to see what's included?

mnpg commented 1 year ago

@timvdsm @starkillerOG : I've parsing the js files of the firmwave, i'ain't seen any newer commands from the previous firmware. the only command I'm wondering about is ExportAudioFile. @timvdsm : can you send me the result of these commands :

Tell me if they work :

In the command below, change #IP# to the IP address of the cam and #USERNAME# and #PW# (an admin account credentials) by your own values. The URL is in https, change it to http if it doesn't work -> For the second command, remplace #FILE ID FROM THE SELECTED AUTOREPLY FILE# by the fileid of the autoreply message

curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"ExportAudioFile\",\"action\":1,\"param\":{\"channel\":0}}]" "https://#IP#/cgi-bin/api.cgi?user=#USERNAME#&password=#PW#"

If it not working try this second command : curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"ExportAudioFile\",\"action\":0,\"param\":{\"channel\":0,\"id"\:#FILE ID FROM THE SELECTED AUTOREPLY FILE#}}]" "https://#IP#/cgi-bin/api.cgi?user=#USERNAME#&password=#PW#"

waiting for your answer

timvdsm commented 1 year ago

The first one:

[
   {
      "cmd" : "ExportAudioFile",
      "code" : 0,
      "value" : {
         "rspCode" : 200
      }
   }
]

For the second command I only get this: dquote>

Don't know if that helps?

I also got in touch with Reolink support to ask if the API command for Quick Reply is included in the new firmware as they promised me to do so. This was their reply:

_Thank you for your reply!

I learned from our engineer that this firmware does not include the API command. Sorry about that! This feature is made, but hasn't been tested yet and sorry there is no specific date when this firmware will be released, it will take time. And in the future, you can pay attention to Note & What's new to check if this feature is added in the firmware. Image Thank you for your understanding!

Best Regards, Reolink Senior Support Team –Joan_

mnpg commented 1 year ago

My bad! I misplaced a double-quote character in the command line after the id field. here the good command and probably there is an output audio file. curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"ExportAudioFile\",\"action\":0,\"param\":{\"channel\":0,\"id\":#FILE ID FROM THE SELECTED AUTOREPLY FILE#}}]" "https://#IP#/cgi-bin/api.cgi?user=#USERNAME#&password=#PW#" -OJ As i see in the js file, it's seems to be a wav file

timvdsm commented 1 year ago

It generates a file api.cgi which is saved in my main folder. It includes the following text in the file:

[
   {
      "cmd" : "ExportAudioFile",
      "code" : 0,
      "value" : {
         "rspCode" : 200
      }
   }
]
mnpg commented 1 year ago

Thanks @timvdsm for the test. We must wait a update of the Reolink API Guide to know more about this API command.

timvdsm commented 1 year ago

This is what I got from Reolink support:

Your camera already supports this command. Are you asking the command's JSON data? Below is the format of command “ExportAudioFile”.

[{
       "cmd": "ExportAudioFile",
       "action": 0,
       "param": {
               "AudioFile": {
                       "id": 2,
                       "channel": 10
               }
       }
}]