Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I gave up on using my Pi as a VPN'd NAS, since the CPU is too slow to handle OpenVPN (see here Low bandwidth internet over VPN).

So I want to set it up to do (all of) the following:

  1. Control a light switch
  2. Switch my speaker system between either of two audio inputs (laptop or desktop)
  3. Link to my Android phone through an app, allowing me to control the Pi to do (1) and (2) through my phone

I have a fair amount of programming expertise, but I'm pretty inexperienced when it comes to hardware/electronics, so I'd really appreciate some help -- specifically whether you think it's possible to build interfaces on the Pi that allow me to do the above.

share|improve this question
    
#3 shouldn't be too hard if you are comfy with java; although you could just make a web interface, in which case you wouldn't have to write a platform specific client. –  goldilocks Feb 11 '13 at 19:55
1  
Sounds reasonable. Get back to us if you encounter any problems along the way :) –  Jivings Feb 11 '13 at 19:56
1  
I think Jivings is trying to tell you to break this project down into steps and ask more specific questions as you go. Eg, probably something about the hardware required to control a lightswitch will get you answers. –  goldilocks Feb 11 '13 at 20:56
    
Anything specific you need help with or you are trying to get someone to point you to how-tos for each of the three easy things? :) –  abolotnov Feb 11 '13 at 21:37
    
You can do all that using HTML5, jQuery with Node.JS(for system level script execution) but can also be PHP that does the same, they both will drive Perl, C or Bash scripts. Getting it all together is the problem. So start with LAMP stack for webpages. Then make a a script or two. Lastyly get Web to execute your script. Good luck –  ppumkin Feb 12 '13 at 8:36
show 1 more comment

2 Answers

I assume that when you say "light", you mean a plug-in-an-outlet light. To do that, I'd use a GPIO pin to control this relay-switched power cord and plug your light into it.

https://www.adafruit.com/products/268

And, you'd be supporting an awesome open source hardware company like Adafruit (with whom I'm not affiliated).

share|improve this answer
add comment

Specifically on the light switch question, you could use z-wave devices for this. Raspberry Pi can act as a Z wave controller using Open Z wave as software. You'd need either a usb open z wave dongle or possibly you could wait for this GPIO add on to become available.

There are a lot of z wave lighting nodes available but I can't add any more links to google is your friend for that.

Once you've got the Pi controlling any given function, adding a front end accessible via an android device should be a relatively simpler task along the lines of ppumkin's comment.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.