A community project called Animal Detector has appeared on the Home Assistant forum. It is an add-on you train on photos from your own camera so it can spot an animal of your choice, then report that animal as a presence sensor. The author built it for a bearded dragon, but says nothing in the code is species-specific. Cats, dogs or birds at a feeder should work the same way with a model trained for them.
What was announced
The workflow has three steps, according to the forum post and the GitHub repository:
- Label photos from your camera with a bundled browser tool. It runs locally, and the photos stay on your machine.
- Train a YOLOv8n model on Kaggle’s free GPU using the included notebook.
- Install the add-on, which grabs a frame through Home Assistant’s authenticated camera proxy every scan interval (10 seconds by default) and runs the whole frame through the model on the CPU.
Results are published over MQTT discovery as a binary_sensor.<camera>_<class>_present entity and a sensor.<camera>_<class>_last_seen timestamp. It needs the Mosquitto broker add-on and works with any camera that exists as a camera entity in Home Assistant.
Design choices worth noting
- There is no motion gate, so an animal that sits perfectly still is still detected.
- It is detection only. It controls nothing; your own automations act on the presence sensor.
- It opens no listening ports and has no web UI. The add-on never holds your camera credentials, and MQTT requires a username and password.
- If the camera or add-on fails, the sensor reads unavailable rather than a false "absent". That matters if you ever hang a heater or light on it.
- The model file’s SHA-256 is checked on every load.
The included bearded dragon model (v1.0.0) scored precision 0.84, recall 0.77 and mAP50 0.81. The author says accuracy on your camera improves with labeled frames from that camera. An optional, off-by-default activity feature estimates time spent in zones you draw, and the project describes these as zone-time estimates, not health monitoring.
The catch: not yet tested live
The author states plainly that v1.0.0 has not yet been tested on a live Home Assistant installation. So far it has automated tests, a simulated end-to-end run and model checks on sample photos. We have not run it either, so treat it as an early project.
What it means for an installed system
- Hardware: the repo says any 64-bit x86 PC with SSE3 works, as does 64-bit ARM such as a Pi 4 or Pi 5 on a 64-bit OS. A 32-bit ARM build exists too. One scan peaked near 110 MB of memory and about 0.05 seconds of CPU on the author’s modest test machine, and 1 to 2 GB of RAM is said to be plenty. You can raise the scan interval on a busy box.
- Before installing: take a Home Assistant backup first, and check that your MQTT broker requires authentication, since anonymous brokers are refused.
- Camera choice: it pulls stills through the camera entity, so a camera that serves a reliable snapshot will do better than one that struggles to produce frames.
- Wait or try? If you just need a pet or wildlife sensor that is dependable today, wait for the author to post live test results. If you enjoy tinkering, it is a low-risk experiment because it only reads frames and publishes sensors. Reports and issues are welcome on the repo.
Training your own model does take effort: labeling photos, running a notebook, and copying the model and label map into the /share/animal_detector/ folder. For a single animal in a fixed enclosure or yard view, that effort is what buys accuracy. The data stays local apart from the Kaggle training step, where you upload your labeled set yourself.
