From 250c525b29871e5d04f0a01ca46d00ecacae720d Mon Sep 17 00:00:00 2001 From: Rami Mosleh Date: Thu, 11 Aug 2022 00:36:36 +0300 Subject: [PATCH] Add config flow to `android_ip_webcam` documentation (#23709) Co-authored-by: Franck Nijhof --- .../_integrations/android_ip_webcam.markdown | 174 +----------------- 1 file changed, 5 insertions(+), 169 deletions(-) diff --git a/source/_integrations/android_ip_webcam.markdown b/source/_integrations/android_ip_webcam.markdown index 2e5b2d16fcb..92c6473c18e 100644 --- a/source/_integrations/android_ip_webcam.markdown +++ b/source/_integrations/android_ip_webcam.markdown @@ -9,6 +9,7 @@ ha_category: - Switch ha_release: '0.40' ha_iot_class: Local Polling +ha_config_flow: true ha_domain: android_ip_webcam ha_platforms: - binary_sensor @@ -16,9 +17,11 @@ ha_platforms: - sensor - switch ha_integration_type: integration +ha_codeowners: + - '@engrbm87' --- -The `android_ip_webcam` integration connects with Android IP Webcam to turn any Android phone or tablet into a network camera with multiple viewing options. +The Android IP Webcam integration connects with Android IP Webcam to turn any Android phone or tablet into a network camera with multiple viewing options. The integration is setup as an MJPEG camera with all settings as switches inside Home Assistant. You can also integrate the sensors exposed by the app. If you have multiple phones, you can use all options inside a list. @@ -33,177 +36,10 @@ There is currently support for the following device types within Home Assistant: Download [Android IP Webcam app](https://play.google.com/store/apps/details?id=com.pas.webcam) and launch the app. When you press 'Start Server', it will start streaming video from your phone and the IP address of the device will be shown on screen. -## Configuration - -To set up the component, add the following information to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -android_ip_webcam: - - host: 192.168.1.10 -``` - -{% configuration %} -host: - description: The IP address of the phone on the network. - required: true - type: string -port: - description: The port the IP Webcam listens on. - required: false - default: 8080 - type: integer -name: - description: Override the name of the phone. - required: false - default: IP Webcam - type: string -username: - description: The username to access the phone. If username is specified then password must be also. - required: inclusive - type: string -password: - description: The password to access the phone. If password is specified then username must be also. - required: inclusive - type: string -scan_interval: - description: The update interval to use (in seconds). - required: false - default: 10 - type: integer -sensors: - description: List of sensor entities to be created by this component (if supported by the phone and app). - required: false - type: list - keys: - audio_connections: - description: The audio connections - battery_level: - description: The battery level - battery_temp: - description: The battery temperature - battery_voltage: - description: The battery voltage - light: - description: The light level - motion: - description: Analog (not binary) amount of motion detected - pressure: - description: The current pressure - proximity: - description: The proximity - sound: - description: The sound level - video_connections: - description: The video connections -switches: - description: List of switch entities to be created by this component. - required: false - type: list - keys: - exposure_lock: - description: Control the exposure lock - ffc: - description: Control the front-facing camera - focus: - description: Control the focus - gps_active: - description: Control the GPS - motion_detect: - description: Control the motion detector - night_vision: - description: Control the night vision - overlay: - description: Control the overlay - torch: - description: Control the torch - whitebalance_lock: - description: Control the white balance lock - video_recording: - description: Control the video recording -motion_sensor: - description: Create a binary_sensor._motion_active entity. Note that `auto_discovery` may also create this sensor. - required: false - type: boolean - default: false -{% endconfiguration %} +{% include integrations/config_flow.md %}
You need to enable logging in the Android app (`Data logging` > `Enable data logging`) if you wish to see the sensor states in Home Assistant. The sensor states stay as `unknown`, until this is enabled.
- -## Full example - -```yaml -# Example configuration.yaml entry -android_ip_webcam: - - host: 192.168.1.202 - port: 8000 - sensors: - - audio_connections - - battery_level - - battery_temp - - battery_voltage - - light - - motion - - pressure - - proximity - - sound - - video_connections - switches: - - exposure_lock - - ffc - - focus - - gps_active - - motion_detect - - night_vision - - overlay - - torch - - whitebalance_lock - - video_recording - - host: 192.168.1.203 - port: 8000 - sensors: - - light - switches: - - torch -``` - -## Alternate Configuration Method - -The configuration described above will cause the `android_ip_webcam` binary sensor platform to automatically create and configure the devices. Alternatively you can omit the `android_ip_webcam` component from your `configuration.yaml` file and add individual devices instead. - -### Binary Sensor - -You can setup the binary motion sensor with the following in your `configuration.yaml` file: - -{% raw %} - -```yaml -# Example configuration.yaml entry -binary_sensor: - - platform: rest - name: Kitchen Motion - device_class: motion - resource: http://IP_ADDRESS:PORT/sensors.json?sense=motion_active - value_template: "{{ value_json.motion_active.data[0][1][0] | round(0) }}" -``` - -{% endraw %} - -### Camera - -To enable only the camera in your installation, add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -camera: - - platform: mjpeg - mjpeg_url: http://IP_ADDRESS:PORT/video -``` - -### Other Sensors - -You can setup your own sensors by examining the JSON file from the webcam server: `http://IP:8080/sensors.json`