Android IP Webcam toggle motion detection

Hi. I have been stuck on this for a while and hope somebody can help. Still pretty new to Hass.io.

I have an android phone which has Android IP Webcam installed on it, also have it integrated into hass.io pretty easily. My problem is that I only want the camera to record when nobody is home. The easiest way I could think of doing this is by being able to toggle the motion detection recording. However, I can’t figure out how to toggle the motion detection.

There is the camera.disable_motion_detection but this does not seem to do anything. There is a toggle motion detection when I logon to the Android IP Webcams GUI interface but there seems to be no switch for this in Hass.io, at least not documented here: https://home-assistant.io/components/android_ip_webcam/

If anyone has a solution I would greatly welcome it.

Thank you.

I don’t use all the features of the app but could it be the “video_recording” switch that might do what you want?

I did try that, though sadly it seems that if motion detection is active it overrides my automation to have video recording off. Unless I’m missing something in the automation to force it to always have video recording off no matter what.

I’d love to see this switch enabled as well. As a work around, I’m going to have the motion detection always on but set up an action in automations that notifies me if motion is detected (numeric_state of motion sensor) and we’re away from home (mobile phone tracking). At least I’ll get a message then to make sure I review the footage before it gets written over.

I’ve got the notify working, just need to set up the tracking now.

I was able to get it configured properly by turning on the recording if motion was above a certain value and no one is home. Also set it up to record for 5 minutes after motion detection otherwise turn off recording. Here is my automation script. Sadly the automation panel in Hass.io can’t do time intervals yet for a setting so you have to amend it in the file.

- action:
  - alias: ''
    data:
      entity_id: switch.security_camera_video_recording
    service: switch.turn_on
  alias: 'Camera: Turn on camera on motion when nobody is home.'
  condition:
  - condition: state
    entity_id: group.family_group
    state: not_home
  id: '1517323546560'
  trigger:
  - above: '350'
    entity_id: sensor.security_camera_motion
    platform: numeric_state
- action:
  - alias: ''
    data:
      entity_id: switch.security_camera_video_recording
    service: switch.turn_off
  alias: 'Camera: Turn off when no motion detected'
  condition: []
  id: '1517323600118'
  trigger:
  - below: '350'
    entity_id: sensor.security_camera_motion
    for:
      minutes: 5
    platform: numeric_state

hope that helps a bit.

2 Likes

That’s a great idea. I’m guessing there’s a setting to allow motion detection without it recording the video, so that hass can control that bit? I’ll look in to that later. I’ve been having a problem with losing connection to the phone, at which point none of the sensors work. Have you experienced this? I’ve read about using Tasker to periodically restart the phone, just wondered if anyone knows why this might be happening?
Thanks

Mine has been running for a few weeks nonstop. Its an old Samsung On5 phone that I am using. I flashed an ultra lightweight rom onto it without anything really installed other than basic android things and the webcam app. I monitor the battery temp and its always around 23°.

I have not given Tasker a go yet on this phone but I know you can use it to restart the phone and start the app.