From 7bf932a46c5f7756b82f7e96a77ea987b3622bd6 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 6 Mar 2020 21:21:00 -0600 Subject: [PATCH 01/10] Add homekit camera docs --- source/_integrations/homekit.markdown | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 371c9ff73424..5aa1a34ddc59 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -50,6 +50,8 @@ homekit: - feature: toggle_mute switch.bedroom_outlet: type: outlet + camera.back_porch: + support_audio: True ``` {% configuration %} @@ -149,6 +151,56 @@ homekit: required: false type: string default: '`switch`' + stream_address: + description: Only for `camera` entities. The source IP address to use when streaming to RTP clients. If your Home Assistant host has multiple interfaces, selecting a specific IP may be necessary. + required: false + type: string + default: local IP from Home Assistant Core + stream_source: + description: Only for `camera` entities. A URL, file or other valid FFmpeg input string to use as the stream source, rather than the default camera source. Required for camera entities that do not natively support streaming (mjpeg). If `-i` is not found in the stream source, it is prepended to construct the FFmpeg input. + required: false + type: string + default: stream source from camera entity + support_audio: + description: Only for `camera` entities. Whether the camera supports audio. Audio is disabled unless this flag is set to `True`. + required: false + type: boolean + default: '`False`' + max_width: + description: Only for `camera` entities. Maximum width supported by camera. Used when generating advertised video resolutions. + required: false + type: integer + default: 1920 + max_height: + description: Only for `camera` entities. Maximum height supported by camera. Used when generating advertised video resolutions. + required: false + type: integer + default: 1080 + max_fps: + description: Only for `camera` entities. Maximum fps supported by camera. Used when generating advertised video resolutions. + required: false + type: integer + default: 30 + audio_map: + description: Only for `camera` entities. FFmpeg [stream selection mapping](https://ffmpeg.org/ffmpeg.html#Stream-selection) for the audio-only stream. Selects the first audio stream in the input stream by default. If your input stream has multiple audio streams, this may need to be adjusted. + required: false + type: string + default: '`0:a:0`' + video_map: + description: Only for `camera` entities. FFmpeg [stream selection mapping](https://ffmpeg.org/ffmpeg.html#Stream-selection) for the video-only stream. Selects the first video stream in the input stream by default. If your input stream has multiple video streams, this may need to be adjusted. + required: false + type: string + default: '`0:v:0`' + audio_packet_size: + description: Only for `camera` entities. RTP packet size used for streaming audio to HomeKit clients. + required: false + type: integer + default: 188 + video_packet_size: + description: Only for `camera` entities. RTP packet size used for streaming video to HomeKit clients. + required: false + type: integer + default: 1316 {% endconfiguration %} @@ -350,6 +402,7 @@ The following integrations are currently supported: | alarm_control_panel | SecuritySystem | All security systems. | | automation / input_boolean / remote / scene / script | Switch | All represented as switches. | | binary_sensor | Sensor | Support for `co2`, `door`, `garage_door`, `gas`, `moisture`, `motion`, `occupancy`, `opening`, `smoke` and `window` device classes. Defaults to the `occupancy` device class for everything else. | +| camera | Camera | All camera devices. | | climate | Thermostat | All climate devices. | | cover | GarageDoorOpener | All covers that support `open` and `close` and have `garage` as their `device_class`. | | cover | WindowCovering | All covers that support `set_cover_position`. | @@ -489,6 +542,14 @@ Media Player entities with `device_class: tv` will show up as Television accesso The volume and play/pause controls will show up on the Remote app or Control Center. If your TV supports volume control through Home Assistant, you will be able to control the volume using the side volume buttons on the device while having the remote selected on screen. +#### Camera video is not streaming + +Ensure you have a recent version of FFmpeg installed. Verify that your stream is directly playable with `ffplay `. If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). + +#### Camera audio is not streaming + +Make sure `support_audio` is `True` in the camera's entity config. FFmpeg *must* be compiled with `--with-fdk-aac` for audio support. Check with `ffmpeg -encoders`, ensuring `libfdk_aac` is in the list. + #### Resetting accessories On Home Assistant `0.97.x` or later, you may use the service `homekit.reset_accessory` with one or more entity_ids to reset accessories whose configuration may have changed. This can be useful when changing a media_player's device class to `tv`, linking a battery, or whenever Home Assistant adds support for new HomeKit features to existing entities. From c9c753af9dcdaeabec4bf948b61ac82632badf88 Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Fri, 6 Mar 2020 21:30:52 -0600 Subject: [PATCH 02/10] Lint homekit camera docs --- source/_integrations/homekit.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 5aa1a34ddc59..af3e634bc8e1 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -548,7 +548,7 @@ Ensure you have a recent version of FFmpeg installed. Verify that your stream is #### Camera audio is not streaming -Make sure `support_audio` is `True` in the camera's entity config. FFmpeg *must* be compiled with `--with-fdk-aac` for audio support. Check with `ffmpeg -encoders`, ensuring `libfdk_aac` is in the list. +Make sure `support_audio` is `True` in the camera's entity configuration. FFmpeg *must* be compiled with `--with-fdk-aac` for audio support. Check with `ffmpeg -encoders`, ensuring `libfdk_aac` is in the list. #### Resetting accessories From 30ca3f801cbe44364a2830334195258e1b083c9d Mon Sep 17 00:00:00 2001 From: Greg Thornton Date: Sat, 7 Mar 2020 13:40:23 -0600 Subject: [PATCH 03/10] Apply suggestions from code review Co-Authored-By: Franck Nijhof --- source/_integrations/homekit.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index af3e634bc8e1..02bfbd11ed01 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -155,9 +155,9 @@ homekit: description: Only for `camera` entities. The source IP address to use when streaming to RTP clients. If your Home Assistant host has multiple interfaces, selecting a specific IP may be necessary. required: false type: string - default: local IP from Home Assistant Core + default: local IP from Home Assistant stream_source: - description: Only for `camera` entities. A URL, file or other valid FFmpeg input string to use as the stream source, rather than the default camera source. Required for camera entities that do not natively support streaming (mjpeg). If `-i` is not found in the stream source, it is prepended to construct the FFmpeg input. + description: Only for `camera` entities. A URL, file or other valid FFmpeg input string to use as the stream source, rather than the default camera source. Required for camera entities that do not natively support streaming (MJPEG). If `-i` is not found in the stream source, it is prepended to construct the FFmpeg input. required: false type: string default: stream source from camera entity @@ -548,7 +548,7 @@ Ensure you have a recent version of FFmpeg installed. Verify that your stream is #### Camera audio is not streaming -Make sure `support_audio` is `True` in the camera's entity configuration. FFmpeg *must* be compiled with `--with-fdk-aac` for audio support. Check with `ffmpeg -encoders`, ensuring `libfdk_aac` is in the list. +Make sure `support_audio` is `True` in the camera's entity configuration. FFmpeg *must* be compiled with `--with-fdk-aac` for audio support. Check with `ffmpeg -encoders`, ensuring `libfdk_aac` is on the list. #### Resetting accessories From 70644bf4620639690a33b3fc94c82b972312a2b1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 15:28:35 -0500 Subject: [PATCH 04/10] Update docs for cameras --- source/_integrations/homekit.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index e7f53ab021ac..aebe81ac30f1 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -585,7 +585,7 @@ The volume and play/pause controls will show up on the Remote app or Control Cen #### Camera video is not streaming -Ensure you have a recent version of FFmpeg installed. Verify that your stream is directly playable with `ffplay `. If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). +Ensure that the [`ffmpeg` intergration](../ffmpeg) is configured correctly. Verify that your stream is directly playable with `ffplay ` or [VLC Media Player](https://www.videolan.org/). If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). #### Camera audio is not streaming From 76434050f5492089504cca5bd40a9a346d60cc26 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 15:33:03 -0500 Subject: [PATCH 05/10] Update homekit.markdown --- source/_integrations/homekit.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index aebe81ac30f1..57ab9e9ed1d3 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -431,7 +431,7 @@ The following integrations are currently supported: | alarm_control_panel | SecuritySystem | All security systems. | | automation / input_boolean / remote / scene / script / vacuum | Switch | All represented as switches. | | binary_sensor | Sensor | Support for `co2`, `door`, `garage_door`, `gas`, `moisture`, `motion`, `occupancy`, `opening`, `smoke` and `window` device classes. Defaults to the `occupancy` device class for everything else. | -| camera | Camera | All camera devices. | +| camera | Camera | All camera devices. **HomeKit Secure Video is NOT supported at this time** | | climate | Thermostat | All climate devices. | | cover | GarageDoorOpener | All covers that support `open` and `close` and have `garage` or `gate` as their `device_class`. | | cover | WindowCovering | All covers that support `set_cover_position`. | @@ -453,6 +453,8 @@ The following integrations are currently supported: | switch | Switch | Represented as a switch by default but can be changed by using `type` within `entity_config`. | | water_heater | WaterHeater | All `water_heater` devices. | + + ## Troubleshooting ### Resetting when created via YAML From 19c07325fbc2bfb26609fc0bddf0bfe4837c625c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 15:33:38 -0500 Subject: [PATCH 06/10] Update homekit.markdown --- source/_integrations/homekit.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 57ab9e9ed1d3..ccef1f4cf0a6 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -431,7 +431,7 @@ The following integrations are currently supported: | alarm_control_panel | SecuritySystem | All security systems. | | automation / input_boolean / remote / scene / script / vacuum | Switch | All represented as switches. | | binary_sensor | Sensor | Support for `co2`, `door`, `garage_door`, `gas`, `moisture`, `motion`, `occupancy`, `opening`, `smoke` and `window` device classes. Defaults to the `occupancy` device class for everything else. | -| camera | Camera | All camera devices. **HomeKit Secure Video is NOT supported at this time** | +| camera | Camera | All camera devices. **HomeKit Secure Video is not supported at this time.** | | climate | Thermostat | All climate devices. | | cover | GarageDoorOpener | All covers that support `open` and `close` and have `garage` or `gate` as their `device_class`. | | cover | WindowCovering | All covers that support `set_cover_position`. | From d0705158df21eefcc54e31a4cfe43aff7a11db2e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 15:35:31 -0500 Subject: [PATCH 07/10] Update homekit.markdown --- source/_integrations/homekit.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index ccef1f4cf0a6..dd6932f00de0 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -587,7 +587,7 @@ The volume and play/pause controls will show up on the Remote app or Control Cen #### Camera video is not streaming -Ensure that the [`ffmpeg` intergration](../ffmpeg) is configured correctly. Verify that your stream is directly playable with `ffplay ` or [VLC Media Player](https://www.videolan.org/). If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). +Ensure that the [`ffmpeg`](../ffmpeg) integration is configured correctly. Verify that your stream is directly playable with `ffplay ` or [VLC Media Player](https://www.videolan.org/). If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). #### Camera audio is not streaming From 7c030f3a2eb7d842f8a5294f6e01e1bd58536bde Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 15:36:22 -0500 Subject: [PATCH 08/10] Update homekit.markdown --- source/_integrations/homekit.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index dd6932f00de0..ef90c98119a5 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -453,8 +453,6 @@ The following integrations are currently supported: | switch | Switch | Represented as a switch by default but can be changed by using `type` within `entity_config`. | | water_heater | WaterHeater | All `water_heater` devices. | - - ## Troubleshooting ### Resetting when created via YAML From 2644b59b36117a39fe01d252c7cdf1927186cf90 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 May 2020 21:38:59 -0500 Subject: [PATCH 09/10] Update homekit.markdown --- source/_integrations/homekit.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index ef90c98119a5..59212d3960ec 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -591,6 +591,10 @@ Ensure that the [`ffmpeg`](../ffmpeg) integration is configured correctly. Verif Make sure `support_audio` is `True` in the camera's entity configuration. +#### HomeKit stalls or devices respond slow with many cameras + +HomeKit updates each camera snapshot sequentially when there are multiple cameras on a bridge. The HomeKit update methodology can lead to the app stalling or taking a while to update. To avoid this problem, limit each `HomeKit Bridge` to 6 cameras and create a new `HomeKit Bridge` for additional cameras. + #### Resetting accessories On Home Assistant `0.97.x` or later, you may use the service `homekit.reset_accessory` with one or more entity_ids to reset accessories whose configuration may have changed. This can be useful when changing a media_player's device class to `tv`, linking a battery, or whenever Home Assistant adds support for new HomeKit features to existing entities. From f250df2e54d7b53a918f51b00f9739dddb8afa9e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 7 May 2020 00:07:57 +0200 Subject: [PATCH 10/10] :pencil2: Tweaks --- source/_integrations/homekit.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 59212d3960ec..a7751a1eeccd 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -585,15 +585,15 @@ The volume and play/pause controls will show up on the Remote app or Control Cen #### Camera video is not streaming -Ensure that the [`ffmpeg`](../ffmpeg) integration is configured correctly. Verify that your stream is directly playable with `ffplay ` or [VLC Media Player](https://www.videolan.org/). If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). +Ensure that the [`ffmpeg`](/integrations/ffmpeg) integration is configured correctly. Verify that your stream is directly playable with `ffplay ` or [VLC Media Player](https://www.videolan.org/). If you have changed your camera's entity configuration, you may need to [reset the accessory](#resetting-accessories). #### Camera audio is not streaming Make sure `support_audio` is `True` in the camera's entity configuration. -#### HomeKit stalls or devices respond slow with many cameras +#### HomeKit stalls or devices respond slowly with many cameras -HomeKit updates each camera snapshot sequentially when there are multiple cameras on a bridge. The HomeKit update methodology can lead to the app stalling or taking a while to update. To avoid this problem, limit each `HomeKit Bridge` to 6 cameras and create a new `HomeKit Bridge` for additional cameras. +HomeKit updates each camera snapshot sequentially when there are multiple cameras on a bridge. The HomeKit update methodology can lead to the app stalling or taking a while to update. To avoid this problem, limit each `HomeKit Bridge` to 6 cameras and create a new `HomeKit Bridge` for additional cameras. #### Resetting accessories