Reolink AI Motion Detection

I haven’t yet setup a working binary_sensor with the appropriate rest parameters. But, I finally got a curl command to work so I’m sharing it. Chances are someone else has already posted this information.

I submitted the following support request to Reolink:
NVR is sending email for person and vehicle detection as expected. But http://10.0.0.xxx/api.cgi?cmd=GetAiState&channel=1&user=admin&password=xxx returns an error [ { “cmd” : “Unknown”, “code” : 1, “error” : { “detail” : “not support”, “rspCode” : -9 } } ]. Why is GetAiState failing?

They responded that I needed to upgrade the NVR firmware to the attached file. They also sent the attached portion of the API documentation.

Here are the curl command and the response:

MBP-wifi:~ jalperin$ curl -s -k -X POST -H “Content-Type : application/json” -d “[{“cmd”:“GetAiState”,“param”:{“channel”:3}}]” “https://10.0.0.123/cgi-bin/api.cgi?cmd=GetAiState&user=admin&password=password

[
{
“cmd” : “GetAiState”,
“code” : 0,
“value” : {
“channel” : 3,
“dog_cat” : {
“alarm_state” : 0,
“support” : 0
},
“face” : {
“alarm_state” : 0,
“support” : 0
},
“people” : {
“alarm_state” : 0,
“support” : 1
},
“vehicle” : {
“alarm_state” : 0,
“support” : 1
}
}
}
]

Hope this helps someone.

Couldn’t upload a file. The firmware is here: https://support.reolink.com/attachments/token/AxTAL3n6yku95GsepijEsOAqA/?name=NT98323_NVR_8IP_REOLINK_L300_200_22081500.pakhttps://support.reolink.com/attachments/token/AxTAL3n6yku95GsepijEsOAqA/?name=NT98323_NVR_8IP_REOLINK_L300_200_22081500.pak

the API section is here:
https://support.reolink.com/attachments/token/l5eeyiGjuHvPh0sF65pJDrIQJ/?name=AI-API.docx

Reolink NVR to Home Assistant Issue - #2 by tteck

Thanks, but those are the rest sensors that were failing for me.