Does Your Home Assistant Know When You Are Sleeping?

It always gives us a sense of wonder when we realize that what would be a simple task for a human child is a big deal for a computer. For example, if you asked someone if you or someone else was in bed, that’s a pretty simple thing to check. For you, that is. For a computer, it requires some sort of sensor. [Lewis] used load cells to tell if someone is in a particular bed or not. He uses Home Assistant and has a great post about how he created and interfaced the sensors. Of course, the sensors really only tell you if something heavy is in the bed. It doesn’t know who it is or even that it isn’t an overstuffed suitcase.

Load cells aren’t exactly high tech. There are several different types that use hydraulic pressure or pneumatics to measure force. However, the most common that we encounter use strain gauges. A strain gauge is a resistor that changes value when it deformed and a load cell usually has several strain gauges wired in a bridge configuration so that small forces create larger output changes.

Continue reading “Does Your Home Assistant Know When You Are Sleeping?”

Sniffed Transformer Puts Wired Doorbell Online

There’s certainly no shortage of “smart” gadgets out there that will provide you with a notification, or even a live audiovisual stream, whenever somebody is at your door. But as we’ve seen countless times before, not everyone is thrilled with the terms that most of these products operate under. Getting a notification on your phone when the pizza guy shows up shouldn’t require an email address, credit card number, or DNA sample.

For [Nick Touran], half the work was already done. There was already a traditional wired doorbell in his home, he just had to come up with a minimally invasive way to link it with Home Assistant. He reasoned that he could tap into the low-voltage side of the doorbell transformer and watch for the telltale fluctuations that would indicate the bell was doing its thing. The ESP8266 has an ADC to measure voltage and WiFi to connect to Home Assistant, so it seemed like the perfect bridge between old and new.

Transformer voltage before and after

Of course, as with any worthwhile project, it ended up being a bit more complicated. Wired doorbells generally operate on 16-24 VAC, and [Nick] knew if he tried to put his Wemos D1 across the line he’d release the critical Magic Smoke. What he needed was a voltage divider circuit that would take low-voltage AC and drop it to an even lower DC voltage that the microcontroller could cope with.

The simple circuit [Nick] comes up with cuts the voltage way down and removes the negative component completely. So what was originally 18.75 VAC turned into a series of 60 Hz blips at 2.4 VDC; perfect for feeding into a microcontroller ADC. With a baseline to work from, he could then write some code that would watch for variations in this signal to determine when the bell was ringing.

Or at least, that was the idea. While the setup worked well enough on the bench, its performance in the real-world left something to be desired. If his house guest had a heavy hand, it worked great. But a quick tap of the doorbell button would tend to go undetected. After investigating the issue, [Nick] found that he needed to use some software trickery to ensure the ESP8266 was able to keep up with the speedy signal. Once he was able to reliably detect short and long button presses, the rest was just a simple matter of sending an MQTT message to his automation system.

Compared to the hoops we’ve seen other hackers have to jump through to smarten up their doorbells, we think [Nick] got off fairly easy. This project is also an excellent example of how learning about circuit design and passive components can still come in handy in the Arduino Era.

Continue reading “Sniffed Transformer Puts Wired Doorbell Online”

New Part Day: Put An Alexa In Everything

The last great hope for electronics manufactures is smart home assistants. The Alexas and Siris and OK Googles are taking over homes across the country. At its best, it’s HAL 9000, only slightly less homicidal. It will entertain your children, and you can order cat litter just by saying you want cat litter. This is the future, whether we like it or not.

In an attempt to capture the market, Amazon has released the Alexa Connect Kit. This is an Amazon-Echo-On-a-Chip — a piece of hardware that adds Alexa to microwaves, blenders, and whatever other bit of home electronics you can imagine.

The Alexa Connect Kit is the hardware behind Amazon’s efforts to allow developers easy integration with Alexa. The options for adding Alexa to a product up until now have been using Zigbee to connect an Echo Show or Echo Plus, or simply giving a device the ability to connect to an Echo through Bluetooth. The Alexa Connect Kit, however, is a pure hardware solution that puts Alexa in anything.

Unfortunately you can’t get one yet. Right now, the Alexa Connect Kit is just a preview, and if you want to get your hands on one — or get any specs on this bit of hardware — you’ll need to apply to the developer program. We’ve signed up and will share and juicy details that come our way as part of the program.

According to the Wall Street Journal (try Google referral link if you hit the pay wall), several companies are already working on integrating the Alexa Connect Kit into their existing product lines. Hamilton Beach and Procter & Gamble are both working on something, although the press doesn’t say what kind of device will now be loaded up with a voice assistant. Amazon, however, has a microwave using the technology that the owner can, “command the microwave to do things like defrost a half-pound of chicken, or set it up to automatically reorder a favorite type of popcorn on Amazon”.

Despite the sparse details, this is relatively game-changing when it comes to the world of homebrew electronics. We’ve seen dozens of projects using hacked Raspberry Pis and other microcontrollers to at Alexa to hacked coffee machines, to shoot Nerf darts, and to control a projector. If you can actually get one of these Alexas-on-a-chip, all those projects could be done with one simple piece of hardware.

Raspberry Pi As 433 MHz To MQTT Gateway

