Android IP Webcam


The android_ip_webcam integration turns any Android phone or tablet into a network camera with multiple viewing options.

It’s setup as an MJPEG camera and all settings as switches inside of Home Assistant. You can also expose the sensors. If you have multiple phones, you can use all options inside a list.

There is currently support for the following device types within Home Assistant:

  • Binary Sensor
  • Camera
  • Sensor
  • Switch

Setup

Download the IP Webcam app 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:

# Example configuration.yaml entry
android_ip_webcam:
  - host: 192.168.1.10

Configuration Variables

host

(string)(Required)The IP address of the phone on the network.

port

(integer)(Optional)The port the IP Webcam listens on.

Default value: 8080

name

(string)(Optional)Override the name of the phone.

Default value: IP Webcam

username

(string)(Inclusive)The username to access the phone.

password

(string)(Inclusive)The password to access the phone.

scan_interval

(integer)(Optional)Defines the update interval of the phone.

Default value: 10

sensors

(list)(Optional)Conditions to display sensor in the frontend. See the list of supported sensors.

audio_connections

The audio connections

battery_level

The battery level

battery_temp

The battery temperature

battery_voltage

The battery voltage

light

The light level

motion

Motion detection

pressure

The current pressure

proximity

The proximity

sound

The sound detection

video_connections

The video connections

switches

(list)(Optional)Conditions to display settings in the frontend. See the list of supported switches.

exposure_lock

Control the exposure lock

ffc

Control the front-facing camera.

focus

Control the focus.

gps_active

Control the GPS.

night_vision

Control the night vision.

overlay

Control the overlay.

torch

Control the torch.

whitebalance_lock

Control the white balance lock.

video_recording

Control the video recording.

motion_sensor

(boolean)(Optional)Activate motion sensor if `auto_discovery` is disabled.

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 stays as unknown, until it’s enabled.

Full example

# 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
      - night_vision
      - overlay
      - torch
      - whitebalance_lock
      - video_recording
  - host: 192.168.1.203
    port: 8000
    sensors:
      - light
    switches:
      - torch

Binary Sensor

The android_ip_webcam binary sensor platform lets you observe the motion state of Android IP webcam sensors through Home Assistant. Devices will be configured automatically.

Examples

You can also setup the binary motion sensor with the following script:

binary_sensor:
  - platform: rest
    name: Kitchen Motion
    sensor_class: motion
    resource: http://IP:8080/sensors.json?sense=motion_active
    value_template: '{{ value_json.motion_active.data[0][1][0] | round(0) }}'

Camera

The android_ip_webcam integration adds a camera by default if you choose not to use the integration but still want to see the video feed then the mjpeg camera platform can be used.

Configuration

To enable only the camera in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
camera:
  - platform: mjpeg
    mjpeg_url: http://IP_ADDRESS:8080/video

Sensor

The android_ip_webcam sensor platform lets you observe states of Android IP webcam sensors through Home Assistant. Devices will be configured automatically.

You can setup your own sensors by examining the JSON file from the webcam server: http://IP:8080/sensors.json