WiFi Controlled Power Outlets with Raspberry Pi

[Tim] was looking for a way to control his power outlets using WiFi. He looked into purchasing a WeMo but he realized that he could build something even better with more bang for his buck. He started out by purchasing a five pack of Etekcity wireless remote control outlet switches. These are kind of like the WeMo, only they aren’t controlled via WiFi. Instead, they come with an RF controller. [Tim] just needed to find a way to bridge the gap between the RF remote and WiFi.

[Tim] decided to use a Raspberry Pi as the brains of the controller. He also purchased a SMAKN 433MHz RF receiver and transmitter for communicating with the wireless outlet switches. The wiring for the modules is pretty simple. There are only four wires. There are power and ground wires for each module. Then the transmitter needs two GPIO pins while the receiver only needs one.

[Tim] began with a fresh installation of Raspbian. He then installed Wiring Pi, which gives you the ability to interface with the GPIO pins in a way that is similar to Arduino. He also installed Apache and PHP to create a web interface for switching the outlets. The last step was to write some custom software. The software included a script that allowed [Tim] to sniff out the controls of his RF remote. The correct codes are entered into the “toggle.php” file, and everything is set. All [Tim] has to do now is browse to his Pi’s web server and click a button. All of the custom code is available via git.

Prefix Your Phone Alarm with a Desk Lamp

If you are like [Gbola], then you have a hard time waking up during the winter months. Something about the fact that it’s still dark outside just makes it that much more difficult to get out of bed. [Gbola] decided to build his own solution to this problem, by gradually waking himself up with an electric light. He was able to do this using all off-the-shelf components and a bit of playing around with the Tasker Android application.

[Gbola] started out with a standard desk lamp. He replaced the light bulb with a larger bulb that simulates the color temperature of natural daylight. He then switched the lamp on and plugged it into a WeMo power switch module. A WeMo is a commercial product that attempts to make home automation accessible for consumers. This particular module allows [Gbola] to control the power to his desk lamp using his smart phone.

[Gbola] mentions that the official WeMo Android application is slow and includes no integration with Tasker. He instead decided to use the third-party WeMoWay application, which does include Tasker support. Tasker is a separate Android application that allows you to configure your device to perform a set task or series of tasks based on a context. For example you might turn your phone to silent mode when your GPS signal shows you are at work. WeMoWay allows [Gbola] to interact with his WeMo device based on any parameter he configures.

On top of all of that, [Gbola] also had to install three Tasker plugins. These were AutoAlarm, Taskkill, and WiFi Connect. He then got to work with Tasker. He configured a custom task to identify when the next alarm was configured on the phone. It then sets two custom variables, one for 20 minutes before the alarm (turn on the lamp) and one for 10 minutes after (turn it off).

[Gbola] then built a second task to actually control the lamp. This task first disconnects and reconnects to the WiFi network. [Gbola] found that the WeMoWay application is buggy and this “WiFi reset” helps to make it more reliable. It then kills the WeMoWay app and restarts it. Finally, it executes the command to toggle the state of the lamp. The project page has detailed instructions in case anyone wants to duplicate this. It seems like a relatively painless way to build your own solution for less than the cost of a specialized alarm clock lamp.

Wireless AC Control With The Raspberry Pi

We’ve seen some of [Connor]’s work before, and it looks like he’s now turning to product design. He’s come up with an adapter for the Raspberry Pi to control a few wireless wall socket relays, allowing anyone with a Pi to control lights, coffee makers, TVs, and anything else that falls under the very broad home automation banner.

The system uses a 315MHz radio breakout board for a Raspberry Pi to control the relays in one of three wall socket adapters. There’s a script running on the Pi with a very nice GUI to turn the lights on and off.

[Connor]’s product is extremely similar to a certain WiFi-enabled wall-plug relay system controlled by a smartphone, and to that end, he’s decided to call his device the Belchin’ Emo Switch. The name might need work, but he’s selling three Raspberry Pi-controlled wall plugs for the same price of one wall plug from Brand A.

