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 Android 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, default: 8080)

The port the IP Webcam listens on.

name string (Optional, default: IP Webcam)

Override the name of the phone.

username string (Inclusive)

The username to access the phone. If username is specified then password must be also.

password string (Inclusive)

The password to access the phone. If password is specified then username must be also.

scan_interval integer (Optional, default: 10)

Defines the update interval of the phone.

sensors list (Optional)

List of sensor entities to be created by this component.

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

Analog (not binary) amount of motion detected

pressure

The current pressure

proximity

The proximity

sound

The sound level

video_connections

The video connections

switches list (Optional)

List of switch entities to be created by this component.

exposure_lock

Control the exposure lock

ffc

Control the front-facing camera.

focus

Control the focus.

gps_active

Control the GPS.

motion_detect

Control the motion detector.

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, default: false)

Create a binary_sensor._motion_active entity. Note that auto_discovery may also create this sensor.

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
      - 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 automatically. 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:

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

Camera

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:PORT/video

Other Sensors

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