61

This is the main project my Raspberry Pi is dedicated to right now, so I figure I can add my two cents. Keep in mind this project is still very much a work in progress. I chose to use the C programming language for this project exclusively on the Raspbian OS, and that may have affected some of my decisions and instructions. I'm going to only list free and ...


49

EDIT 2018 Years later and the hobbyist microelectronics community has exploded thanks to the like of cheap and power embedded computers, like Raspberry Pi. This caused mechanical relays that work direct of GPIO on 5/3.3V allot cheaper and easier to get. You can get them as singles or premade (Bangood, Seeedstudio, Gearbest, eBay, etc) ranging from 4 to 48 ...


30

You could get one of these (RF) remote control power switches (Assuming you can find one suitable for your local power receptacles) and hardwire the RPi to the remote. This has the advantage of being isolated and not requiring any mains wiring. You'd have to take into consideration the power consumption of the device if the goal is to save power.


23

Both Adafruit and Spark fun sell an assembled device exactly for this purpose: The Power Switch Tail exists in several variants, fully assembled or as kit. The kit's assembly instruction (PDF) include schematics.


22

I'm using these items: Receivers ON-OFF to control my lights (you typically put a device in the walloutlet or instead of the walloutlet). They work in the 433 MHz band (ISM). Out of the box you have a remote control which sends a signal to the receiving device and switch it on or off. In my case, I created this situation: Created an HTML site on my ...


12

You could use mpd, pulseaudio and raop2 module, if necessary: mpd for managing playlists, library, etc (sudo apt-get install mpd) pulseaudio for managing audio outputs: raop for AirPlay, or any other output device such as analog jack, HDMI, http streaming service, etc (sudo apt-get install pulseaudio) raop2 module for pulseaudio if the original raop module ...


12

As mentioned above, LIRC is a great software package to get your RaspberryPi sending and receiving IR signals. As of December 2012 the latest Raspbian OS now includes ar0n's LIRC driver. I wrote a guide to get LIRC installed and configured on your RaspberryPi (from the hardware up) as I had to solve this same issue myself. Once you've got LIRC installed and ...


11

SainSmart sells Arduino relay modules (shields), they could also be used on Raspberries. There are different models (higher amperage, number of outputs, etc). For example SKU:20-018-100-FBA can be used for "equipment with a large current". And a useful article discussing Using the Raspberry Pi to Control AC Electric Power that mentions the SainSmart.


10

You can get a certain power suply with a USB-Connection and control it with this http://sispmctl.sourceforge.net/ Debian/Raspian has the package sispmctl by default.


7

Finally! I found it after almost two months after trying out every minor change in configuration and peripherals/accessories every day. It turned out to be a USB extension cable issue. I was using a 3 meter USB extension cable, which was not having noise filter. When I replaced the same with 5 meter cable with Noise Filter on both sides, everything works ...


6

The thing is called X10, it's an industry standard for most home automation tasks, including controlling lights. The control signal is sent over the same power line your appliances are connected to. To be able to control everything from the computer, you might want to read about X10 Computer Interfaces from OpenRemote web site. The model you're most ...


6

What you're looking for is a Solid State Relay or mechanical Relay. The idea is that a small amount of current at a low voltage (such as from your RPi) can be used to trigger the flow of a larger amount of current at a higher voltage (such as a lamp). I would recommend $12 SainSmart 8 Channel DC 5V Relay Module for Arduino Raspberry Pi, as it's already been ...


6

Use a Telldus Tellstick! It has many applications and supports sensors as well. Code samples in many languages: https://github.com/telldus/telldus A router which has an HTTP API to control the TellStick if you dont want to have it directly connected to the PI: http://www.dovado.com/index.php?option=com_content&view=article&id=13&Itemid=20 You ...


6

You'll need just two things: Make use of the GPIO pins Using the GPIO port of the Pi is possible with numerous libraries for all significant languages. Finding one that interfaces well with Python or C is no trouble at all. Just have your pick, e.g. pigpio WiringPi Libraries for interfacing with the GPIO Use a relay to control the 12V power line A ...


5

