RackedPrice

Disclosure: We earn a commission from some links on this page. Details

Get an alert when someone walks in

A small motion sensor that can light a hallway or ping your phone.

Make and tinker1 hourEasy

Drafted with AI assistance, fact-checked and approved by RackedPrice.

  1. Plug the Qwiic PIR motion sensor into your Pi.
  2. Install SparkFun's PIR Python library and run its example.

    ~/sensors/bin/pip install sparkfun-qwiic-pir
  3. Wave a hand in front of it. The example prints "motion".
  4. Send that to Home Assistant over MQTT, then make an automation.

    Same setup as the room sensor how-to. Publish on to a topic like home/hall/motion when it sees motion. In Home Assistant, make an automation with an MQTT trigger on that topic that turns on a light or sends a notification.

Tip: Give it a minute to settle after power on. Motion sensors need a moment to warm up.
Build guide

Ready for a bigger build?

Our project guides walk through a whole build, with a parts list priced by our tracker.

See the projects

Shopping (optional)

What you'll need

SparkFun doesn't share prices with us, so check the price on its page.

More make and tinker how-tos