diff --git a/atom.xml b/atom.xml index f2b00ba007..37e23ac032 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
This switch will control the motion sensor of Foscam Webcams which Support CGI Commands (Source). This switch supports statecmd, which checks the current state of motion detection.
-yaml
-# Example configuration.yaml entry
-# Replace admin and password with an "Admin" priviledged Foscam user
-# Replace ipaddress with the local IP address of your Foscam
-switch:
- platform: command_line
- switches:
- foscam_motion:
- oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'
- offcmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'
- statecmd: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"'
- value_template: ''
-
This switch will control the motion sensor of Foscam Webcams which Support CGI Commands (Source). This switch supports statecmd, which checks the current state of motion detection.
+ +# Example configuration.yaml entry +switch: + platform: command_line + switches: + foscam_motion: + oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"' + offcmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"' + statecmd: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"' + value_template: '{{ value == "1" }}' +