Below you’ll find [Connor]’s videos for his device. You can also check out this reddit thread where he shows off just how open source he can be; there are part suppliers and even how he’s packaging this system for shipment.

Continue reading “Wireless AC Control With The Raspberry Pi”

Complicated iPhone garage door opener

iphone-garage-door-opener

The round-about way this iPhone garage door opener was put together borders on Rube Goldberg. But it does indeed get the job done so who are we to judge? Plus you have to consider that the Apple products aren’t quite as hacker friendly as, say, Android phones — so this may have been the easiest non-Jailbreak way.

The main components that went into it are the iPhone, a Wemo WiFi outlet, and a 110V rated mechanical relay. But wait, surely it can’t be that simple? You’re correct, just for added subterfuge [Tall-drinks] rolled IFTTT into the mix.

You may remember hearing about If This Then That from the Alert Tube project. It’s a web-based natural language scripting service. Throw everything together and it works like this: The iPhone sends a text message which IFTTT converts to a Wemo command. A power cord connects the Wemo outlet to the 110V electrodes on the relay. The normally open connection of the relay is attached to the same screw terminals of the garage door opener as the push button that operates it. When the relay closes, the garage door goes up or down.

The biggest problem we have with this is the inability to know if your garage door is open or closed.

WeMo without a smartphone

[Matt Galisa] decided to try his hand at setting up the Belkin WeMo outlet without using a Smartphone app. The hardware is a pass-through for mains voltage which allows you to switch the plug over the network. It has a built-in WiFi module which normally connects to your home network. But the first time that you power it up it announces its own SSID designed for an iOS (and recently Android Beta) app to connect to in order to enter your AP credentials.

He started with this Python script used for WeMo hacking. It was originally meant to issue commands to the outlet once it had passed the initial setup. [Matt] followed along but couldn’t get an answer on the port he expected. It turns out that the device listens on a different port until the initial setup is complete (probably so that you don’t mess up other outlets on the network that are already working correctly). His next challenge was to manually set the WPA credentials. This never really worked and he ended up using a virtual AP without password protection through DD-WRT. From there he was able to set up a Python script to turn on, off, and toggle the state of the outlet.

If you’re looking to dig deeper into the device’s security check out this project.

FitBit Hack causes food to spoil if you don’t exercise

exercise-or-starve

This hack could be titled ‘Exercise or Starve’. [Charalampos] needed some motivation to become more active. There’s a device called a FitBit tracker (black and blue on the left) which records your activity and submits it to a web interface. You get daily goals and can earn badges. But those stinking badges didn’t motivate him. He decided he needed something that would really get him off of the couch. So he hacked the FitBit to cut power to his refrigerator. Not meeting his goals will eventually result in a stinky mess and no dinner.

It’s a bad idea to cut power to the icebox. But we see this merely as a proof of concept. He’s using the Belkin WeMo networked outlet. Other than some security issues we discussed on Thursday this is a very simple way to control devices from your server. [Charalampos’] implementation uses the FitBit API to check his activity and drives the outlet accordingly.

Turning the Belkin WeMo into a deathtrap

The Belkin WeMo is a small, WiFi connected outlet controlled by a mobile device that adds Internet control to a desk lamp, coffee maker, or, if you’re feeling daring, your home server. It’s an interesting device, but of course there are a few security implications of having your electric kettle connected to the Internet. [Daniel] was able to get root on his Belkin WeMo and with full control of his Internet-connected outlet was able to turn it into a deathtrap.

[Daniel] says his exploit could be developed into a virus that will scan for WeMo devices. Once these Internet-connected devices are found, it’s easy to turn these devices on and off really fast; something not too dangerous for a desk lamp, but potentially lethal if it’s plugged into a space heater.

In the video after the break, you can see [Daniel] exploiting the WeMo with a flaw in its UPnP implementation. There’s footage of his terminal hacking and of his desk lamp being turned on and off really fast, something that could be very dangerous for higher current devices.

Continue reading “Turning the Belkin WeMo into a deathtrap”