11.27.2013

A Raspberry Pi Project the NSA Would Be Proud Of

A few days ago I looked up, from jumble of monitor windows and labs that occupy my desk, at my Raspberry Pi sitting there sulking at me. It had that 'sad microcomputer look' to it, notably from a general lack of usage. I've had the Pi for nearly a year now and I've played with it off and on but nothing ever really started clicking enough that got me serious about any projects with it. This is largely to blame on my lack of Linux knowledge and eventual frustration. Sitting there, in that moment, pondering the nearly thousands of things you can do with a Pi, I looked over and noticed my old Xbox camera. It too has been abandoned by the apathy of technological progression. This spark of inspiration got me digging through one of my "Drawers of Misfit Toys". Basically, it's all the wires, adapters and little odds and ends that I don't use anymore, but am too afraid to throw away for this very reason! Inside I resurrected an old WiFi dongle that I never had any use for. Are you thinking what I'm thinking?

Wireless
Really what made things start to get interesting is when I got the Wireless adapter working on the Raspberry Pi. This by no means is anything new and, in fact, there are hundreds of tutorials out there to get it to work. What's interesting though is, once you make the Pi wireless, how much more possibilities open up of what you might do with it. I could have it down in the basement helping automate my Curing Chamber processes (see Charcuterie). I could buy a solar powered battery case for it, place it in a weather proof container, and make it a DIY weather station. Really I plan on doing all these things as time goes on, but first things first. Let's use what we have available!

Motion Detection
After making the Pi wireless, I checked out 'Motion' to see if I could turn my webcam into a motion detecting security camera. After a few days of tweaking I got it running very nicely. Motion comes with tons of customization, and you can tweak anything and everything to get it to do what you want. Basically I have the camera set up to watch an area of my house (let's say the backyard) when anything moves in front of the camera it takes a picture and time stamps it.  The picture is then saved onto the Pi.

Web Stream
In the process of setting up Motion I also let the Pi broadcast the stream over the internet (with authentication). From there all I have to do is use a web stream app (VLC player, MJpeg Viewer for Android) and I can check in on my house from practically anywhere in the world on my phone or tablet.

Motion Alert
Not only does the Pi take a picture of a would be trespasser, but I also set it up so that upon the event of a picture taken/motion detected it sends me a custom email (via sendEmail) notifying me that it has seen something! This was by far one of the more fun moments of configuring on the Pi. Having my phone ring because I wave my hand in front of the camera is a neat 'magic trick' to show to my friends.

Off-site Image Storage
In my quest to turn my Pi into the ultimate Motion Detecting, Burglar Catching, Alert System ever conceived,  I thought.. "Why not have the pictures FTP directly to my Dropbox  (or any cloud storage) so that the images don't only reside within the house. With a few tweaks to the motion.conf file that's exactly what it does. Upon saving images, and notifying me of detection, it also FTP's a second set of images over to my Dropbox. So after I get the message I could go check the files from my phone and make sure it wasn't a stray cat or something.

So what's next? One of my friends suggested (jokingly) that I have it upload the images to some sort of Google facial recognition database. Maybe I could rig it up to turn on the porch lite at night, and launch my own 'home defense drones'.  I have no idea where I'll go with this project really, or where it will end up. In all honesty though, it's just really great to have something exciting to do with my Raspberry Pi and actually understand and make progress towards it. As a bonus I'm starting to understand Linux better as well. Be on the lookout for more inspired Pi projects to come!

Sites that helped in this project:

How to Make a DIY Home Alarm System with Raspberry Pi- https://medium.com/p/2d5a2d61da3d

Linux File Access Permission Reference - http://www.penguintutor.com/raspberrypi/file-permissions-reference

Setting Up Motion with FTP & Email - https://raymii.org/s/tutorials/Setting-up-motion-with-ftp-and-email-support.html

Send Email from Command Line - http://danielthat.blogspot.com/2012/10/how-to-send-email-from-command-line.html

11.20.2013

How To: No Adapter shown in WiFi Config on Raspberry Pi (fix)

In an attempt to make your Raspberry Pi wireless through command line you may have changed some settings in the interfaces config file. As as a result when attempting to set up your wireless dongle through the WiFi config GUI you may notice that no adapters show up. If this is the case you should follow these steps first to see if it can fix the issue.

Performed with:
HW: Raspberry Pi Model B
OS: 2012-12-16-wheezy-raspian
Wirless Dongle: Belkin N150 (F7D1101)



Step 1
From your Pi's desktop double-click LXTerminal to bring up the command line.

Step 2
In the terminal type sudo nano /etc/network/interfaces

Step 3
Edit your interfaces config file by making sure the text looks like the following...

auto lo
auto wlan0

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Step 4
Save your work by pressing Ctrl X and confirming save. Plug in your WiFi dongle. Now reboot your Pi (sudo reboot).

Step 5
When your Pi restarts type startx to bring up the GUI again. Now double click the WiFi Config icon to bring up the wpa_gui properties box. If all was successful you should now see wlan0 show up in the Adapter section. From here you should scan for you SSID and set up the connection.

If you are still not seeing anything in the Adapter section. You may want to go back and troubleshoot a few issues with your dongle. The command lsusb (that's lowercase L) is good for checking to see if your pi even recognizes your WiFi adapter. There may be issues with your adapter needing to run from a powered USB hub as well, so don't rule out that possibility.

Also be sure that your adapter is at least known to work with the Pi consult the compatible WiFi Adapter List: http://elinux.org/RPi_USB_Wi-Fi_Adapters

Hope this helps.


11.13.2013

Sex, Politics, Religion, and Operating Systems

ear ye, hear ye! I decree that there be a fourth taboo when conversing politely in the company of others! Mayhapse you have heard the old adage "Don't discuss sex, politics, and religion  in polite company".Ninety-Nine percent of the time this saying is true one hundred percent of the time, especially in this our modern era, as the conversation will undoubtedly navigate on a vastly different
course away from 'polite'.  To demonstrate my commitment to these aforestated maledictions, I will end all further elaborations on the subject ---> here.

Yet an amendment requires for a new kind of conversation. A conversation turned scathing by the fanboys of our diverse sociotechnical systems. Let us annex the 'Preference for Operating System'  unto the the old axiom for our dinner-table worthy nonpartisan conversation.

Ninety-Nine percent of the time this saying is true one hundred percent of the time... 

No more do I wish to hear of how the iPhone is for the invalid, or Androids are for the ogreish! This war over operational superiority must subside! It is time for  the PC and the Mac users to quell their stalwart fanaticisms and subsist to at least the degree of a friendly acknowledgement.

Brothers, Sisters, there is room enough, in this our digital age, for all our children, and our children's children, to enjoy the fruits or our PCs, Macs, iPhones, Androids, and Blackberrys without cause for quarrel!

So if we must discuss the self-evident truths about which is the superior Operating System I will gladly tell you in earnest...

"The weather is unusually cold for this time of year isn't it, wouldn't you say?"





11.11.2013

The Adventures of an IT Student: A Lab Odyssey


While heading into to school, to work on a Frame Relay lab, I thought it might be fun to document the experience. I needed to come in early to get the lab completed before my Cisco 4 class started. So as I headed out to catch the bus, grabbed my phone and filmed the epic quest! I give you 2013: A Lab Odyssey.