Has anyone used any ANPVIZ cameras and then used them to with HA to monitor motion alarms?
I have this working with some Amcrest and Foscam cameras but cannot figure out the cgi code to pull from the Anpviz - which sucks because so far I really like this camera and am thinking of converting the others. I have not seen anyone reference this camera in other posts…
Here is a Foscam code I use:
“in binary_sensors.yaml”
- platform: rest
name: "LR Cam Motion Sensor"
resource: http://cameraip:port/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=UID&pwd=PWD
device_class: motion
scan_interval: 5
value_template: >-
{%- if "<motionDetectAlarm>2</motionDetectAlarm>" in value -%}
{{ true }}
{%- else -%}
{{ false }}
{%- endif -%}
Here is what I used for Amcrest:
“in configuration.yaml”
amcrest:
- host: !secret camera_ip12
port: !secret camera_port12
name: LR2 Motion
resolution: low
username: !secret camera_username
password: !secret camera_password
scan_interval: 2
sensors:
- motion_detector