Android_ip_webcam

I came across this great post about configuring an android phone as a web camera.

The docs for the android_ip_webcam component are a bit sparse. Should we be using the new component to configure camera? What’s the “right” way to configure android_ip_webcam?

Cheers,
Gervais

you can configure it like this:

cameras.yaml

- platform: mjpeg
  mjpeg_url: http://YOUR_IP_CAM:8080/video
  name: Android //put what you want here
  username: (If you use)
  password: (If you use)

I changed my settings from:

camera:
  - name: 'Front Door'
    platform: mjpeg
    mjpeg_url: http://192.168.2.92:8080/video

to:

android_ip_webcam:
  - name: 'Front Door'
    host: 192.168.2.92
    sensors:
      - light
      - motion
    switches:
      - overlay

Although the old way worked, using android_ip_webcam is much better and show many more features. The overlay has the wrong time showing. It is off by 1/2 hour which is odd. Not sure what sets that.

Now I am trying to configure motion detection. Previously, I simply had this set as follows:

binary_sensor:
  - platform: ffmpeg_motion
    name: Front Door
    input: http://192.168.2.92:8080/video
    changes: 1

This worked, but I think it will work better if I can figure out the correct settings to use android_ip_webcam again here also.

1 Like

Any chance someone can help me out here or perhaps flush out the docs for binary_sensor.android_ip_webcam?

@gervaisedM , did you have any luck?
I could not understand how to use the binary_sensor of android_ip_webcam either…

I still have it configured the same as when i posted back in March.

Since the motion value is exposed by android_ip_webcam, an alternative would be to use the binary_sensor_threshold component, without using ffmpeg_motion which is for sure computationally more intensive (and replicating the work already performed by the android app)

I remember now… Motion and light were not working for me using android_ip_webcam. They show up in my interface like this:

did you activate motion detection in the app?

It was enabled, but it doesn’t work until data logging is enabled. Found this out from this post: Android IP webcam problem

:slight_smile:

1 Like

But still, that motion, even when enabled, is not a binary sensor. Is it?

No, it’s a numeric value. My configs look like:

# configuration.yml  
android_ip_webcam:
- name: 'Front Door'
  host: 192.168.2.92
  scan_interval: 1
  sensors:
    - battery_voltage
    - light
    - motion
  switches:
    - exposure_lock
    - ffc
    - focus
    - gps_active
    - night_vision
    - overlay
    - torch
    - whitebalance_lock
    - video_recording

# automations.yml
  - alias: 'Timed lights - Movement Front Door'
    trigger:
      platform: numeric_state
      entity_id: sensor.front_door_motion
      above: '200'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: group.outdoor_lights
        state: 'off'
      - condition: state
        entity_id: sun.sun
        state: 'below_horizon'
  action:
    service: homeassistant.turn_on
    entity_id: script.timed_outdoor

I haven’t really tested it, but I believe it should work fine.

1 Like

I am getting ERROR (MainThread) [homeassistant.loader] Unable to find component android_ip_webcam when I add this to configuration.yaml

android_ip_webcam:
  - host: <Android Device IP>
    name: "Android IP Camera"

Any idea why it’s not able to find the component?

Never mind, After updating the home assistant version, it is not complaining anymore.

i use hass.io and Works fine.

?any update on motion or sound activation logging?

Hope this fixes it: Android IP Webcam - Home Assistant

motion_sensor
(boolean)(Optional)
Create a binary_sensor._motion_active entity. Note that auto_discovery may also create this sensor.
Default value:
false