Your PS3 has a secret identity, by day it delights you with Blu-ray movies and HD Video Games. But when you’re not there your PS3 is watching over your living room. Or at least it could be if you want it to. What we’ll have at the end of this article is the ability to check out what’s happening in our living room live via a PSP wherever we have a wifi connection.
Archive for the ‘DIY’ Category
Use your PS3, USB Webcam and PSP to monitor your living room
Friday, August 29th, 2008One Keyboard and mouse, Many OS’s, Monitors and Computers
Thursday, August 28th, 2008Today I’m going to talk a little bit about Synergy. Synergy is a free (as in beer and speech) piece of software that allows you to use one keyboard and mouse with multiple computers. This differs from a traditional KVM in a couple ways. 1. You get the added screen real estate as each machine needs their own screen 2. You don’t need additional hardware the keyboard/mouse switching is done over your existing network. The advantage of this is that Synergy is cross platform, there are currently Synergy clients for OS X, Linux and Windows (No official support for Vista however, It may be possible but your mileage may vary. let me know how you make out if you try it) so you can have a Windows XP machine on the left monitor an Apple machine on the center monitor and a Linux machine on the right monitor or you could have 3 machines all with the same OS.
Fix Mom and Dad’s computer from the comfort of your own home
Thursday, August 21st, 2008I’ve done technical support for years now and most often have to get someone to be my remote eyes and hands. This can become exceedingly difficult when dealing with someone who’s less versed in the nuances of computer use than I’d like. One of the tools I’ve found that makes this a lot easier to deal with is remote desktop (or remote terminal services). This allows you to see the desktop of whomever you’re troubleshooting with. Now most of the time this involves setting up some sort of remote desktop server on the persons computer and you knowing what their IP address is (Very difficult if it’s dynamic). I know this almost sounds like more trouble. But there is a solution.
Emailing or Tweeting when motion is detected on your web cam
Thursday, June 26th, 2008
Hi again everyone.
In the previous 2 posts we’ve setup an Xbox LIVE Vision Cam in Ubuntu then we Set it up to trigger on Motion. Now in this post we’re going to build on this and have it send us a notification via email or via a tweet on twitter.
What we’ll need
- The Ubuntu/Webcam setup from the previous 2 posts
- An internet connection
- A twitter.com account or an email address
First things first open up a terminal window
type
sudo vi /etc/motion/motion.conf
(or sudo gedit /etc/motion/motion.conf if you’re using a gui)
to open up the Motion config file.
we’re looking for the “locate” item and we want to change this from “off” to “on”
This will draw a border around the motion in the image.
Next we need to find the “on_motion_detected” line. This is where the magic happens
This line will allow us to define a command to run when motion is detected.
Now like I stated in the beginning we have 2 options we can send the message via email or we can send it via twitter. I’ll begin by showing you how to send the message via twitter.
We need to replace the entire line
; on_motion_detected value
with
on_motion_detected wget -O - --user=TWITTERUSERNAME --password=TWITTERPASSWORD \\ --post-data=”status=Your Message” https://twitter.com/statuses/update.xml
Save your file and restart motion (as covered in the previous article)
Now when motion is triggered you’ll post a tweet with the message you set in the command above.
Now to have it send you an email message there’s an extra step.
We have to install “mailutils”
So run the command
sudo apt-get install mailutils
Once that’s done installing we now have access to the “mail” command
So we need to edit the “on_motion_detected” item in the motion.conf file like for the twitter command above.
type
sudo vi /etc/motion/motion.conf
(or sudo gedit /etc/motion/motion.conf if you’re using a gui)
to open up the Motion config file.
And edit the
; on_motion_detected value
line to read
on_motion_detected echo "Your Message" |mail -s"Email Subject" your@email.addr
Save your file and restart motion (as covered in the previous article)
Now just as with the twitter command when your webcam sees motion an email will be sent off to the email address you set in the command above.
Make sure to check out the previous posts in this series Setup an Xbox LIVE Vision Cam in Ubuntu and Web Cam Motion Detection with Xbox LIVE cam and
As always post any questions, comments or other input in the comment section.
Cheers!
How-To Add motion detection to our Xbox LIVE cam setup
Wednesday, June 25th, 2008
Yesterday I showed you how to connect and stream an Xbox LIVE vision Camera from an Ubuntu computer to the internet (or your local network). Today we’re going to go a step further and set up a piece of software called Motion to not only stream the video but it will watch for motion and capture still frames when it sees any.
This is a fairly easy process.
What we need
- Our Ubuntu/Xbox LIVE Vision cam setup from yesterday
- An internet connection
Now as with the previous walkthrough we’re going to open up a terminal window
The first command we’ll run is
sudo apt-get install motion
This will fetch and install the Motion software package from the Ubuntu software repositories.
Now that we have Motion installed we need to tweak it’s configuration files to have it stream via webpage
so we type
sudo vi /etc/motion/motion.conf
(Replace “vi” with “gedit” if you want to do this via your gui)
This opens the main motion config file for editing
We need to replace the following lines
- Find
# Image width (pixels). Valid range: Camera dependent, default: 352 width 320
replace with
# Image width (pixels). Valid range: Camera dependent, default: 352 width 640
- Find
# Image height (pixels). Valid range: Camera dependent, default: 288 height 240
replace with
# Image height (pixels). Valid range: Camera dependent, default: 288 height 480
- find
# Quality of the jpeg images produced (default: 50) webcam_quality 50
replace with
# Quality of the jpeg images produced (default: 50) webcam_quality 80
- find
# Restrict webcam connections to localhost only (default: on) webcam_localhost on
replace with
# Restrict webcam connections to localhost only (default: on) webcam_localhost off
Save the file ( “esc” then “:wq” in vi. Just use the menus if you used gedit)
now we can test motion to see if it’s working.
sudo motion
You should get output similar to the following
[0] Processing thread 0 - config file /etc/motion/motion.conf [0] Motion 3.2.9 Started [0] ffmpeg LIBAVCODEC_BUILD 3352064 LIBAVFORMAT_BUILD 3344896 [0] Thread 1 is from /etc/motion/motion.conf [1] Thread 1 started [1] cap.driver: "uvcvideo" [1] cap.card: "Video Camera " [1] cap.bus_info: "0000:00:02.2" [1] cap.capabilities=0x04000001 [1] - VIDEO_CAPTURE [1] - STREAMING [1] Supported palettes: [1] 0: MJPG (MJPEG) [1] 1: YUYV (YUV 4:2:2 (YUYV)) [0] motion-httpd/3.2.9 running, accepting connections [0] motion-httpd: waiting for data on port TCP 8080 [1] Test palette YUYV (640x480) [1] Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008 [1] found control 0x00980903, "Hue", range -180,180 [1] "Hue", default 0, current 0 [1] found control 0x00980910, "Gamma", range 180,250 [1] "Gamma", default 180, current 180 [1] found control 0x00980913, "Gain", range 0,255 [1] "Gain", default 0, current 24 [1] found control 0x08000000, "Backlight Compensation", range 0,1 [1] "Backlight Compensation", default 0, current 0 [1] found control 0x08000001, "Power Line Frequency", range 0,2 [1] "Power Line Frequency", default 2, current 2 [1] mmap information: [1] frames=4 [1] 0 length=614400 [1] 1 length=614400 [1] 2 length=614400 [1] 3 length=614400 [1] Using V4L2 [1] Started stream webcam server in port 8081
If you do use your web browser to go to http://your.ip.address:8081 (replace your.ip.address with the IP address of the computer Motion is installed on)
you should get a webpage with a view from your webcam. Success!
Now a couple tweaks you can make.
By default motion saves the images of motion to /tmp/motion if you want to change this folder you just need to edit the “target_dir /tmp/motion” entry in the /etc/motion/motion.conf while you’re in there you can increase the fps of the feed by changing the “webcam_maxrate 1″ entry to a higher number as well if you want to run this full time you may want to run it as a daemon which means it will run in the background to do this just set the “daemon” entry in the motion.conf file to “on” instead of “off”.
If you have any questions or suggestions please feel free to leave them in the comments.