Many low-cost wireless temperature and humidity sensors use a 433 MHz transmitter to send data back to their base stations. This is a great choice for the manufacturer of said devices because it’s simple and the radios are cheap, but it does limit what we as the consumer can do with it a bit. Generally speaking, you won’t be reading data from these sensors on your computer unless you’ve got an SDR device and some experience with GNU Radio and reading the Nexus protocol.

But [Aquaticus] has developed a very comprehensive piece of software that should make integrating these type of sensors into your home automation system much easier, as long as you’ve got a spare Raspberry Pi lying around. Called nexus433, it uses a cheap 433 MHz receiver connected to the Pi’s GPIO pins to receive data from environmental sensors using the popular Nexus communication protocol. A few known compatible sensors are listed in the project documentation, one of which can be had for as little as $5 USD shipped.

In addition to publishing the temperature, humidity, and battery level values from the sensors to MQTT, it even tracks connection quality for each individual sensor and when they go on and offline. To be sure, this is no simple hack. In nexus433, [Aquaticus] has created a mature Linux service with enough flexibility that you shouldn’t have any problems working it into your automation setup, whether it’s Home Assistant or something you’ve put together yourself.

We’ve seen a number of home automation hacks using these ubiquitous 433 MHz radios,  from controlling them with an ESP8266 to hacking a popular TP-LINK router into a low-cost home automation hub.

Evolution Of The ESP8266 Party Button

Sometimes the best part of building something is getting to rebuild it again a little farther down the line. Don’t tell anyone, but sometimes when we start a project we don’t even know where the end is going to be. It’s a starting point, not an end destination. Who wants to do something once when you could do it twice? Maybe even three times for good measure?

Original version of the Party Button

That’s what happened when [Ryan] decided to build a wireless “party button” for his kids. Tied into his Home Assistant automation system, a smack of the button plays music throughout the house and starts changing the colors on his Philips Hue lights. His initial version worked well enough, but in the video after the break, he walks through the evolution of this one-off gadget into a general purpose IoT interface he can use for other projects.

The general idea is pretty simple, the big physical button on the top of the device resets the internal ESP8266, which is programmed to connect to his home WiFi and send a signal to his MQTT server. In the earlier versions of the button there was quite a bit of support electronics to handle converting the momentary action of the button to a “hard” power control for the ESP8266. But as the design progressed, [Ryan] realized he could put the ESP8266 to deep sleep after it sends the signal, and just use the switch to trigger a reset on the chip.

Additional improvements in the newer version of the button include switching from alkaline AA batteries to a rechargeable lithium-ion pack, and even switching over to a bare ESP8266 rather than the NodeMCU development board he was using for the first iteration.

For another take on MQTT home automation with the ESP8266, check out this automatic garage door control system. If the idea of triggering a party at the push of a button has your imagination going, we’ve seen some elaborate versions of that idea as well.

Continue reading “Evolution Of The ESP8266 Party Button”

ESP8266 Beacon Announces Your Arrival

It used to be people were happy enough to just have to push a button in their car and have the garage door open. But pushing a button means you have to use your hands, like it’s a baby toy or something. We’re living in the 21st century, surely there must be a better way! Well, if you’ve got a home automation system setup and a spare ESP8266 laying around, [aderusha] may have your solution with MQTTCarPresence.

The theory of operation here is very clever. The ESP8266 is powered via the in-dash USB port, which turns on and off with the engine. When the engine is started, the ESP8266 is powered up and immediately connects to the WiFi network and pushes an MQTT message to Home Assistant. When Home Assistant gets the notification that the ESP8266 has connected, it opens the garage door.

When [aderusha] drives out of the garage and away from the house, the ESP8266 loses connection to the network, and Home Assistant closes the door. The same principle works when he comes home: as the car approaches the house it connects to the network and the garage door opens, and when the engine is shut off in the garage, the door closes again.

The hardware side of the setup is really just a WeMos D1 mini Pro board, though he’s added an external antenna to make sure the signal gets picked up when the vehicle is rolling up. He’s also designed a very slick 3D printed case to keep it all together in a neat little package.

We’ve covered automated entry systems based on the ESP8266 before, though usually the ESP stays at home. Be sure to check out the awesome series [Elliot Williams] has on the wonders of MQTT if you’re looking to setup your own automation system.

Turning On Your Amplifier With A Raspberry Pi

Life is good if you are a couch potato music enthusiast. Bluetooth audio allows the playing of all your music from your smartphone, and apps to control your hi-fi give you complete control over your listening experience.

Not quite so for [Daniel Landau] though. His Cambridge Audio amplifier isn’t quite the latest generation, and he didn’t possess a handy way to turn it on and off without resorting to its infrared remote control. It has a proprietary interface of some kind, but nothing wireless to which he could talk from his mobile device.

His solution is fairly straightforward, which in itself says something about the technology available to us in the hardware world these days. He took a Raspberry Pi with the Home Assistant home automation package and the LIRC infrared subsystem installed, and had it drive an infrared LED within range of the amplifier’s receiver. Coupled with the Home Assistant app, he was then able to turn the amplifier on and off as desired. It’s a fairly simple use of the software in question, but this is the type of project upon which so much more can later be built.

Not so many years ago this comparatively easy project would have required a significant amount more hardware and effort. A few weeks ago [John Baichtal] took a look at the evolution of home automation technology, through the lens of the language surrounding the term itself.

Via Hacker News.