文档章节

Foscam Recording During Away Mode Only Using Pan/Tilt/Zoom Control and Motion Detection

OSC_KNIURp
 OSC_KNIURp
发布于 2017/06/28 14:01
字数 742
阅读 1
收藏 0

This requires a Foscam IP Camera camera with PTZ (Pan, Tilt, Zoom) and CGI functionality (Source)

Foscam Cameras can be controlled by Home Assistant through a number of CGI commands. The following outlines examples of the switch, services, and scripts required to move between 2 preset destinations while controlling motion detection, but many other options of movement are provided in the Foscam CGI User Guide linked above.

The switch.foscam_motion will control whether the motion detection is on or off. This switch supports statecmd, which checks the current state of motion detection.

这需要具有PTZ(平移,倾斜,缩放)和CGI功能(源)的Foscam IP摄像机摄像头

Foscam相机可以由Home Assistant通过多个CGI命令来控制。 以下概述了在切换,服务和脚本控制运动检测时需要两个预设目的地的示例,但是在上面链接的Foscam CGI用户指南中还提供了许多其他运动选项。

switch.foscam_motion 将控制运动检测是否打开或关闭。 此开关支持 statecmd ,它检查运动检测的当前状态。

# Replace admin and password with an "Admin" privileged Foscam user
# Replace ipaddress with the local IP address of your Foscam
switch:
 platform: command_line
 switches:
   #Switch for Foscam Motion Detection
   foscam_motion:
     command_on: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'
     command_off: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'
     command_state: 'curl -k --silent "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"'
     value_template: '{{ value == "1" }}'

The service shell_command.foscam_turn_off sets the camera to point down and away to indicate it is not recording, and shell_command.foscam_turn_on sets the camera to point where I’d like to record. h of these services require preset points to be added to your camera. See source above for additional information.

shell_command.foscam_turn_off 服务设置相机指向并指示不录像,而 shell_command.foscam_turn_on 将相机设置为指向我要录像的位置。 这些服务的需要将预设点添加到您的相机。 有关其他信息,请参阅以上资料。

shell_command:
  #Created a preset point in Foscam Web Interface named Off which essentially points the camera down and away
  foscam_turn_off: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Off&usr=admin&pwd=password"'
  #Created a preset point in Foscam Web Interface named Main which points in the direction I would like to record
  foscam_turn_on: 'curl -k "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=Main&usr=admin&pwd=password"'

The script.foscam_off and script.foscam_on can be used to set the motion detection appropriately, and then move the camera. These scripts can be called as part of an automation with device_tracker triggers to set home and not_home modes for your Foscam and disable motion detection recording while home.

可以使用 script.foscam_offscript.foscam_on 来适当地设置运动检测,然后移动相机。 这些脚本可以作为自动化的一部分,使用 device_tracker 触发器来设置Foscam的 homenot_home 模式,并在 home 模式禁用运动检测记录。  

script:
 foscam_off:
   sequence:
   - service: switch.turn_off
     data:
       entity_id: switch.foscam_motion
   - service: shell_command.foscam_turn_off
 foscam_on:
   sequence:
   - service: switch.turn_off
     data:
       entity_id: switch.foscam_motion
   - service: shell_command.foscam_turn_on
   - service: switch.turn_on
     data:
       entity_id: switch.foscam_motion

To automate Foscam being set to “on” (facing the correct way with motion sensor on), I used the following simple automation:

为了使Foscam自动化设置为“开”(面向运动传感器的正确方式),我使用以下简单的自动化:

automation:
  - alias: Set Foscam to Away Mode when I leave home
    trigger:
      platform: state
      entity_id: group.family
      from: 'home'
    action:
      service: script.foscam_on
  - alias: Set Foscam to Home Mode when I arrive Home
    trigger:
      platform: state
      entity_id: group.family
      to: 'home'
    action:
      service: script.foscam_off

© 著作权归作者所有

共有 人打赏支持
OSC_KNIURp
粉丝 0
博文 23
码字总数 17192
作品 0
东城
私信 提问
Open Camera 1.6 发布,Android 相机应用

Open Camera 1.6 发布,此版本更新内容如下: Zoom and exposure can now be controlled via on-screen sliders The volume keys can be configured to also control exposure Compass direc......

oschina
2014/01/23
1K
3
3d快捷键

3DMAX快捷键一览表 编辑多边形对象功能(Editable Poly Function)命令 快捷键 Bevel Mode(倒角模式) SHIFT+CTRL+B Border Level(边界层级) 3 Chamfer Mode(切角模式) SHIFT+CTRL+C C...

guoyuxiu
2010/03/23
383
0
Open Camera

Open Camera 是一个开源的 Android 手机和平板上的相机应用 特性包括: Option to auto-stabilise so your pictures are perfectly level no matter what Zoom via multi-touch gesture and ......

红薯
2013/10/24
7.7K
1
计算机视觉、机器学习相关领域论文和源代码大集合

一、特征提取Feature Extraction: · SIFT [1] [Demo program][SIFT Library] [VLFeat] · PCA-SIFT [2] [Project] · Affine-SIFT [3] [Project] · SURF [4] [OpenSURF] [Matlab Wrapper]......

wangdy
2016/08/02
213
0
MPC-HC 1.7.6 稳定版发布,Windows 视频播放器

MPC-HC,全称Media Player Classic Home Cinema,是Windows平台上一个非常轻量级的开源媒体播放器。它支持所有常见的视频和音频文件格式的播放。它是100%免费的。 1.7.6 - 05 July 2014 ===...

oschina
2014/07/07
1K
5

没有更多内容

加载失败,请刷新页面

加载更多

oh-my-zsh 自定义

GitHub 地址 基于 oh-my-zsh 的自定义配置,增加了一些个人常用插件与皮肤。 采用的是 git submodule 来维护,包括 oh-my-zsh,之所以这么搞,主要是手头有多台 linux 需要维护, 每台机器、...

郁也风
今天
4
0
Docker安装踩坑:E_FAIL 0x80004005的解决

参考 菜鸟教程--Windows Docker 安装 http://www.runoob.com/docker/windows-docker-install.html 官方文档-Install Docker Toolbox on Windows https://docs.docker.com/toolbox/toolbox_in......

karma123
今天
5
0
js垃圾回收机制和引起内存泄漏的操作

JS的垃圾回收机制了解吗? Js具有自动垃圾回收机制。垃圾收集器会按照固定的时间间隔周期性的执行。 JS中最常见的垃圾回收方式是标记清除。 工作原理:是当变量进入环境时,将这个变量标记为“...

Jack088
昨天
17
0
大数据教程(10.1)倒排索引建立

前面博主介绍了sql中join功能的大数据实现,本节将继续为小伙伴们分享倒排索引的建立。 一、需求 在很多项目中,我们需要对我们的文档建立索引(如:论坛帖子);我们需要记录某个词在各个文...

em_aaron
昨天
27
0
"errcode": 41001, "errmsg": "access_token missing hint: [w.ILza05728877!]"

Postman获取微信小程序码的时候报错, errcode: 41001, errmsg: access_token missing hint 查看小程序开发api指南,原来access_token是直接当作parameter的(写在url之后),scene参数一定要...

两广总督bogang
昨天
33
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部