Foscam
The foscam
platform allows you to watch the live stream of your Foscam
Configuration
To add the Foscam integration to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select Foscam.
-
Follow the instructions on screen to complete the setup.
There seems to be some issues within Foscam with lengthy passwords and passwords containing certain symbols. Be sure to check your camera’s documentation.
Controllable Features
If your camera supports it, a switch “Sleep” will be added to put the camera in sleep mode.
Streams
Most Foscam IP Cameras supports two video streams, by default the Main
stream is the high quality stream while the Sub
stream is a lower quality stream. These streams can be configured in your camera preferences.
Action foscam.ptz
If your Foscam camera supports PTZ, you will be able to pan or tilt your camera.
Data attribute | Description |
---|---|
entity_id |
String or list of strings that point at entity_id s of cameras. Use entity_id: all to target 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 |
Action foscam.ptz_preset
If your Foscam camera supports PTZ presets, you will be able to move the camera to a predefined preset using the preset name.
Data attribute | Description |
---|---|
entity_id |
String or list of strings that point at entity_id s of cameras. Use entity_id: all to target all. |
preset_name |
The name of the preset to move to. Presets can be created from within the official Foscam apps. |
Example card with 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.
type: picture-elements
image: 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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
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
action: foscam.ptz
data:
entity_id: camera.bedroom
movement: bottom_right
Extra CGI Commands
Foscam Webcams which support CGI Commands can be controlled by Home Assistant (Source