What to buy for easy integration of smart siwtches in bedroom

HI! Very impressed with the responsiveness of the place (yeah… I’m new here obviously). And so now that’s I’m getting ready to set up my temperature sensors I am looking at adding more features using the MH-ET Live ESP32 (or not).
Something I’d like is having “smart light switches” based on motion sensor in the bedroom. There is only 1 light switch but 2 doors to get in the room. Let’s say I’d like the light always off during day time and then activated when someone comes in the room between 6pm and 6am. But then I do need to sleep (sleeping time varies) and not the light to be turned on when someone wakes up to visit the bathroom in the middle of the night.
Apart from a motion sensor what else would I need to “simply” achieve this?
Thank you.

If you don’t want to mess with the wiring, I would go for a IKEA Trådfri system. Setup up automation rules that only trigger from 6am to 6pm

Hi and thank you for the prompt response. I don’t mind changing the switch if this is what you call “messing with the wiring”. Is it what that system does? Also how can I ensure the light doesn’t go on when I’m visiting the bathroom in the middle of the night?

There are multiple options,teo that come to my mind:

  1. Buy a Smart Bulb and a remote control , this way you need to wire the light to always have power or never use the light switch.
  2. Buy a smart switch and replace the current switch with it.

Well the room has like 10+ lights in the ceiling so smart bulb is out of the question. Now which smart switch should I buy? I’ve been doing some searches but couldn’t tell what would fit in my case. As I mentioned I’ll have a MH-ET Live ESP32 in the room where I could connect a motion sensor, but apart from that I’m a bit lost.
So I was looking for real life recommendation from people using products which could tell me what how and what to be aware off in my case.

Thank you.

This can be achieved with a smart switch and simple automation. As stated above, you need to smartify your lights with either smart bulbs or a smart switch. For ceiling lights I prefer a smart switch. Get the device or protocol of your choosing (z-wave, wifi etc) and create an automation to turn on the lights between certain times of the day when PIR is activated.

It really depends on which way you want to go with a switch platform. There are a few but the most common are z-wave, zigbee and wifi.

There are advantages and disadvantages to all of them. And for that reason I have a mix of all of them.

z-wave is everywhere and pretty reliable in my setup and there are offerings that don’t need a neutral in the switch box for them to work but they are expensive. And you need a controller so it’s a bit of additional expense.

zigbee is cheaper but I don’t know of any off the top of my head that work without a neutral. And you need a controller for this one too.

And with both z-wave & zigbee the more of those mains powered devices you have the better the reliability because they are mesh systems and the more nodes in the mesh to route comms the better.

Wifi is cheap and you don’t need a controller since your router acts as the controller. but they have to have a neutral in the box since they need to have power at all times for the wifi radio.

As far as the automation is concerned i’m not sure how you would distinguish between someone coming into the room and someone getting up to use the restroom by use of a motion sensor alone. Which is why I haven’t automated my bedroom lights at all even tho I have full remote controls for them.

1 Like

xiaomi has a no neutral zigbee switch option.

I’m in the process of making something similar for my basement using the esp-01 & MQTT. The basics are that the module will have the PIR trigger sending the ON message to the specific light using the “sundown” marker in Hass as the time frame for activation. I plan on keeping the off as a manual process (using the app). It’s my holiday weekend project, so it’s not done yet.

Using MQTT as the trigger means you can use any switch if you want so long as you can create automation with HASS. I personally like the TP-Link Kasa wifi stuff, as it’s generally inexpensive and works great for local control.

Oh, yeah. I forgot about that one. Didn’t that just come out recently?

not sure, but it’s available via aliexpress.

1 Like

Is there any hardware/device that can be installed along with existing dumb wall switch so both the existing switch and the HA can control that switch?

You can install a shelly or sonoff mini behind your existing dumb wall switch. That way both the existing switch and HA can control it.

1 Like

The harder thing with this project is defining when to not turn the light on when you go to the bathroom.

Perhaps a fitbit (does fitbit work with HA? I don’t know).

If bill has been asleep then don’t activate the light on movement.

There are also bed occupancy sensors, which may help.

! Wow that is cool to know. Then I could theoretically set rules based on motion and bed occupancy and time of day! Thank you very much for all this information. I need to do a bit more research and decide what to go for. :smile:

Generally they work by putting smart scales under each foot of the bed and measuring the weight, interpreting from there. I have only seem DIY ones, and that is how they worked.

Frankly we have skylights above the bed, and they do not have shutters. There is always light enough from stars/moon to stumble to the door, and then motion sensored lights in the hallway. I therefore haven’t needed to implement the kind of thing you are trying to do.

2 Likes

Thanks. Searched sonoff mini and also found that sonoff basic is cheaper and should work too.

Does anyone know if there is OTA tuya convert guide for sonoff basic? This link has the template and Serial Flashing: https://blakadder.github.io/templates/sonoff_basic.html

You want to convert your sonoff to use tuya?

right, use tasmota