One of the first things I usually do in the morning is sit down at my desk in my office and work on this blog or catch up on the news. To add some automation to my setup I wanted to detect if I was at my desk so I could properly light the room. Using an Ultrasonic Distance Sensor with a NodeMCU, I used distance to determine if someone was sitting at the desk or not.
I’m just using this today to trigger lighting in the room. You could use this to start up your PC using Wake on LAN or anything else to automate your routine. Think of this setup as a basic form of room based presence detection. I am the main person who uses the office in my household and I’m always at my desk when I’m working. This idea could be extended to cover multiple desks within a room.