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 ...
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 ...
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.
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.
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
Use a Telldus Tellstick!
It has many applications and supports sensors as well.
Code samples in many languages:
A router which has an HTTP API to control the TellStick if you dont want to have it directly connected to the PI:
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.
Libraries for interfacing with the GPIO
Use a relay to control the 12V power line
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:
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.
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 ...
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 ...
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 ...
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.
The right device is
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
to start.sh (or start_debug.sh)
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 ...
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 ...
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 ...
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!
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 ...
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 ...