Site updated at 2016-05-02 06:51:23 UTC
This commit is contained in:
parent
c0a45ee34a
commit
ad4720c550
17 changed files with 39 additions and 33 deletions
|
@ -181,20 +181,26 @@ This switch will shutdown your host immediately, there will be no confirmation.
|
|||
|
||||
<h3><a class="title-link" name="control-foscam-motion-sensor" href="#control-foscam-motion-sensor"></a> Control Foscam Motion Sensor</h3>
|
||||
|
||||
<p>This switch will control the motion sensor of Foscam Webcams which Support CGI Commands (<a href="http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf">Source</a>). This switch supports statecmd, which checks the current state of motion detection.<br />
|
||||
<code>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: ''
|
||||
</code></p>
|
||||
<p>This switch will control the motion sensor of Foscam Webcams which Support CGI Commands (<a href="http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf">Source</a>). This switch supports statecmd, which checks the current state of motion detection.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
|
||||
<span class="key">switch</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">command_line</span></span>
|
||||
<span class="key">switches</span>:
|
||||
<span class="key">foscam_motion</span>:
|
||||
<span class="key">oncmd</span>: <span class="string"><span class="content">'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'</span></span>
|
||||
<span class="key">offcmd</span>: <span class="string"><span class="content">'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'</span></span>
|
||||
<span class="key">statecmd</span>: <span class="string"><span class="content">'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"'</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ value == "1" }}'</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li>Replace admin and password with an “Admin” priviledged Foscam user</li>
|
||||
<li>Replace ipaddress with the local IP address of your Foscam</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue