Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can get RF Controllable Wall Light switches that replace the existing switch. The ones in the UK commonly use 433mhz and a configurable static code to turn them on/off. The benefit of them are that you can still control them from the switch itself so you won't be looking around for the bloody remote, The in socket types have to have the wall switch on all the time so if someone turns the light off from the switch then your automation goes along with it. And the 433Mhz signal is normally easily decoded.

If you don't have a SDR (a cheap RTLSDR will do) or an oscilloscope you can wire the remote that will come with them to your soundcard on your computer (And you can normally use a cheap USB soundcard if your paranoid about frying the sound card in your pride and joy, I never had an issue when I used to do it) and use an audio suite such as audacity to record the signal and then manually decode the signal.

Once you have the signal you basically then do a replay attack to control the switch using your pi an a cheap 433mhz transmitter.

The downsides to these are that they have no security if someone knows the codes to turn on/off your lights they can but they are limited by the range of their transmitter. You also don't get feedback from these style of switches so the software doesn't know if the switches are actually on or off. I would send my codes a number of times just incase they switches didn't pick up on them the first time.

You can get WiFi switches too but they are more expensive, add complexity to the project (if they are not well documented) and personally I would put them on their own wifi without access to the internet. (But you could write your own bridge so you can control them over the net.)

Openhab[1] is a nice Home automation suite that runs on the Pi and has a lot of modules to control lots of different things already written for it. One of the things it can do out of the box is calculate sunrise/set where you are. So I would use it to turn on my outdoor lights 15 mins after dusk and switch off at a set time.

Just a word of advise to help you making the same mistake I did with it at one point, make sure you write the log's to ram otherwise you can burn though SD Cards pretty quickly (well it took 6 months for one of mine to die)

[1] http://www.openhab.org/

EDIT: You could also use Philip Hue's (or their compatibles or anything using ZLL) and hook up a zigbee to your pi, create your own "hub" and control the lights directly as the ZLL Master key has been leaked. But these also suffer from the "in socket" issue where if someone turns off the switch on the wall then you lose control of the bulb.



I wrote up how you can read the signals here:

https://www.stavros.io/posts/how-remote-control-rf-devices-r...

Although I would (and did) use an ESP8266 to connect everything to MQTT, it's much more flexible and secure (you control the entire firmware).


You can use a bus pirate as a LA instead of Audacity for these signals since they're so low-tech: http://tinkerman.cat/decoding-433mhz-rf-data-from-wireless-s...

Related, for OOK: https://www.embeddedrelated.com/showarticle/626.php

http://rayshobby.net/rftoy/ is also fun if you want a more "let me play with something that already works" type gadget.

Audacity does work well enough for IR though, and these are the best transceivers I know of: http://www.iguanaworks.net/products/usb-ir-transceiver/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: