Sponsor Message:
Non Aviation Forum
My Starred Topics | Profile | New Topic | Forum Index | Help | Search 
Raspberry Pi- Any Interesting Uses?  
User currently offlinesccutler From United States of America, joined Jan 2000, 5509 posts, RR: 28
Posted (1 year 8 months 3 days 7 hours ago) and read 1717 times:

So, I finally received my very own Raspberry Pi single-board computer.

My principal mission is to build a very basic media server (more for the experience than to save money), but I am intrigued by the possibilities for a clever and inexpensive device like this. I think in terms of simple machine or process control, home management, stuff like that.

So, anyone out there doing something fun with the Pi? Dish it!


...three miles from BRONS, clear for the ILS one five approach...
5 replies: All unread, jump to last
 
User currently offlinenighthawk From UK - Scotland, joined Sep 2001, 5136 posts, RR: 33
Reply 1, posted (1 year 8 months 2 days 23 hours ago) and read 1638 times:

I'm just using mine as a media server at the moment, although I have a second one I might use for something else, i've yet to decide. The primary one is running raspbmc to stream media from a central server and play it through the tv. Working perfectly so far!


That'll teach you
User currently onlinemham001 From United States of America, joined Feb 2005, 3621 posts, RR: 3
Reply 2, posted (1 year 8 months 2 days 18 hours ago) and read 1591 times:

I was thinking about using one for my web server but I've read it is not nearly fast enough. A little bit disappointing since any old 486 can do that. It seems mostly optimized for video?

User currently offlineALTF4 From United States of America, joined Jul 2010, 1212 posts, RR: 4
Reply 3, posted (1 year 8 months 1 day 4 hours ago) and read 1477 times:

I have 6 (yeah, I know). I'm using them to augment my Arduinos that I use for home automation. I have my place setup to set A/C when I get within 4 miles, then turn on lights and music when I (and just I, not somebody else) walk through the door. When I leave, it does everything in reverse -- stops music, dims lights, and then sets the A/C to away mode depending on some logic. When I wake up, the TV turns on to CNN or a local news channel, lights turn on, etc.

I'm trying to use the Rpi's to be remote audio sinks through PulseAudio to have a multi-room audio setup. Since I have a medium-sized apartment, I can't hear the main speakers when in the bedroom, but its all still close enough that the audio needs to be in almost perfect sync. Unfortunately PulseAudio, while it tries, just can't pull it off too well.

The other Rpi's will be used for other miscellaneous tasks, showing system status, and then one will go in the car for some carputer tasks.



The above post is my opinion. Don't like it? Don't read it.
User currently offlineajd1992 From , joined Dec 1969, posts, RR:
Reply 4, posted (1 year 8 months 1 day 3 hours ago) and read 1471 times:

Quoting ALTF4 (Reply 3):

I have 6 (yeah, I know). I'm using them to augment my Arduinos that I use for home automation. I have my place setup to set A/C when I get within 4 miles, then turn on lights and music when I (and just I, not somebody else) walk through the door. When I leave, it does everything in reverse -- stops music, dims lights, and then sets the A/C to away mode depending on some logic. When I wake up, the TV turns on to CNN or a local news channel, lights turn on, etc.

I'm trying to use the Rpi's to be remote audio sinks through PulseAudio to have a multi-room audio setup. Since I have a medium-sized apartment, I can't hear the main speakers when in the bedroom, but its all still close enough that the audio needs to be in almost perfect sync. Unfortunately PulseAudio, while it tries, just can't pull it off too well.

The other Rpi's will be used for other miscellaneous tasks, showing system status, and then one will go in the car for some carputer tasks.

How on earth do you have that set up? I'm intrigued by this - I love it. Almost like Bill Gates' house.


User currently offlineALTF4 From United States of America, joined Jul 2010, 1212 posts, RR: 4
Reply 5, posted (1 year 8 months 1 day 3 hours ago) and read 1463 times:

Quoting ajd1992 (Reply 4):


Well, you asked. Here's a post that explains the high-level stuff. It's long.  

Basically, I buy hardware that I can control through standard TCP/IP commands. For example:

http://www.homedepot.com/buy/filtret...-backlight-3m-50.html#.UOMzOm_Adik
http://www.meethue.com/en-US

Then I either use the published API for those products, or I reverse-engineer the commands sent between the mobile app and the hardware. I wrap those up into PHP scripts, that I can simply call with script.php?temp=74&mode=cool as an example for the thermostat to set A/C to 74 degrees, or for the lighting I have some preset colors, brightness levels, etc which I can call through various settings I have pre-scripted.

For the TV, I also built an arduino device with an IR transmitter. I built a similar device with a 38khz IR receiver. So, to figure out what the IR command is when I press the power button on the remote, I aim the remote at the receiver, press the power button, and then record the output. I save the output on all the buttons, then write a PHP script to map those into simple calls, for example: ir.php?c=power&device=tv. The PHP script then sends a WGET to the arduino with the transmitter, and basically sends the hex code for the IR command to the arduino, which then outputs it onto the IR LED. There's some additional logic for input changing - for example, the TV will skip "dead" inputs, but if I turn on the Apple TV and the bluray player, I can't press the input button once to cycle to Apple TV, because now there's another device. So, basically I have the IR receiver "listening" to all commands, and updates a database so it knows what is on and what channel, device, etc, and can help process some logic.

