diff --git a/source/_integrations/foscam.markdown b/source/_integrations/foscam.markdown index 6f21bd1750b..52c8fd022c0 100644 --- a/source/_integrations/foscam.markdown +++ b/source/_integrations/foscam.markdown @@ -56,6 +56,130 @@ name: There seems to be some issues within Foscam with lengthy passwords and passwords containing certain symbols. Be sure to check your camera's documentation. -### Control Foscam PTZ (Pan/Tilt/Zoom) - Home/Away +### Service `foscam.ptz` - Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). For an example of how this can be done, see the [Foscam IP Camera Pan, Tilt, Zoom Control](/cookbook/foscam_away_mode_PTZ/) Cookbook entry. +If your Foscam camera supports PTZ, you will be able to pan or tilt your camera. + +| Service data attribute | Description | +| -----------------------| ----------- | +| `entity_id` | String or list of strings that point at `entity_id`s of cameras. Else targets all. | +| `movement` | Direction of the movement. Allowed values: `up`, `down`, `left`, `right`, `top_left`, `top_right`, `bottom_left`, `bottom_right` | +| `travel_time` | (Optional) Travel time in seconds. Allowed values: float from 0 to 1. Default: 0.125 | + +### Example card with controls + +

+ Screenshot showing a foscam camera using a picture-elements with PTZ controls. + Example showing a Foscam camera with controls for Pan and Tilt. +

+ + +Using the following card code you can achieve a card displaying the live video feed from a Foscam camera with controls for moving the camera at the bottom right corner. + +```yaml +type: picture-elements +entity: camera.bedroom +camera_image: camera.bedroom +camera_view: live +elements: + - type: icon + icon: 'mdi:arrow-up' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 25px + bottom: 50px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: up + - type: icon + icon: 'mdi:arrow-down' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 25px + bottom: 0px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: down + - type: icon + icon: 'mdi:arrow-left' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 50px + bottom: 25px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: left + - type: icon + icon: 'mdi:arrow-right' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 0px + bottom: 25px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: right + - type: icon + icon: 'mdi:arrow-top-left' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 50px + bottom: 50px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: top_left + - type: icon + icon: 'mdi:arrow-top-right' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 0px + bottom: 50px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: top_right + - type: icon + icon: 'mdi:arrow-bottom-left' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 50px + bottom: 0px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: bottom_left + - type: icon + icon: 'mdi:arrow-bottom-right' + style: + background: 'rgba(255, 255, 255, 0.5)' + right: 0px + bottom: 0px + tap_action: + action: call-service + service: foscam.ptz + service_data: + entity_id: camera.bedroom + movement: bottom_right +``` + +### Extra CGI Commands + +Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). For an example of how this can be done, see the [Foscam IP Camera Pan, Tilt, Zoom Control](/cookbook/foscam_away_mode_PTZ/) Cookbook entry. diff --git a/source/images/integrations/foscam/example-card.png b/source/images/integrations/foscam/example-card.png new file mode 100644 index 00000000000..7e65cc3e6f6 Binary files /dev/null and b/source/images/integrations/foscam/example-card.png differ