Wifi camera with pixel-based motion detection

Hi all,

I’m currently using some cheap wifi cameras in conjunction with Tradfri motion detection sensors to record from RTSP stream upon detecting motion, but so far this approach is generating too many unwanted recordings due to the sensors covering a larger area than I need them to.

This makes me consider buying a wifi camera with pixel-based motion detection and I’m looking for some tips around that.

Requirements for the camera:

  • Wifi (i.e. not Ethernet), 2.4 GHz is ok, but 5 GHz network is nice to have.
  • IR LEDs can be turned off separately from the night picture mode (since the camera will be mounted close to a window glass).
  • 1080p video with RTSP stream.
  • Pixel-based motion detection. Setting more than one activity zone is preferred, but only 1 rectangle should do as well.
  • Motion detection must be pushed (i.e. not pulled by) into HA via ONVIF, MQTT, shell command (e.g. curl/wget) or another HA integration.
  • I will on purpose block the camera from accessing the internet, so the motion detection and posting the alert to HA must be handled by the camera locally. Also, using any additional services to parse the RTSP stream to detect motion is not an option for me - I want the camera to handle that and ping HA upon detecting motion.
  • PTZ is nice to have and not crucial at all.
  • Price up to 100 EUR.

This is what I have tried so far:

  1. TP-Link Tapo C200
  • IR LEDs cannot be turned off separately from the night picture mode.
  • Couldn’t get the HA ONVIF integration to pick up the motion sensor. When connecting to the camera’s ONVIF end-point manually via SoapUI, I’ve figured that the ONVIF capabilities are very limited - you can get the pull-based (can’t recall the formal name from the ONVIF specs) motion detection events to work, but it’s very buggy. No wonder it’s not detected by HA ONVIF integration.
  • No PTZ available via ONVIF.
  1. Reolink E1 Pro
  • Claims to have support for ONVIF, but motion detection events do not work neither through HA ONVIF integration, nor when connecting to the ONVIF end-point manually.
  • Poor wifi signal.
  1. https://github.com/ThatUsernameAlreadyExist/JCO-PM203-Fisheye-Ingenic-T20-P2P-camera-hacks/blob/94e058cd73c1274642f3ccce561dac7a94e208ce/hacks/microsd/scripts/detectionOn.sh
  • I have simply added a curl command to POST a binary sensor turn on command to HA API and it works great. I really like the simplicity and the robustness of this solution. The problem is the camera itself - the RTSP stream constantly dies, the image quality is not so great and the fish eye lens is not perfect for my use case.

Appreciate any feedback around this!

Ended up ordering a couple of Xiaofang 1S from here https://www.aliexpress.com/item/32978193232.html , but still would like to know your thoughts on the alternatives

Hi there,

For me Foscam worked pretty well:

# Motion detection
  - platform: command_line
    name: "MotionDetector"
    command: !secret foscam_status_url
    value_template: >-
      {% set status = value | regex_findall_index('alarm_status=(\d+);') %}
      {%- if status == "0" -%}
        None
      {%- elif status == "1" -%}
        Detected
      {% else %}
        Not Determined
      {%- endif -%}
    scan_interval: 3

with secret.yaml containing the curl:
foscam_status_url: curl -k --silent "http://192.168.0.y/get_status.cgi?user=<username>&pwd=<password>"

Thanks aceindy!

I understand that this sensor will poll the camera’s logs every 3 seconds. In a perfect world I’d like to avoid any polling and rather have the camera post an event into HA once the motion is detected.

An update on Xiaofang 1S: turns out it comes with the T20L processor (as opposed to T20 mentioned in user reviews section of the Aliexpress listing), which doesn’t seem to work well with Xiaomi Dafang Hacks.

I’ve canceled the order and continue looking for other options.

Hi guys

Fairly new to HA and I did notice already that it’s being used for camera’s/recording.
I have a dedicated NVR for camera’s and have played with ZoneMinder before, which I plan to look into again soon.

Is there some specific reason/advantage to do this with HA?

Nick

For me not really, but:

  • it is nice to use an existing camera for motion detection, so I can use it in automation
  • also nice to have my camera on my LoveLace HA dashboard (using one as baby cam)

FYI the 1.0.14 firmware seems to have enabled motion detection via ONVIF integration. My C200 cameras now have 3 entities when added:

binary_sensor.mymotiondetectorrule_cell_motion_detection
camera.rear_camera_mainstream
camera.rear_camera_minorstream

I’m 99% certain this wasn’t the case when I got them. I haven’t investigated in detail if its linked to zone detection in the Tapo app but state definately changes.

Thanks for following up on this thread!

How recent is the 1.0.14 firmware for Tapo C200? I have already returned mine, so cannot verify the version, but my unit didn’t handle ONVIF well - the request to subscribe to events via ONVIF often failed with some generic error like HTTP 500.

At the moment I’m using IMOU Dome Lite and I’m pretty happy with it. It comes with built-in web admin and CGI API, which allows me to define up 4 zones for pixel-based motion detection and upload snapshots/recording of the motion to an FTP. I use the FTP add-on to host the service and the Folder Watcher integation watching the FTP folder to trigger events within HA.

However, I’m considering to add a few more cameras, so now I’m wondering if I should revisit Tapo C200 since it’s half the price of the IMOU camera.

Cant find an exact date for the frimware but i’m guessing its no more then 2 months old. The full version is:

Version 1.0.14 Build 200720 Rel. 38552n (4555)

You know how useless Tapo/TPLink are at sharing info :frowning: There is still no PTZ support though. I’m just in the process of doing a clean install of HA on new hardware so havent tested it fully yet with automations etc but I will get back to you (via this thread) on what I find over the next few days.

Quick update - the Motion sensors keep changing to unavailable in HA when no motion is detected for a period of time. When motion is detected the censors become avaiable again. Whilst they are available state changes are reflected (clear/detected). Not yet clear what impact this has on automations.