Home Automation — Bedroom Lamps
@cccoltsicehockey + others, I thought I would showcase a few more things I've set up. One trickier scenario for me was our bedroom lamps and accessories.
I have three lamps in the bedroom, two on the nightstands and one on the dresser.
There is one overhead light that is 3-way switched from the stairs (not smart), but it doesn't give much light and I prefer the lamps. I got tired of having to switch all three lamps on or off, especially if just running upstairs to get something for 2 minutes.
Additionally, my wife has a nightstand fan, and white noise machine under the bed, that need manual switching.
I did not want to use smart bulbs in the lamps, because I use these special
Bedtime Bulbs. They are quite expensive, but they are my favorite bulb for evening that I've come across. I have them here and in the kids' bedroom lamps. They are high CRI, low blue, extra warm color temp, and give the closest approximation to a dimmed incandescent that I know of.
So I resorted to smart plugs. I wanted cheap and reliable, and ended up testing some Kasa WiFi plugs, and some ThirdReality ZigBee plugs.
The Kasa won, because they were 100% reliable to fire, and when commanded as a group they all turned on at the same time. They also have a configurable setting to turn off the power indicator LED, whereas the ThirdReality and some other smart plugs do not. I find those little LED's really annoying at night so I was happy to turn them off with the Kasa.
For the bulk of the lighting automation, I'm using a HUE motion sensor. These things are the best motion sensors I know of. Fast, reliable, and use AAA batteries that last forever.
Getting the HUE sensors into Hubitat (and thus webCoRE) is a bit of a challenge. First I configured it in the HUE app, but set all the triggers to "Do Nothing". Then it gets brought into Home Assistant via the LAN Hue Bridge integration. Then it gets passed to Hubitat through the Home Assistant Device Bridge integration. Surprisingly, this is all fine, and Hubitat sees all the sensors, and motion detection is immediate.
MOTION LIGHTING
The obvious automation rule is: When motion is detected, turn lamps on. When motion is no longer detected, turn lamps off after 10 minutes.
Instantly, this poses issues. For one — the motion sensor is not pointed at the bed, so if you are watching TV in bed at night for example, the lights will turn off on you. Secondly, it doesn't account for night time, so if someone gets up in the middle of the night, it will turn on all the lights.
Time restricting it would help (only turn on during X hours, etc), but our go-to-bed and wake up times are variable, and there are two people's schedules to account for. With time restriction only, someone would inevitably get blasted with light at the wrong time and get annoyed.
I solved it with two boolean (True/False) variables. One is called @everyoneUp, and the other is called @bedroomLampsTriggeredEvening. Each of these has their own True/False state.
If the motion sensor detects motion, and the time is after 7:00 PM, then @bedroomLampsTriggeredEvening changes to True. It resets to False at midnight.
I use this state as a restriction for the motion lighting — if it's False, the motion lighting will occur, if it's True, the motion lighting will stop.
The end effect is the first time someone enters the bedroom after 7:00 PM, the lights will still turn on. But after that, they won't auto-turn-off. That way they won't go out if someone is up there in the evening reading or watching TV.
Ok, the 2nd variable — @everyoneUp. This is set to True when both of our phones come off the charger in the morning. That's the best method I've found to ensure both people are out of bed, or ready to be out of bed (don't mind if the lights come on). It resets to False at midnight.
The end effect is motion lighting won't resume in the morning until both phones are off the charger.
NIGHT STAND REMOTES
Ok, but what if we
do want to control the lamps manually? Reaching under the bed for one of 4x smart plugs is way worse than just flipping the lamp switch. So I ended up getting these Zwave remotes that live on the night stands:
They look like a Decora toggle, and support push, hold, double-tap, triple-tap, and more.
I configured my wife's single-push options to
toggle her bedside lamp, and
toggle her nightside fan. Using a toggle action eliminates buttons and things to remember. One side of the switch operates the lamp, the other side operates the fan. For advanced control, holding the top button turns all three lamps. And holding the bottom button turns off all three lamps, and additionally, if it's after 9:00 PM, turns on her fan and white noise machine (making the assumption she's going to bed).
Mine is set up similarly with toggles for the lamps and fans, except my 'hold bottom button after 9:00 PM' runs
my Goodnight Routine, which turns off all the lights in the house, pauses Sonos, and sets the thermostat.
ADDITIONAL AUTOMATIONS
That's right, I'm not done yet!
We have a bedroom Roku TV, that catches some glare from my bedside lamp at night. I set up an automation in Home Assistant so when the TV starts playing content, it turns my lamp off, automatically.
On top of that, I don't like the fan, so I have it set up to automatically turn off when my wife gets up for the day. That way if I'm still in bed I don't need to have it on. And I'm using the @everyoneUp variable to turn off the white noise machine when the last person gets up for the morning.
Long post, I know. Hopefully a few of you enjoyed that or got some ideas. It's super granular, but that's what I love about this stuff. I no longer have to touch any of the switches or devices, they just do and predict what I want, in pretty much every scenario.
And if I do need to hard bypass the motion lighting temporarily, I have virtual toggles that let me do that.