We’ll be perfectly honest: sitting inside a heated box sounds just a bit too much like torture for our tastes. But if we did somehow find ourselves in possession of a fancy new sauna, we’d more than likely follow in the footsteps of [Al Betschart] and make the thing controllable with the ESP8266. After all, if you’re going to be cooked alive, you might as well do it on your own terms.
The sauna itself was purchased as a kit, and included an electric heater controlled by a thermostat. As explained in his detailed documentation, [Al] integrated a Sonoff TH16 into the original heater circuit so he could control power to the coils remotely. The TH16 also includes support for a thermal sensor, which allowed him to get a reading on the sauna’s internal temperature. The new electronics were mounted in a weather-proof box on the back of the sauna, complete with an external WiFi antenna to help get a good signal back to the house.
At this point the project could technically be done if all you wanted was remote control, but [Al] wanted to create a replacement firmware for the Sonoff that was specifically geared towards the sauna. So he came up with some code that uses MQTT to connect the heater to his home automation system, and allows configuring things like the maximum temperature and how long the sauna will run before turning itself off.
Interestingly, the company who makes these saunas thought the work [Al] did to integrate their product into his home automation system was so impressive they actually interviewed him about it and put it up on their site for others who might be inspired by his work. We’ve covered a lot of hacks to consumer devices here at Hackaday, and it’s exceedingly rare for a company to be so supportive of customers fiddling around with their products (especially in a case like this where there’s a real chance of burning your house down), so credit where credit is due.
The last time we brought you a sauna hack it was quite literally in a van down by the river, so the addition of an ESP8266 certainly brings this more into our comfort zone. Figuratively, if not literally.
[Thanks to Jon for the tip.]
The Nest Thermostat revolutionized the way that people control the climate in their homes. It has features more features than even the best programmable thermostats. But, all of the premium features also come at a premium price. On the other hand, for only $5, a little coding, and the realization that thermostats are glorified switches, you can easily have your own thermostat that can do everything a Nest can do.
[Mat’s] solution uses a Sonoff WiFi switch that he ties directly into the thermostat’s control wiring. That’s really the easy part, since most thermostats have a ground or common wire, a signal wire, and a power wire. The real interesting work for this build is in setting up the WiFi interface and doing the backend programming. [Mat’s] thermostat is controlled by software written in Node-RED. It can even interface with Alexa. Thanks to the open source software, it’s easy to add any features you might want.
[Mat] goes through a lot of detail on the project site on how his implementation works, as far as interfacing all of the devices and the timing and some of the coding problems he solved. If you’ve been thinking about a Nest but are turned off by the price, this is a great way to get something similar — provided you’re willing to put in a little extra work. This might also be the perfect point to fall down the home automation rabbit hole, so be careful!
Continue reading “Add Nest Functionality To Your Thermostat For $5”
Putting everything on the Internet is getting easier and easier, what with the profusion of Internet-ready appliances as well as cheap and plentiful IoT modules to integrate legacy devices. Think IoT light bulbs, refrigerators and dishwashers that can be controlled from a smartphone, and the ubiquitous Sonoff modules. But once these things are on the net, what are they talking about? Are they saying things behind your back? Are they shipping data about your fridge contents off to some foreign land, to be monetized against your will?
Maybe, maybe not, but short of a tinfoil helmet the only way to protect yourself is to build your own system. This IoT control for ceiling fans is a good example, with the added benefit that most wireless ceiling fan remotes are kind of lousy. [microentropie] didn’t like the idea of going the Sonoff route, so his custom controller is based on that IoT workhorse, the ESP8266. There are two versions, one switching the light and fan loads with relays, and one with triacs. The ESP serves up its own web page for control rather than using a cloud service, and is capable of setting up the fan to turn on and off automatically at preset times or temperatures. Everything sits in an unobtrusive box on the ceiling near the fan, but we bet this could be miniaturized enough to fit right inside the fan housing.
If some of [microentropie]’s code looks familiar, it might be because he borrowed it from his IoT rice cooker project.
While nobody is exactly sure on the exact etymology of the term, Thomas Edison mentioned some of his inventions being riddled with “bugs” in a letter he wrote all the way back to 1878. In the context of computers, any loyal Hackaday reader should know Grace Hopper’s infamous account of a moth being caught in an early electromechanical computer’s relays. To this pantheon of troublesome insects, we would humbly summit the story of a Sonoff TH16 switch being destroyed by a lowly ant.
According to [CNX Software], the Sonoff TH16 had been working perfectly for a year and a half before the first signs of trouble. One day the switch wouldn’t respond to commands, and a power cycle didn’t seem to clear the issue. Upon opening up the device to see what had gone amiss, it was clearly apparent something had burned up. But upon closer inspection, it wasn’t a fault with the design or even a shoddy component. It was the product of an overly curious ant who got a lot more than he bargained for.
Consulting the wiring diagram of the Sonoff, it appears this poor ant had the terrible misfortune of touching the pins of a through hole capacitor on the opposite side of the board. Bridging this connection not only gave him a lethal jolt, but apparently caused enough current to surge through a nearby resistor that it went up in smoke.
Now, some might wonder (reasonably so) about the conditions in which this switch was operating. If bugs could climb into it, it’s not unreasonable to assume it wasn’t well protected from the elements. Perhaps damp conditions were to blame for the failure, and the image of the ant “riding the lighting” is nothing more than a coincidence. Maybe. But sometimes you just gotta believe.
Incidentally, if you’d like to learn more about the woman who helped secure “bugs” in the IT lexicon, here’s a good place to start.
Ed Note: If you think you’re having deja vu all over again, we did point to this story in the Sunday Links roundup, but the graphics are just so good we couldn’t resist running it in full.
No matter what your experience level with troubleshooting, there’s always at least a little apprehension when you have to start poking through a mains powered device. A little fear is a good thing; it keeps you focused. For some, though, the aversion to playing with high voltage is too much, which can cause problems when something fails. So what do you do when you’re reluctant to even open the case? Easy — diagnose the problem with an infrared camera.
[Bald Engineer]’s electrophobia started early, with some ill-advised experiments in transcutaneous conduction. So when his new Sonoff WiFi switch failed soon after deploying it to control a lamp in his studio, popping the top while it was powered up was out of the question. The piquant aroma of hot plastic was his first clue to the problem, so he whipped out his Flir One Thermal Camera and watched the device as it powered up. The GIF nearby shows that there was clearly a problem, with a bloom of heat quickly spreading out from the center of the unit. A few IR images of the top and bottom gave him some clues as to the culprits, but probing the board in those areas once power was removed revealed no obviously damaged components.
[Bald Engineer] hasn’t yet gotten to the bottom of this, but his current thinking is that the NCP1117 regulator might be bad, since it rapidly spikes to 115°C. Still, we think this is a nifty diagnostic technique to add to our toolkit, and a great excuse to buy an IR camera. Or, we could go with an open-source thermal camera instead.
[via Dangerous Prototypes]
The ESP8266 platform has become so popular that it isn’t just being used in hobby and one-off projects anymore. Companies like Sonoff are basing entire home automation product lines around the inexpensive WiFi card. What this means for most of us is that there’s now an easily hackable and readily available product on the market that’s easily reprogrammed and used with tools that we’ve known about for years now, as [Dan] shows in his latest project.
[Dan] has an aquaponics setup in his home, and needs some automation to run the lights. Reaching for a Sonoff was an easy way to get this done, but the out-of-the-box device can only be programmed in the simplest of ways. To get more control over the unit, he wired a USB-to-Serial UART to the female headers on the board and got to programming it.
The upgraded devices are fully programmable and customizable now, and this would be a great hack for anyone looking to get more out of a Sonoff switch. A lot of the work is already done, like building a safe enclosure, wiring it, and getting it to look halfway decent. All that needs to be done is a little bit of programming. Of course, if you’d like to roll out your own home automation setup from scratch that can do everything from opening the garage door to alerting you when your dog barks, that’s doable too. You’ll just need a little more hardware.
If you are the kind of person who won’t use cheap Sonoff modules to control AC powered devices, we don’t blame you and you should probably stop reading now. However, if you don’t mind a little exposed AC wiring and you have a 3D printer, you might be interested in the second generation of [530 Project’s] in-wall light switch.
The 3D printed switch fits a standard box and uses the guts of a Sonoff controller. These work with all the popular ecosystems such as Alexa and Google Home. And they are cheap. Like, really cheap. If you already have a 3D printer, even counting the cost of the filament these are going to be a small fraction of the cost of a commercial switch. You can see a video about the device, below.
Continue reading “3D Print A Home Automation Switch”