Foscam Recording During Away Mode Only Using Pan/Tilt/Zoom Control and Motion Detection
2017-06-28 00:00
381 查看
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
这需要具有PTZ(平移,倾斜,缩放)和CGI功能(源)的Foscam IP摄像机摄像头
Foscam相机可以由Home Assistant通过多个CGI命令来控制。 以下概述了在切换,服务和脚本控制运动检测时需要两个预设目的地的示例,但是在上面链接的Foscam CGI用户指南中还提供了许多其他运动选项。
The service
The
可以使用
To automate Foscam being set to “on” (facing the correct way with motion sensor on), I used the following simple automation:
为了使Foscam自动化设置为“开”(面向运动传感器的正确方式),我使用以下简单的自动化:
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_motionwill 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_offsets the camera to point down and away to indicate it is not recording, and
shell_command.foscam_turn_onsets 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_offand
script.foscam_oncan 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_trackertriggers to set
homeand
not_homemodes for your Foscam and disable motion detection recording while
home.
可以使用
script.foscam_off和
script.foscam_on来适当地设置运动检测,然后移动相机。 这些脚本可以作为自动化的一部分,使用
device_tracker触发器来设置Foscam的
home和
not_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
相关文章推荐
- WPF Chart Control With Pan, Zoom and More
- Adaptive Object Detection Using Adjacency and Zoom Prediction
- 项目管理实践【五】自动编译和发布网站【Using Visual Studio with Source Control System to build and publish website automatically】
- 处理MySQL更新表时Error Code: 1175. You are using safe update mode and you tried to update a table……
- Saving and Displaying Photos in SQL Server using ASP.NET and FileUpload Control
- [精读]Spationtemporal Saliency Detection Using Textural Contrast and Its Applications
- 深度学习研究理解6:OverFeat:Integrated Recognition, Localization and Detection using Convolutional Networks
- MySQL错误:You are using safe update mode and you tried to update a table without a WHERE that uses a K
- (转)项目管理实践教程二、源代码控制【Source Control Using VisualSVN Server and TortoiseSVN】
- Error Code: 1175. You are using safe update mode and you tried to update a table
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- 论文笔记:Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
- Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table
- Error Code: 1175. You are using safe update mode and you tried to ......
- 项目管理实践【三】每日构建【Daily Build Using CruiseControl.NET and MSBuild】
- You are using safe update mode and you tried to update a table without a WHERE that uses a KEY colum
- Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
- Using Source Code Control with LabVIEW and Perforce
- 目标检测“Object Detection Using Generalization and Efficiency Balanced Co-occurrence Features”
- Licenses.licx gets modified whenever a form is modified in design mode and must be checked in if the project is under Source Control