you could also use an existing device. I have interfaced an Aviosys NetPower 8800 switch which connects via USB. It didn't come with Windows drivers and they weren't willing to nrelease an interface spec so I could build a Linux driver. But I've written a Python program to control it: https://skydrive.live.com/#cid=500667A62B4F909A&id=500667A62B4F909A%...


5

There is somebody that already has written a LIRC kernel driver for the Raspberry Pi, it can be found here: LIRC Raspberry Pi driver. Also the required hardware and connection schematics can be found on this page. I haven't experimented with LIRC myself, but there are many applications available that use LIRC, I guess they now all work on the Raspberry Pi. ...


5

I went with pocketsphinx_continuous and a $4 sound card. To manage the fact that it needs to stop listening when using speech synth I used amixer to handle to input volume to the mic (this was recommended best practice by CMU as stop-starting engine will result in poorer recognition) echo "SETTING MIC IN TO 15 (94%)" >> ./audio.log amixer -c 1 set ...


5

Relays are pretty safe to use without any special isolation like optocouplers. The reason people recommend optocouplers in DIY projects... well because its DIY and an optocoupler is safer in case of something going wrong. The input pins power a coil and push or pull a lever using some kind of snap hinge to eliminate bounce and sparks. So you are already ...


5

Let's break this answer in two parts: scheduling a task and turning a led on and off, than wrap together. You can go to the end and just get the script if you prefer! Scheduling a task So I would suggest you use the atd for one time scheduling in Raspbian. If you need something repetitive, use cron - I will cover here only how to use the at command. More ...


4

A common problem :-) Try Googleing for 'Raspberry Pi projects' to see what others have done. Here's a good place to start - Make Magazine's 47 Inspirational projects


4

Running a web server as root is considered unsafe because any security flaw in your web applications could potentially allow an attacker to execute code with root privileges. If your web server is running with limited privileges, an attacker can gain, at most, the same privileges the web server has.


4

The right device is /dev/ttyAMA0 Make sure that the openHAB process has sufficient rights and that Z-Way (if installed) is stopped (/etc/init.d/Z-Way stop). Because of the uncommon name of the Device, you have to tell openHAB at startup that this is a RXTX device - append -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 to start.sh (or start_debug.sh) That ...


4

My answer to a related question and some of the other discussion on the following may prove instructive. https://raspberrypi.stackexchange.com/a/9561/8697 The simple answer is NO. The reason domestic power is higher voltage (110/230v) is to reduce losses, and this is only distributed over relatively short distances (a couple of km at most). In telephone ...


4

If I remember correctly, Tk needs a window manager, so you probably need to export the DISPLAY variable. Try setting DISPLAY=:0.0 before running your script.


4

You can achieve each of those things with Python on the Raspberry Pi. The key is in the Raspberry Pi Python library support for GPIO peripherals. For help on a particular sensor search for raspberry pi Python sensor name. Most of the sensors you mention are digital (return 0 or 1) and may be directly connected to the Pi provided their voltage is 3V3 ...


3

You can change the ownership of the required GPIO device files to a non-root userid under which you run the web server and associated helpers. Even better, assign them to a user group including both the web server and your test account, and set the group permission bits. Or you can write a daemon which runs as a user which has been granted access to those ...


3

Find a problem in your life that needs solved, and then solve it :) Want to know when you lights are on or off in the house? Measure and log temperature in your home? How about your own IP enabled weather station? Start you coffee pot when your alarm clock goes off? You name it, you can do it with the Pi! Mostly, just have fun with it!


3

Z-Wave looks like a good choice now, and there are many ways to use it with Pi. Everyone is building some Z-Wave enabled device so you can now interface almost anything in your home. It's something like an enhanced wireless version of good old X10. Protocol can be found here, devices can be Pi controlled via USB sticks, and you can make your own devices if ...


3

I've found LIRC to be relatively easy way to send IR messages, but really wanted to be able to control LIRC from java. I like programming in java and didn't find any straightforward tutorial for python to convince me work with it instead of java. After several hours of trying to send IR codes from the pi using java I found the next solution to be relatively ...


3

X-10 serial interfaces exist. That would have the advantage of controlling AC switches that aren't right there.


Only top voted, non community-wiki answers of a minimum length are eligible