mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
Update generic_ip_camera docs for config_flow (#14841)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
0a798246d6
commit
43d7af76a7
@ -15,68 +15,32 @@ The `generic` camera platform allows you to integrate any IP camera or other URL
|
|||||||
|
|
||||||
Home Assistant will serve the images via its server, making it possible to view your IP cameras while outside of your network. The endpoint is `/api/camera_proxy/camera.[name]`.
|
Home Assistant will serve the images via its server, making it possible to view your IP cameras while outside of your network. The endpoint is `/api/camera_proxy/camera.[name]`.
|
||||||
|
|
||||||
## Configuration
|
{% include integrations/config_flow.md %}
|
||||||
|
|
||||||
To enable this camera in your installation, add the following to your `configuration.yaml` file:
|
You must enter a URL in at least one of the fields **Still Image URL** or **Stream Source URL**, the others are optional.
|
||||||
|
|
||||||
```yaml
|
[Templates](/topics/templating/) are allowed in the URL fields, which can be used to select different images or parameterize the URL depending on the status of sensors. Template validity and network access are checked during the configuration steps.
|
||||||
# Example configuration.yaml entry
|
|
||||||
camera:
|
|
||||||
- platform: generic
|
|
||||||
still_image_url: http://194.218.96.92/jpg/image.jpg
|
|
||||||
```
|
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration_basic %}
|
||||||
still_image_url:
|
still_image_url:
|
||||||
description: "The URL your camera serves the image on, e.g., `http://192.168.1.21:2112/`. Can be a [template](/topics/templating/). At least one of still_image_url or stream_source must be provided."
|
description: "The URL your camera serves the image on, e.g., `http://192.168.1.21:2112/`. Can be a [template](/topics/templating/). At least one of still_image_url or stream_source must be provided."
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
stream_source:
|
stream_source:
|
||||||
description: "The URL your camera serves the live stream on, e.g., `rtsp://user:pass@192.168.1.21:554/`. Can be a [template](/topics/templating/). Usernames and passwords must be embedded in the URL. At least one of still_image_url or stream_source must be provided. Note that a stream_source without a still_image_url can only be used if the [stream integration](/integrations/stream/) is configured."
|
description: "The URL your camera serves the live stream on, e.g., `rtsp://user:pass@192.168.1.21:554/`. Can be a [template](/topics/templating/). Usernames and passwords must be embedded in the URL. At least one of still_image_url or stream_source must be provided. Note that a stream_source without a still_image_url can only be used if the [stream integration](/integrations/stream/) is configured."
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
description: This parameter allows you to override the name of your camera.
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
username:
|
username:
|
||||||
description: The username for accessing your camera. Note that this username applies only to still_image_url and not to stream_source.
|
description: The username for accessing your camera. Note that this username applies only to still_image_url and not to stream_source.
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
password:
|
password:
|
||||||
description: The password for accessing your camera. Note that this password applies only to still_image_url and not to stream_source.
|
description: The password for accessing your camera. Note that this password applies only to still_image_url and not to stream_source.
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
authentication:
|
authentication:
|
||||||
description: "Type for authenticating the requests `basic` or `digest`."
|
description: "Type for authenticating the requests `basic` or `digest`."
|
||||||
required: false
|
|
||||||
default: basic
|
|
||||||
type: string
|
|
||||||
limit_refetch_to_url_change:
|
limit_refetch_to_url_change:
|
||||||
description: Limits re-fetching of the remote image to when the URL changes. Only relevant if using a template to fetch the remote image.
|
description: Limits re-fetching of the remote image to when the URL changes. Only relevant if using a template to fetch the remote image.
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
content_type:
|
|
||||||
description: Set the content type for the IP camera if it is not a jpg file. Use `image/svg+xml` to add a dynamic SVG file.
|
|
||||||
required: false
|
|
||||||
default: image/jpeg
|
|
||||||
type: string
|
|
||||||
framerate:
|
framerate:
|
||||||
description: The number of frames-per-second (FPS) of the stream. Can cause heavy traffic on the network and/or heavy load on the camera.
|
description: The number of frames-per-second (FPS) of the stream. Can cause heavy traffic on the network and/or heavy load on the camera.
|
||||||
required: false
|
|
||||||
default: 2
|
|
||||||
type: integer
|
|
||||||
verify_ssl:
|
verify_ssl:
|
||||||
description: Enable or disable SSL certificate verification. Set to false to use an http-only camera, or you have a self-signed SSL certificate and haven't installed the CA certificate to enable verification.
|
description: Enable or disable SSL certificate verification. Set to false to use an http-only camera, or you have a self-signed SSL certificate and haven't installed the CA certificate to enable verification.
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
rtsp_transport:
|
rtsp_transport:
|
||||||
description: "Set the RTSP transport protocol to `tcp`, `udp`, `udp_multicast` or `http`."
|
description: "Set the RTSP transport protocol to `tcp`, `udp`, `udp_multicast` or `http`."
|
||||||
required: false
|
{% endconfiguration_basic %}
|
||||||
type: string
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
<p class='img'>
|
<p class='img'>
|
||||||
<a href='/examples/google_maps_card/'>
|
<a href='/examples/google_maps_card/'>
|
||||||
@ -91,85 +55,46 @@ In this section, you find some real-life examples of how to use this camera plat
|
|||||||
|
|
||||||
### Weather graph from yr.no
|
### Weather graph from yr.no
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `https://www.yr.no/en/content/1-72837/meteogram.svg`
|
||||||
camera:
|
|
||||||
- platform: generic
|
Instructions on how to locate the SVG for your location are available at [developer.yr.no](https://developer.yr.no/doc/guides/deprecating-old-widgets/)
|
||||||
name: Weather
|
|
||||||
still_image_url: https://www.yr.no/en/content/1-72837/meteogram.svg
|
|
||||||
content_type: "image/svg+xml"
|
|
||||||
```
|
|
||||||
Instructions on how to locate the SVG for your location is available at [developer.yr.no](https://developer.yr.no/doc/guides/deprecating-old-widgets/)
|
|
||||||
|
|
||||||
### Local image
|
### Local image
|
||||||
|
|
||||||
You can show a static image with this platform. Just place the image here: `/config/www/your_image.png`
|
You can show a static image with this platform. Just place the image here: `/config/www/your_image.png`
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `https://127.0.0.1:8123/local/your_image.png`
|
||||||
camera:
|
|
||||||
- platform: generic
|
|
||||||
name: Some Image
|
|
||||||
still_image_url: https://127.0.0.1:8123/local/your_image.png
|
|
||||||
verify_ssl: false
|
|
||||||
```
|
|
||||||
|
|
||||||
### Sharing a camera feed from one Home Assistant instance to another
|
### Sharing a camera feed from one Home Assistant instance to another
|
||||||
|
|
||||||
If you are running more than one Home Assistant instance (let's call them the 'host' and 'receiver' instances) you may wish to display the camera feed from the host instance on the receiver instance. You can use the [REST API](https://developers.home-assistant.io/docs/api/rest/#get-apicamera_proxycameraentity_id) to access the camera feed on the host (IP address 127.0.0.5) and display it on the receiver instance by configuring the receiver with the following:
|
If you are running more than one Home Assistant instance (let's call them the 'host' and 'receiver' instances) you may wish to display the camera feed from the host instance on the receiver instance. You can use the [REST API](https://developers.home-assistant.io/docs/api/rest/#get-apicamera_proxycameraentity_id) to access the camera feed on the host (IP address 127.0.0.5) and display it on the receiver instance by configuring the receiver with the following:
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `https://127.0.0.5:8123/api/camera_proxy/camera.live_view`
|
||||||
camera:
|
|
||||||
- platform: generic
|
|
||||||
name: Host instance camera feed
|
|
||||||
still_image_url: https://127.0.0.5:8123/api/camera_proxy/camera.live_view
|
|
||||||
```
|
|
||||||
|
|
||||||
### Image from HTTP only camera
|
### Image from HTTP only camera
|
||||||
|
|
||||||
To access a camera which is only available via HTTP, you must turn off SSL verification.
|
To access a camera which is only available via HTTP, you must turn off SSL verification.
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `http://example.org/your_image.png`
|
||||||
camera:
|
|
||||||
- platform: generic
|
|
||||||
name: Some Image
|
|
||||||
still_image_url: http://example.org/your_image.png
|
|
||||||
verify_ssl: false
|
|
||||||
```
|
|
||||||
|
|
||||||
### Live stream
|
### Live stream
|
||||||
|
|
||||||
To access a camera that has both a snapshot and live stream URL, utilizing the [stream](/integrations/stream/) component.
|
To access a camera that has both a snapshot and live stream URL, utilizing the [stream](/integrations/stream/) component.
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `http://194.218.96.92/jpg/image.jpg`
|
||||||
camera:
|
- Stream Source: `rtsp://user:pass@194.218.96.92:554`
|
||||||
- platform: generic
|
|
||||||
name: Streaming Enabled
|
|
||||||
still_image_url: http://194.218.96.92/jpg/image.jpg
|
|
||||||
username: user
|
|
||||||
password: pass
|
|
||||||
stream_source: rtsp://user:pass@194.218.96.92:554
|
|
||||||
```
|
|
||||||
|
|
||||||
If a camera only has a live stream URL and no snapshot URL, the [stream](/integrations/stream/) component can also generate still images from the live stream URL.
|
If a camera only has a live stream URL and no snapshot URL, the [stream](/integrations/stream/) component can also generate still images from the live stream URL.
|
||||||
|
|
||||||
```yaml
|
- Stream Source: `rtsp://user:pass@194.218.96.92:554`
|
||||||
camera:
|
|
||||||
- platform: generic
|
|
||||||
name: Streaming
|
|
||||||
stream_source: rtsp://user:pass@194.218.96.92:554
|
|
||||||
```
|
|
||||||
|
|
||||||
### Secured access to the camera
|
### Secured access to the camera
|
||||||
|
|
||||||
To access a camera that requires secured access for still image or live stream (an HIK in my case).
|
To access a camera that requires secured access for still image or live stream (an HIK in my case).
|
||||||
|
|
||||||
```yaml
|
- Still Image URL: `http://192.168.1.100/ISAPI/Streaming/Channels/101/picture`
|
||||||
camera:
|
- Stream Source: `rtsp://USERNAME:PASSWORD@192.168.1.100:554/Streaming/Channels/102`
|
||||||
- platform: generic
|
- Verify SSL: `false`
|
||||||
still_image_url: "http://192.168.1.100/ISAPI/Streaming/Channels/101/picture"
|
- Username: `user`
|
||||||
stream_source: "rtsp://USERNAME:PASSWORD@192.168.1.100:554/Streaming/Channels/102"
|
- Password: `pass`
|
||||||
name: "My Camera"
|
- Authentication: `digest`
|
||||||
verify_ssl: false
|
|
||||||
username: "USERNAME"
|
|
||||||
password: "PASSWORD"
|
|
||||||
authentication: digest
|
|
||||||
```
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user