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

You're right so, the command responds correctly but from you previous message, there is another missing part in the command; here an another newer command :

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

test it with or without -OJ curl parameter

Thanks for your tests

timvdsm commented 1 year ago
timv@MBP-van-Tim ~ % curl -s -k -X POST -H "Content-Type : application/json" -d "[{\"cmd\":\"ExportAudioFile\",\"action\":0,\"param\":{\"AudioFile\":{\"channel\":0,\"id\":1}}}]" "https://192.168.x.x/cgi-bin/api.cgi?user=x&password=x"    
[
   {
      "cmd" : "ExportAudioFile",
      "code" : 0,
      "value" : {
         "rspCode" : 200
      }
   }
]
timv@MBP-van-Tim ~ % 
mnpg commented 1 year ago

OK thanks @timvdsm . at last no explanation what this command do. Waiting of Reolink to have more infos about this.

mnpg commented 9 months ago

hi @timvdsm, good news, finally your wish comes true. Reolink release, in their latest Doorbell firmware, the command to quick reply a message. StarKillerOG wants to quickly implement it in HA take a look here : https://github.com/starkillerOG/reolink_aio/issues/10#issuecomment-1975215590

timvdsm commented 9 months ago

hi @mnpg Many thanks for keeping me up to date :-) That's some great news! I installed the new doorbell firmware during the weekend and wanted to check if there was something new concerning the quick to reply message. Then I already know the answer :-)

Mincka commented 9 months ago

And the PR is merged right on time for next HA release. 😍 Thanks a lot mnpg and starkillerOG!

starkillerOG commented 9 months ago

@Mincka Actually no, HA is already in beta for the HA 2024.3.0 release so new features like this are not accepted anymore. The PR is merged to the dev branch, so it is included in HA 2024.4.0, so you will need to wait 1 month....

Mincka commented 9 months ago

Ok, I'll monkey patch my HA if it's not available for 2024.3.0. I believed this could be included since you managed to get https://github.com/home-assistant/core/pull/112124 merged in https://github.com/home-assistant/core/releases/tag/2024.3.0b6 . Anyway, it's now coming soon. :)

timvdsm commented 9 months ago

@Mincka Actually no, HA is already in beta for the HA 2024.3.0 release so new features like this are not accepted anymore. The PR is merged to the dev branch, so it is included in HA 2024.4.0, so you will need to wait 1 month....

Thanks a lot!! Looking forward to it :-)

Mincka commented 8 months ago

Tested and it works great. There's just a small usability issue due to the select component, but I it's more an issue with HA front-end.

From the select entity or in the integration view, you cannot send the same message twice since the drop down is not / cannot be reset to its default "Nothing selected state". You need to refresh the page.

Also, is it expected that the select state is never in the history? I was thinking that it should change to the latest quick reply command sent (and then set back to unknown?) but that's not the case.

starkillerOG commented 8 months ago

@Mincka no since the quick replay does not really have a state it will always remain on None, I will see if I can schedual a refresh such that it goes back to None emidiately.

mnpg commented 8 months ago

Hi all, i think that this issue has been resolved in many ways. I can close it

FYI, more commands appear in the latest doorbell's firmware. Check these infos here : https://github.com/starkillerOG/reolink_aio/issues/10#issuecomment-1974867205