Fix sample
This commit is contained in:
parent
cfb48d7271
commit
30abcda712
1 changed files with 5 additions and 3 deletions
|
@ -91,10 +91,9 @@ switch:
|
||||||
### {% linkable_title Control Foscam Motion Sensor %}
|
### {% linkable_title Control Foscam Motion Sensor %}
|
||||||
|
|
||||||
This switch will control the motion sensor of Foscam Webcams which Support CGI Commands ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). This switch supports statecmd, which checks the current state of motion detection.
|
This switch will control the motion sensor of Foscam Webcams which Support CGI Commands ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). This switch supports statecmd, which checks the current state of motion detection.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# 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:
|
switch:
|
||||||
platform: command_line
|
platform: command_line
|
||||||
switches:
|
switches:
|
||||||
|
@ -102,5 +101,8 @@ switch:
|
||||||
oncmd: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'
|
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"'
|
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>)"'
|
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" }}'
|
value_template: {% raw %}'{{ value == "1" }}'{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Replace admin and password with an "Admin" priviledged Foscam user
|
||||||
|
- Replace ipaddress with the local IP address of your Foscam
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue