Pi Automated House Lights

Some people may call it laziness but I call in convenience. I really like the idea of automating simple tasks in your life so you can focus on more important things. The first time I tried to do this was with automated lights for my room in my second year of university in 2019. I used a Raspberry Pi and two PIR sensors and the idea was that by using two sensors you could sense direction rather than just motion. With this you could count the people in the room and only have the lights go off when no one was there. I had had enough of annoying lights that would go off while you were still in the room. This worked kind of well but the sensors were somewhat unresponsive and if multiple people came in at once it wouldn't always count them. I now use home assistant for automation and find mmWave sensors such as the EP1 or EP Lite are much better for detecting presence.

Code