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.
Drafted with AI assistance, fact-checked and approved by RackedPrice.
- Plug the Qwiic PIR motion sensor into your Pi.
Install SparkFun's PIR Python library and run its example.
~/sensors/bin/pip install sparkfun-qwiic-pir- Wave a hand in front of it. The example prints "motion".
Send that to Home Assistant over MQTT, then make an automation.
Same setup as the room sensor how-to. Publish
onto a topic likehome/hall/motionwhen 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.
Ready for a bigger build?
Our project guides walk through a whole build, with a parts list priced by our tracker.
What you'll need
- Qwiic PIR motion sensorCheck price at SparkFun
- Qwiic Cable KitCheck price at SparkFun
SparkFun doesn't share prices with us, so check the price on its page.
More make and tinker how-tos
Set up your first Raspberry Pi
A tiny computer for learning, projects and small home servers.
30 minutesPlug sensors into a Pi (no soldering)
SparkFun's Qwiic cables click in one way only. No soldering, no wiring mistakes.
20 minutesMake a room temperature sensor
See a room's temperature and humidity in Home Assistant, from a sensor you put together.
1 hour