Minor layout changes

This commit is contained in:
Fabian Affolter 2016-03-12 13:35:15 +01:00
parent 5f5ddaf494
commit 84bb88fe1d

View File

@ -9,12 +9,14 @@ sharing: true
footer: true footer: true
ha_category: Automation Examples ha_category: Automation Examples
--- ---
This requires a [Foscam IP Camera](/components/camera.foscam/) camera with PTZ (Pan, Tilt, Zoom) and CGI functionality ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)) This requires a [Foscam IP Camera](/components/camera.foscam/) camera with PTZ (Pan, Tilt, Zoom) and CGI functionality ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf))
Foscam Cameras can be controlled by Home Assistant through a number of CGI commands. 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 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. 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.
```yaml ```yaml
# Replace admin and password with an "Admin" priviledged Foscam user # Replace admin and password with an "Admin" priviledged Foscam user
# Replace ipaddress with the local IP address of your Foscam # Replace ipaddress with the local IP address of your Foscam
@ -30,6 +32,7 @@ switch:
``` ```
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. 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.
```yaml ```yaml
shell_command: shell_command:
#Created a preset point in Foscam Web Interface named Off which essentially points the camera down and away #Created a preset point in Foscam Web Interface named Off which essentially points the camera down and away
@ -37,7 +40,9 @@ switch:
#Created a preset point in Foscam Web Interface named Main which points in the direction I would like to record #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"' 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`. 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`.
```yaml ```yaml
script: script:
foscam_off: foscam_off:
@ -75,3 +80,5 @@ automation:
to: 'home' to: 'home'
action: action:
service: script.foscam_off service: script.foscam_off
```