For music, I have a dedicated laptop, hooked up to the sound system, that runs music player daemon. It is controllable via command line, and plays music. It is the audio player, and I can use different devices to connect in to change playlists, tracks, etc. If I wanted to play the track "Beautiful Day" by U2, I could issue a command like "mpc clear && mpc search artist U2 track "Beautiful Day" && mpc add && mpc play", and it would clear the current playlist, add the song, and play it.

Finally, I also have various cameras, IR sensors to sense human presence, bluetooth 'beacons' that have short enough range that they are only visible in certain parts of the home, etc. These are all miscellaneous sensors to help with location and logic processing.

Next up: logic processing. I have a beefy server that I run VMware ESXi on. I have two servers on here that are used for automation. The first one has a public static IP address assigned to it, so it is accessible around the world. I have business class cable internet, and this was an add-on cost. This server just acts as, essentially, a reverse proxy to allow access to automation functions. It runs on HTTPS and has a valid SSL cert. It also houses a jQuery-powered page that shows system status, such as current temperature, outside weather, etc. It also shows an icon if I have an unread text, missed call, VM. This screen also dims when I leave the house, brightens when I return, and the same for when I'm asleep, just to prevent burn-in and also keep ambient light levels down. I use the above-noted audio server to show this page in full-screen onto a spare LCD by the TV.

The brains of the operation is on the second server. It has a database, cron jobs, and houses the PHP scripts that wrap the devices I listed above. The database is constantly updated whenever anything happens. Lights on, off, music on, off, track change, A/C temp, you name it. The jQuery-powered page I noted above constantly polls this database and then displays things based off of its status. If an IR sensor sees IR light, it outputs a higher voltage to arduino, and arduino then sends that voltage to the DB. High voltage = person present, low voltage = person not present. I have complete IR coverage of my place, so if all voltages = low, nobody home. If one or more = high, then somebody is home. You get the idea.

So, the last thing: I want this stuff to work based off of me. If do x, home should do y. It really boils down to one very simple thing: I need the system to know where I am. If it knows I am home, then it can deduce that the IR sensors are seeing me. If I am not home, but the IR sensors see somebody, then maybe I should know somebody is in my house? The only electronic device I have on me at all times is my phone. It is an Android phone, which means I can run the tasker app. This is essentially a "if x, do y" for the phone. So... if I'm connected to my home wifi on my phone, tell my home that I am home. If I disconnect from the wifi, *AND* connect to cell towers not near my home, then I am not home. So, set home to away mode. If I start connecting to cell towers near my home, and then connect to wifi, that means I just came home... so turn the lights on, play some music, etc.

Everything else is just logic built based off of my phone's position.

Downside: yes, if I lose my phone, things can get interesting. If my phone's battery dies, I have to do things myself (oh the horror).

That's it in a nutshell. I need to write this up on a blog, with command snippets, pics, etc - I've had a blast building this out since mid-summer. I've got even more things that I didn't go over, such as I can call a phone number and use interactive voice response to turn lights on and off, etc. That's another server I'm hosting, it runs asterisk which is a common voice over IP server. I've had some interesting problems as well - such as the "I'm home" and "I'm not home" logic getting reversed in one odd turn of events, so when I got home everything turned off, when I left everything turned on. Wasn't hard to fix, but... if you don't have some patience to work through stuff like that every few months, it could get annoying.

Future plans include network-controlled appliances, window shades, and support for multiple people being residents. Right now it's just me that lives here... but if somebody else were to move in, then I'd need to figure out how to set things so the logic is "if one or more people present, do x", and then add in personal preferences for each user.

[Edited 2013-01-01 11:33:33]


The above post is my opinion. Don't like it? Don't read it.
Top Of Page
Forum Index

This topic is archived and can not be replied to any more.

Printer friendly format

Similar topics:More similar topics...
Do You Have Any Famous Relatives? posted Mon Dec 24 2012 21:16:23 by Ps762
Any Corrs Fans On Here? posted Sat Dec 22 2012 22:16:35 by YVRLTN
Any Backyard Mechanics Out There posted Sat Dec 22 2012 21:34:29 by L-188
Any Beatles Fans Here? posted Sat Dec 15 2012 13:30:26 by LGWflyer
Any Classic Oceanliner In Service Still? posted Sat Nov 10 2012 21:49:59 by United Airline
Any A.net Members In Belgrade, Serbia? posted Thu Nov 1 2012 17:07:43 by Geezer
Hurricane Sandy Oct 2012 - Any Photos Yet posted Mon Oct 29 2012 02:50:36 by varigb707
Any Birdwatchers Or Duck Experts? posted Wed Oct 3 2012 13:27:31 by zckls04
Any Techies Out There? posted Wed Sep 12 2012 18:14:06 by dlramp4life
Any Internet Security Gurus? posted Thu Sep 6 2012 08:43:06 by corocks