Camera Proxy
The proxy
camera integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to pass another camera’s output through post-processing routines and generate a new camera with the post-processed output.
The current post-processing supports resizing and/or cropping the image/MJPEG as well as limiting the maximum refresh rate.
The current proxy capabilities are intended to reduce the camera bandwidth for slower internet connections.
Configuration
To enable this camera in your installation, you must first have an existing working camera configured in Home Assistant. Next, add the following to your configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file.
After changing the configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file, restart Home Assistant to apply the changes. The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.
# Example configuration.yaml entry
camera:
- platform: proxy
entity_id: camera.<existingcamera>
max_stream_width: 360
max_image_width: 720
Configuration Variables
The maximum width of single images taken from the camera (aspect ratio will be maintained on resize processing).
The maximum height of single images taken from the camera, only used for crop operations. If not provided, the original height is assumed by default.
The maximum width of the MJPEG stream from the camera (aspect ratio will be maintained on resize processing).
The maximum height of the MJPEG stream from the camera, only used for crop operations. If not provided, the original height is assumed by default.
The top (y) coordinate to be used as a starting point for crop operations.
The left (x) coordinate to be used as a starting point for crop operations.
The quality level used for resulting JPEG for snapshots.
The minimum time in seconds between generating successive image snapshots.
Resize the image even if the resulting image would take up more bandwidth than the original.
Examples
Example of using two Camera proxies along with a Foscam camera:
camera:
- platform: foscam
ip: 192.168.1.10
username: foscam_camera
password: camera_password
name: mycamera
- platform: proxy
entity_id: camera.mycamera
max_stream_width: 360
max_image_width: 480
image_refresh_rate: 5.0
- platform: proxy
entity_id: camera.mycamera
name: My cropped camera
mode: crop
max_image_width: 480
max_image_height: 320
max_stream_width: 480
max_stream_height: 320
image_left: 100