I am finishing up the guest room this next week and will be setting up my lab, for now, in the wife’s sewing room. The first project on the bench of doom is going to be to set up my Openhab and Node Red on a Pi server and then to build a controller for my water heater pump loop.
The circulator pump has a timer but the wife is home all day and I am up half the night due to work schedule and I don’t want to spend the money heating all the house plumbing up 20 hours a day when the hot water is only needed at the faucets maybe 3 hours a day. So, I am going to grab a few Sonoff Basic’s and use one to run the circulator. It is currently plugged into an extension cord anyway so setting up a Basic for this task makes sense ( on the UL cert. concern). The plan is to then set up a few wifi connected buttons to turn on the circ pump for 2 minutes. I have been looking at options for the buttons and think the ESP32 modules I have are the answer. Never used them but what the heck, right?
Any other suggested boards or items you can think of to do the switches? This seems like an easy project to me but I am an idiot and often wrong.
I’d say ESP32s are extreme overkill. But they’ll do it.
If you’re looking for a cheaper solution along the same lines, a simple ESP-01 module could easily be set up to send an MQTT message. It could even be set up to query the Sonoffs for current status & light a LED.
Heck! The humble ESP-01 can present a web page for when you don’t want to put down your smartphone & reach up to the button…
Of course, if you’d rather wire them instead of using WiFi, you could toss a $2 Arduino Mini clone in the box.
I am a huge fan of overkill… when it comes to human safety and redundancy on stuff you want to work reliably. But a pushbutton should follow the KISS rule (grin). Thats kind of why i posed the question. I am really new to electronics maker projects and the home automation world and there are seemingly endless options for components for our automation needs. I figure that wiring those switches is going to be more trouble than its worth at this point and wifi connectivity will be the easiest option. The ESP32’s were something i bought on a whim and have yet to even pull one out of its packaging. So its time to look at your suggested components! Thank you for that. I am pretty excited to be starting the “rubber meets the road” part of this hobby. The network is up and stable now its time to make it do something fun!
Sounds like a cool idea. How are you going to power them?
Well, the initial thought was a 9 volt battery with a 3.3 volt regulator. Then I think I may have fallen down a rabbit hole. I started thinking about the suggestion of using the module to check the state and turn on an LED and that got me to thinking that I only really need two modules. The first module would be in the bathroom at the far end of the house. That module actually could be a motion sensor and I think you can pretty much buy them off the shelf Maybe? But either way it would be very simple. The other one that I wanted to do would go into the kitchen somewhere close to the sink which would be the middle of the house. The middle of the house is actually a perfect place to have status LEDs for other things. Such as, the gate is open, somebody has entered the property oh, I’m sure I can think of all sorts of other things, Etc. So with that being the case, that module would actually need probably, a permanent power supply. I did a little initial research on the esp-01 module and it does not have very much in the way of inputs and outputs to make it do multiple things besides just a switch and one LED is not all that possible without doing I squared C. Now that isn’t a problem but I do have ESP 32 modules which would do that easily without any additional hardware. So the module I put in the bathroom, if I choose to stay with a simple push button will probably be a 9 volt and voltage regulator and if I do it in the kitchen with multiple status LEDs and or inputs and Lord only knows I could go all sorts of directions with that one I will probably have to give it some sort of a wall wart or something to operate. Now I just have to know when to stop screwing around with the idea. But I think I’m incapable. Grin
Next you’ll be setting up a nice little LCD or OLED display…
& having it talk to a Google Home for voice output…
& maybe a handy keypad…
I’d suggest using something like [this door sensor]: (https://www.homesecuritystore.com/ademco-honeywell-944sp-wh-window-door-alarm-contact)
Put it on the bathroom door(s) and run the wires down to an Arduino in the basement. Then it’ll just “know” that someone is home and run the heater loop accordingly.
Something else I’ve done is use OwnTracks + MQTT + OH to implement Geofencing when the wife and I are home - turn the Nest to Home or Away status, activate security, etc.
I got bored on the can one day… where I do my most profound thinking actually… and pulled the trigger on a small collection of Sonoff modules. Single, double, something something… , oh yeah, and a bridge and RF door and motion detector kit! I figure to install the bridge centrally in the house and use the motion sensor in the master bathroom and the mag switch in the guest bathroom. Reason for that layout is because of utilization. The guest bathroom door is in a hallway and stays open until it is being used so if the mag sensor sees the door close, it can turn on the loop. Which is basically what you @aspork42 are suggesting. That bathroom takes the least amount of time since it is pretty close to the water heater. The master is another story though. The toilet space and the rest of the bathroom are separated by a door. So in practice, the door to the master bathroom space never really gets closed. With the motion sensor in the main part of the bathroom, it will see you enter and can have the loop running before you are ready to jump in the shower. So that kit, with a Sonoff Basic will take care of the basic part of the loop control. An ESP32 with a pile of other features on it will take care of the kitchen piece.
Keep in mind that there are other ways to make your home “smart” - think about how programmable thermostats often work - You set timers. So if you typically shower in the AM, then the master bedroom loop starts running at 6 am on weekdays for a little while and at 11 am on weekends AND ALSO when motion is detected in the entry area or door sensor. A lot of my rules are timer based AND combined with other sensors like presence detection.
Absolutely!. I have a whole bunch of ideas to implement. The circ pump has a timer built in and that is fine but our schedules are so varied that a blanket approach to timing doesn’t really work. It spends a lot of time just circulating water and costing electricity which is what prompted me to go with an on demand kind of setup. I am trying to get the Sonoff hardware to work with Openhab and figure out the rules thing before I implement the hardware into the system. I am finding this to be a rather large learning curve.