Transcending the Stack with the Right Network Protocol

The increase in network-connected devices the past years has been something of a dual-edged sword. While on one hand it’s really nice to have an easy and straight-forward method to have devices talk with each other, this also comes with a whole host of complications, mostly related to reliability and security.

With WiFi, integrating new devices into the network is much trickier than with Ethernet or CAN, and security (e.g. WPA and TLS) isn’t optional any more, because physical access to the network fabric can no longer be restricted. Add to this reliability issues due to interference from nearby competing WiFi networks and other sources of electromagnetic noise, and things get fairly complicated already before considering which top-layer communication protocol one should use. Continue reading “Transcending the Stack with the Right Network Protocol”

The Heat is on with this ESP8266 Controlled Sauna

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.]

Arduino Enters the Cloud

Love it or hate it, for many people embedded systems means Arduino. Now Arduino is leveraging its more powerful MKR boards and introducing a cloud service, the Arduino IoT Cloud. The goal is to make it simple for Arduino programs to record data and control actions from the cloud.

The program is in beta and features a variety of both human and machine interaction styles. At the simple end, you can assemble a dashboard of controls and have the IoT Cloud generate your code and download it to your Arduino itself with no user programming required. More advanced users can use HTTP REST, MQTT, Javascript, Websockets, or a suite of command line tools.

Continue reading “Arduino Enters the Cloud”

Controlling Non-Googley Devices With Google Assistant

In the near future of the Smart Home, you will be able to control anything with your voice. Assuming that everything supports the Smart Home standard you chose, that is. If you have a device that supports one of the other standards, you’ll end up uselessly yelling at it. Unless you use gBridge. As the name suggests, gBridge is a bridge between Google Assistant devices and the rest of the smart home universe. It’s an open source project that is available as a Docker image can be run on a low power device in the home, or on a hosted service.

Fundamentally, gBridge is a Google Assistant to MQTT translator. Message Queuing Telemetry Transport (MQTT) is the messaging protocol that many smart home devices use, as it runs over TCP and doesn’t take much power to implement. We’ve covered how to bash around in MQTT and do much of this yourself here, but gBridge looks to be somewhat easier to use. It’s just come out of beta test, and it looks like it might be a good way to get into Smart Home hacking.

There are, of course, plenty of other ways of doing this, such as IFFFT, but [Peter Kappelt], the brains behind gBridge, claims that it is more flexible, as it offers support for the whole Google Assistant vocabulary, so you can do things like put devices into groups or do more conditional control (such as if the light level in the hallway rises above a certain amount, start recording with a camera) with non-Google devices. [Peter] is also looking to run gBridge as a hosted service, where he does the behind the scenes stuff to update servers, etc, in return for a small fee.

Continue reading “Controlling Non-Googley Devices With Google Assistant”

The Linux Throwie: A Non-Spacefaring Satellite

Throwies occupy a special place in hardware culture — a coin cell battery, LED, and a magnet that can be thrown into an inaccessible place and stick there as a little beacon of colored light. Many of us will fondly remember this as a first project. Alas, time marches inevitably on, and launching cheerful lights no longer teaches me new skills. With a nod to those simpler times, I’ve been working on the unusual idea of building a fully functional server that can be left in remote places and remain functional, like a throwie (please don’t actually throw it). It’s a little kooky, yet should still deliver a few years of occasional remote access if you leave it somewhere with sunlight.

A short while ago, I described the power stages for this solar-powered, cloud accessible Linux server. It only activates on demand, so a small solar cell and modest battery are sufficient to keep the whole show running.

Where we left off, I had a solar cell that could charge a battery, and provide regulated 12 V and 5 V output. For it to be a functional device, there are three high level problems to solve:

  1. It must be possible to set up the device without direct physical access
  2. You must be able to remotely turn it on and off as needed.
  3. It needs to be accessible from the Internet.

The funny thing is, this hardware reminds me of a satellite. Of course it’s not meant to go into space, but I do plan to put it somewhere not easy to get to again, it runs off of solar power, and there’s a special subsystem (ESP8266) to tend the power, check for remote activation, and turn the main computer (Raspberry Pi 3) on and off as necessary. This sounds a lot like space race tech, right?

As I have a bit more code than usual to share with you today, I’ll discuss the most interesting parts, and provide links to the full firmware files at the end of the article.

Continue reading “The Linux Throwie: A Non-Spacefaring Satellite”

Feeding Dogs over Twitch is Latest E-Sport Craze

The modern social-networking fueled Internet loves two things more than anything: pets, and watching other people do stuff. There’s probably a scroll tucked behind a filing cabinet at Vint Cerf’s house that foretells anyone who can harness these two elements will gain control of the Internet Ready Player One style. If so, we’re thinking [Tyler Pearce] is well on his way to ascending the throne.

In an effort to make the Overwatch Twitch streams of his betrothed even more enticing, [Tyler] came up with a way for viewers to feed their dog Larry by dropping a command in the chat. There’s a surprisingly complex dance of software and hardware to make this reliable and visually appealing, but it’s worth it as showmanship is important in the brave new world of competitive e-sports. We’re assuming that’s what it says in the issue of ESPN Magazine with the Fortnite player on the cover, but nobody at Hackaday would qualify for a subscription to it so we don’t really know for sure.

A server running on the computer provides a slick administrative dashboard for the treat system, including a running log of who fed Larry and when. There’s also a number of checks in place to prevent too many treats being dispensed in a short time period, and to keep an individual from spamming the system.

On the hardware side, he’s using two NodeMCU ESP8266 microcontollers connected to a local MQTT broker: one to handle the lighting and one to run the 3D printed auger that actually pushes the food out. The printed auger is powered by a standard hobby servo, and even includes an IR sensor to automatically stop spinning when it detects a treat has been dispensed. [Tyler] reports the auger works quite well, though does have a tendency to jam up if overfilled.

We’ve seen all manner of automated pet feeders over the years, even ones with their own email accounts. So it was probably only a matter of time until they came to Twitch. If you can install Linux with it, why not use it to feed your dog? Or somebody else’s, as the case may be.

How to Mash Up BLE, NodeJS, and MQTT to Get Internet of Things

We’re living in the world of connected devices. It has never been easier to roll your own and implement the functionality you actually want, rather than live with the lowest common denominator that the manufacture chose.

In a previous article I walked though a small python script to talk to a BLE light and used it to cycle through some colors. Now I want to delve deeper into the world of Internet Connected BLE devices and how to set up a simple Internet-Of-Things light. With this example in hand the sky’s the limit on what you can build and what it will be able to do.

Join me after the break as I demonstrate how to use NodeJS to bridge the digital world with the physical world.

Continue reading “How to Mash Up BLE, NodeJS, and MQTT to Get Internet of Things”