I have a remote controlled light and a remote controlled fan. I want to automatically turn on the fan and light when a human comes into the room and turn off when a human leaves the room.

I need to know the distance of the passing object because I would have to come up with a logic to know whether the passing object is a human or just the door closing.

I see various sensors such as proximity sensors, infrared sensors, lasers but I'm not sure what to use.

Lastly, I would need IR receivers and emitters to record my remote control. I want to connect these sensors to my raspberry pi.

So what sensors should I use? And will I be able to plug these sensors to my raspberry PI (any need to get additional board such as arduino)?

1 Answer 1


I don't think you want a setup reacting instantly on entering/leaving a person (imagine someone sitting calmly for while)

So a pir sensor which triggers with a hysteresis of minutes (like a staircase light) should suffice.

I'd suggest an USB-IR-transceiver controlled with LIRC for lights and fan.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.