There are a lot of ways to smarten up your home. It’s easy to find Home Automation ideas for your bedroom, living room, kitchen, office, or garage… But the one room that usually gets forgotten is the bathroom. It’s time to correct that, and show some smart home love to sanctuary of the porcelain throne.
I hope we can agree that there are a couple things that all of us want from our bathrooms. First, we want privacy. Otherwise, we’d just keep a chamber pot in the living room. Second, we want fragrance control. At least as much as possible. So my goal here is to guarantee that I have both of those things every time I use the lavatory. The first thing I need is a trigger. I can’t think of a better indicator of an occupied bathroom than a sensor on the toilet. I thought about using a weight sensor on the toilet seat, but that would get complicated and besides, we don’t always sit down. So instead, I decided to put an RF door sensor on the lid! That’ll work. This is one of the sensors that sends 2 codes, one for open and one for closed. With this placement, it doesn’t get in the way, since we can’t set anything else there anyway, and best of all, it doesn’t have to be… weatherproof. Since I have the Sonoff RF Bridge with Tasmota, it’s pretty easy to find the codes this sensor sends and to make a binary sensor for it in Home Assistant. Then in the Customize menu I can change the icon so I don’t get it mixed up with any other ordinary binary sensor. Now when the seat is up or down, I’ll know about it.
That’s part one. Part two is doing something useful with that information. Let’s tackle smell first. I like air fresheners, but they can be overpowering if over used. Ideally we want it to come on only when needed and be off when it isn’t needed. I suppose I could get a gas sensor that would detect methane levels, but nah, I afraid that might start a methane production competition in our house. There would be no winners. So what I’m going to do instead is have the sensor on the toilet lid trigger a smart plug that is connected to a plug-in air freshener.
The plugs I’m using are these little round ones. There are lots of different brands but they all use the Tuya app, and there’s a component in Home Assistant for Tuya (I’m using HA 0.80.2). I know what you’re thinking; why aren’t you using Tasmota. Well, the only reason I’m not, is because I took apart one of these switches to try and flash it with Tasmota, but it’s way too hard to be worth the time it takes. Thankfully the Tuya app works with Home Assistant, and I guess I don’t mind using someone else’s servers for something like this. If their servers go down, it won’t be too big of a deal.
A couple things to know about the Tuya component. First, it isn’t just the Tuya component. If you have devices that say they use the Smart Life app, they will also work with the Tuya app. I’ve used both apps with the same plugs, so I know for sure they are interchangeable. If you setup your device with Smart Life, you can change it and re-do the setup with the Tuya app, or you can add this line to your Tuya entry in HA. After you setup your plugs and setup the Tuya component in HA, you’ll see your plugs appear on the overview page. In the UI those plugs will show up with the name you gave them in the app, but to use those plugs in an Automation we can’t use that name. In the States page, you can search for the plug by name and you’ll get a numeric entity_id. That’s the one you’ll use for your Automations. I set mine to turn the plug on when the seat goes up and turn it off again after 10 min. It looks like this:
(Lid up Smell on Automation)
Now let’s tackle the other important issue; Privacy. Probably everyone has forgotten to lock the door and been surprised by an unexpected guest. Or worse, is being the one who walks in on someone else doing their business. Here’s my solution to make sure that never happens again and to save us all a lot of mental and emotional scars. In another video I made a smart door lock with a Sonoff SV and an electromagnetic lock. I’m going to do the same thing here. I mount the lock on the door frame, and run the wires through the wall. It’s powered by a 12v 1 amp PS, and it is controlled by a Sonoff SV. I flash the SV the same way I flash everything else. Tasmota, FlashEZ, Termite, Backlog, Done.
The biggest challenge here is getting the SV and the PS in a switch box and connected to power. For this bathroom I had to add a box in the wall. It was either that or face the wrath of a woman who actually has to LOOK at electrical components. (shutter). Depending on your situation you could manage the control of this lock in a different way. The lock runs on 12v. These are about the cheapest 12v PS you can get. You can either control the 120v going in or control the 12v on the output side. Whatever works best in your situation.
Now the trigger, or the switch for locking and unlocking the door, is… the toilet lid. When the lid is up, the door is locked. And it stays locked until the lid is down. No one will ever be able to open the door while someone else is sitting on the pot. And, no one will every be able to leave the room if the lid is still up. That’s a double bonus. If you want to add another button to unlock the door you could, but I’m not going to. The RF sensor is reliable enough. If someone gets locked in maybe I’ll change my mind and add a button. They could always just yell to Alexa to help them get out.
The last thing I wanted to add was a water sensor in the sink that would keep the door locked until the water had run in the sink. I haven’t figure that one out completely yet, so that’ll have to wait for another video.
That’s it. My twist on the Smart Bathroom. Welcome to the future.
RF Bridge – https://drzzs.com/RF_Bridge
RF Sensor – https://drzzs.com/RF_door_sensor
RF Water Sensor – https://drzzs.com/RF_Water_Sensor
ElectroMagnetic Lock – https://drzzs.com/EM_Lock
Sonoff SV – https://drzzs.com/Sonoff_SV
Smart Lock (Great Price if it lasts) – https://amzn.to/2P0iDGl
Smart Plugs – https://amzn.to/2qlmxLe