Let a sleep pose trigger a fan

They built a Raspberry Pi setup that watches sleeping posture and flips a fan on or off with a remote button pusher.

Done with Custom agent· Advanced· Feb 2026

What they did
They ran a MediaPipe pose model on a Raspberry Pi home server with a camera aimed at the sleeping person. The system checked body position in real time and sent commands to a button-pushing device: an outstretched arm or leg meant fan on, while curled arms meant fan off. The person set the pose rules and installed the hardware.
How it went
The fan can switch itself overnight without waking the user. It still has trouble when blankets obscure the body, and work is ongoing to improve that.
Tips
Start with a test mode that only logs detected poses before tying it to any physical control. Expect bed covers to make pose detection less reliable.

Try it yourself with Claude Code

Help me build a [Raspberry Pi model] setup with a camera that watches for my sleeping pose using a pose-detection model. I want it to log detections first, then, only after I approve, trigger a [fan / relay / smart plug / remote button pusher] when it sees [pose A] and switch it off when it sees [pose B]. Write the code, hardware steps, and a safe test mode that does not control anything yet. Stop and ask for confirmation before enabling any action that could power on, power off, send, or submit anything.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Read the original on x.com ↗

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.