Office lights that stay on while you work
Motion lights in an office have one big problem. You sit still at the desk and the lights go out. This recipe fixes that with a smart plug that measures the monitor’s power. While the monitor is on, someone is at the desk, so the lights stay on.
Best for: A home office with a desk computer, dimmable lights, a motion sensor, and a monitor on a power-metering smart plug.
Not for: An office where you mostly work on a laptop with no external monitor.
Why this exists
A motion sensor cannot see someone typing. After a while it reports no motion, and the lights turn off in the middle of work. A presence sensor is one fix. Another is to use a signal you already have. Windows turns the display off after a few minutes without input, so the monitor’s power draw tells the house whether anyone is using the computer.
Logic
- Trigger: Office motion, the monitor’s power, or the lights turning off.
- Conditions: Lights only turn on if they were off. The music only starts on weekday work hours when my phone is home.
- Action: Set the lights, start or pause the music.
- Wait / timeout: 15 minutes without motion, plus the monitor in standby.
- Stop condition: Both “empty” signals together turn off the lights.
- Manual override: The wall switch and the speaker’s own app keep working.
What I used
Know someone is at the desk
A smart plug with power metering on the monitor. The device guide lists power-metering plugs.
Know someone walked in
A motion sensor in the office, and an outdoor light sensor in the front yard for the dark check.
Know I am home
Phone presence from the UniFi network.
Play the music
A Sonos speaker in the office.
See recommended gear for the job-first checklist. Product recommendations and any future affiliate relationships are explained in the disclosure.
Setup notes
- In Windows power settings, set the screen to turn off after a short idle time. I use 5 minutes.
- Plug the monitor into the power-metering plug. Watch its power while on and in standby. In standby it should read well under 10 W.
- Set the “off” threshold between those two readings.
- Check the dark threshold on the outdoor light sensor at dusk, so the 12% night level kicks in when it should.
How I do it in webCoRE
This is a real piston I run on Hubitat.
- When office motion is detected and the office lights are off, it checks the front yard light sensor and the time. If it is under 15 lux and between 8 PM and 8 AM, the lights go to 12%. Otherwise they go to 60%.
- On weekdays between 9 AM and 4 PM, if my phone is present on the UniFi network, the office Sonos is set to volume 4 and loads the “feel good” Sonos favorite.
- When the lights are on, motion has been inactive for 15 minutes, and the monitor plug reads under 10 W, the lights turn off.
- Whenever the office lights turn off, for any reason, the office Sonos pauses.
The monitor is the key. As long as I am using the computer, Windows keeps the display on, the plug reads above 10 W, and the lights stay on no matter how still I sit.
Advanced features
Pair it with the call button
Use the video call lighting button for calls. It sets the camera lighting and pauses the same speaker.
Failure modes
- Lights turn off while working: The monitor may be going to standby too early, or its power reading is close to the threshold. Check the Windows timeout and the real watt numbers.
- Lights never turn off: The monitor is not going to standby. Check that Windows turns off the display, and that nothing like a video keeps it awake.
- Music starts when I am away: Check the phone presence. A phone left at home counts as home.
FAQ
Why watch the monitor instead of the computer?
The monitor has a clear on and off state. Windows turns it off after a few minutes without input, and its power drops to standby. That makes it a simple signal for whether someone is at the desk.
What if I read at the desk without touching the computer?
The monitor turns off after the Windows timeout, and once motion has also been quiet for 15 minutes the lights turn off. Move a little or tap a key.
Why does the music pause when the lights turn off?
If the lights are off, nobody is working in the office, so the music has no reason to keep playing.