83 Responses

  1. Amy Motta
    Amy Motta at |

    I haven’t written anything in a while, but a creative hack like this is a great catalyst. Keep up the good work. This is an excellent tutorial.

  2. John Tantalo
    John Tantalo at |

    For some users, I think this technique might be more accurate if the notification message was “Cat Detected! Check immediately!”

  3. nerdd.net | news and opinion
    nerdd.net | news and opinion at |

    Keep Tab On Home Security With A Webcam And Twitter | nerdd.net…

    \r\nWorried about someone breaking into your house in your absence? Or just need to keep a tab on wh…

  4. coolant
    coolant at |

    Hey …. second post on Lifehacker …
    Cheers!

  5. Chris Radcliff
    Chris Radcliff at |

    @Shantanu: I think John means that motion isn’t the best criteria for an alert if you have pets moving around all day.

  6. Get Twitter Notifications From a Motion-Detecting Webcam [Step By Step] · TechBlogger

    [...] command line work, but it’s spelled out and explained pretty thoroughly. Photo by MShades. Keep Tab On Home Security With A Webcam And Twitter [My Technophilic [...]

  7. blu
    blu at |

    I’ve done everything in this guide, yet it won’t send the updates to my phone. It updates on the site (I’ve added the device and everything, set up updates etc) but I can’t follow myself and it doesn’t send the updates to my phone…

  8. steven
    steven at |

    Motion is working, I set up two twitter accounts, one following the other, however motion is not posting the alerts to my 1st twitter account.I tried all 3 methods, any idea on what I’m doing wrong?

  9. steven
    steven at |

    abc.txt was createdhere’s the response when I run motion with curlscr@scr-desktop:~$ motion[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[0] motion-httpd/3.2.9 running, accepting connections[0] motion-httpd: waiting for data on port TCP 8080[1] Not a V4L2 device?[1] Using VIDEO_PALETTE_YUV420P palette[1] Using V4L1[1] Started stream webcam server in port 8000[1] File of type 8 saved to: /home/scr/Webcam_Pictures/01-20080520091845.swf[1] File of type 1 saved to: /home/scr/Webcam_Pictures/01-20080520091845-01.jpgcurl: (6) Couldn’t resolve host ‘Detected!’curl: (6) Couldn’t resolve host ‘Check’curl: (6) Couldn’t resolve host ‘Immediatelyâ��’[1] File of type 1 saved to: /home/scr/Webcam_Pictures/01-20080520091846-00.jpg[1] File of type 1 saved to: /home/scr/Webcam_Pictures/01-20080520091846-01.jpg[1] File of type 1 saved to: /home/scr/Webcam_Pictures/01-20080520091847-00.jpg Tue May 20 12:51:58 +0000 2008 815714179 ”Motion web false false 14834776 sredd1701 sredd1701 false 1

  10. steven
    steven at |

    Thanks for the response. I figured that out about an hour ago myself, just didn’t get around to telling you until now. Also, it may just be my phone service, but if I don’t delete the text message when I get it, another message with the same text will not be received.
    BTW, I’m using a cheap Logitech Quickcam Chat webcam, less than $20 and it worked ootb with Ubuntu Hardy!
    The picture quality isn’t great, But you get what you pay for.
    Thanks again for all your help.

  11. steven
    steven at |

    Sorry to bother you again, and yes, I’m a real noob on linux, but I’m still having 2 problems. First when motion updates my twitter account, I don’t always get a text on the update. This sounds like a twitter problem, so I’ll pursue it there. Second, it seems that twitter doesn’t update if the current message is the same as the previous one. Is there a way to rotate messages or send a message plus a random number to insure that twitter updates?

    Also, if someone breaks in and steals my computer, I’ve lost all pics of him. Is there a way to have motion email the pics to my Gmail account?

  12. steven
    steven at |

    As I said before, I’m new to Linux so I’ve never written any kind of script before. But now seems like a good time to learn something new! Well, I’m off to Google how to write shell scripts!
    Thanks for all the great advice.

  13. Home Security via Twitter (Linux Only) at Twitterholics

    [...] A Ubuntu user wrote a tutorial that details how to use a webcam tool to notify you via Twitter when there is any suspicious movement in your home. The notifications can also be sent to you as text messages to your mobile phone. Filed under Linux | var disqus_url = ‘http://www.twitterholics.com/?p=569 ‘; var disqus_title = ‘Home Security via Twitter (Linux Only)'; var disqus_message = ‘A Ubuntu user wrote a tutorial that details how to use a webcam tool to notify you via Twitter when there is any suspicious movement in your home. The notifications can also be sent to you as text messages to your mobile phone.%0A'; View the entire comment thread. [...]

  14. Website Design
    Website Design at |

    That’s pretty nifty.

  15. Paul
    Paul at |

    Nice piece of integration. For those with pets, it might be fun to set up the camera with a field of view that allows some inference about what the pet is up to (scratching at door, poking at food bowl, ..) – then the pet could have its own twitter account updating with its status.

  16. Google’s New Favicon | My Technophilic Musings

    [...] other news, my Twitter-Webcam integration post has bypassed my earlier lifehacked post about Remote File Access Through E-mail by more than a few [...]

  17. Sweet Hacks - Vol II | GrokCode
    Sweet Hacks - Vol II | GrokCode at |

    [...] WikiViz is a Java program that renders graphical representations of graphs containing nodes and edges. In this case, the nodes are Wikipedia category pages and the edges are links between pages. The algorithm works by first placing each node, and then iteratively moving strongly linked nodes closer together and springing weakly linked nodes farther apart. Overlapping nodes are nudged away from each other by a different proccess. WikiViz can be used on other datasets such as related books in Amazon. Home Security Via Twitter and a Webcam [...]

  18. Softsaurus.org » Blog Archive » Get Twitter Notifications From a Motion-Detecting Webcam

    [...] command line work, but it’s spelled out and explained pretty thoroughly. Photo by MShades. Keep Tab On Home Security With A Webcam And Twitter [My Technophilic [...]

  19. PJ
    PJ at |

    How do you know if your computer is linux or not?

  20. USP
    USP at |

    If you combine the motion program with the following script http://lifehacker.com/software/hack-attack/automatically-upload-a-folders-photos-to-flickr-262311.php , it can also post pictures to a flickr account, so you can automatically see the cause of the twitter update.

  21. Twitter, ça sert aussi à choper les voleurs | Korben

    [...] avez envie de faire pareil ? Alors rien de plus simple, toutes les explications se trouvent ici… Moi j’aurais bien envie de l’améliorer son script [...]

  22. PJ
    PJ at |

    Yeah, I had a brain lapse for a minute. Sorry
    I know some things but I am still new to all of this.

  23. links for 2008-06-19 « Donghai Ma
    links for 2008-06-19 « Donghai Ma at |

    [...] Keep Tab On Home Security With A Webcam And Twitter | My Technophilic Musings (tags: security twitter webcam linux surveillance hacks diy electronics) [...]

  24. Mike
    Mike at |

    The problem in the twitter command (“Motion Detected”) isn’t the spaces, it has to do with the direct copy and paste of the command into Motion. When you copy and pase the command, delete the quotation marks that are in the command, and then manually type them back in with your keyboard.

  25. Keep Tab On Home Security With A Webcam And Twitter | Paul M. Done

    [...] room while you are away? Well, all you need is a webcam, a linux PC/laptop and a twitter account.read more | digg story Click Here – Tell the World These icons link to social bookmarking sites where [...]

  26. Linux: DIY Security System via Webcam and Twitter | Hackosis

    [...] Tech.shantanugoel.com writes about how to create a do-it-yourself security system using nothing more than a Linux PC, Webcam, and a Twitter account. [...]

  27. Raseel
    Raseel at |

    Awesome stuff !! I just configured motion at my house sitting in the office. I hope someone breaks in just so that I get to see this work ;-)

  28. dpayne
    dpayne at |

    Great tips! Hopefully this can be a cheap and easy way to improve home security.

  29. Digitalpedia » Blog Archive » Linux: DIY security system with webcam & Twitter

    [...] Goel has an interesting post on how to turn your Linux PC/Laptop into a surveillance system using a webcam and Twitter. No [...]

  30. Links for 08/07/2008 « 8-bits of Coffee

    [...] you want to keep taps on who sneaks in and borrows your lipstick while you’re gone, check out this site on how to set up your webcam to work as a security cam and take pictures and better yet sends them [...]

  31. Vik
    Vik at |

    Mersi boku. Good idea. I’ll become your regular visitor and RSS subscriber.

  32. Michael Long
    Michael Long at |

    We put together a Google Mashup with FBI crime data, Craigslist defense and safety classes and the Google map. Check out the application in action:

    http://www.homesecurity8.com/map/Washington/Seattle.html

    P.S. We would really like to know if their is other data that we can feed into this mashup or if anyone has any suggestions on how to improve it.

  33. Cloudy Thinking » Blog Archive » Linux Motion App + Twitter (or Identi.ca) = real-time remote home security monitorinf

    [...] Linux Motion App + Twitter (or Identi.ca) = real-time remote home security monitoring. [...]

  34. Daniel
    Daniel at |

    Great work and great tutorial ! Do you have any ideas, also, if you can get voice/sound using your script ?

  35. or
    or at |

    Can you explain a little more how to send the pictures through mail?

  36. Martin
    Martin at |

    Hi, everybody

  37. Jay
    Jay at |

    This has to be the best use for twitter I’ve seen yet.

  38. Los mundos perdidos de Twitter | El arca de la web

    [...] plantado alguna vez que con una webcam, Twitter y un software para Ubuntu se pueda montar un sistema de vigilancia para tu casa? Pues por descabellado que parezca, hay quien lo hace y además te explica cómo llevarlo a la [...]

  39. adel
    adel at |

    Hello i will be glad if you can take me step by step on how to set the security web cam up i am new to linux i just dont understand the procedure also i just cant use my webcam i am using toshiba satellite 300d i really need your help i have been using this laptop for some time now and i cant get my webcam to work also i am running ubuntume 8.10 i will be glad if you can take me through this u can send me the detail to my email as well

  40. A Different Twitter [WebApps]: Innovative Twitter Applications | at CreativeApplications.Net

    [...] Keep Tab On Home Security With A Webcam And Twitter Worried about someone breaking into your house in your absence? Or just need to keep a tab on who enters your room while you are away? Well, all you need is a webcam, a linux PC/laptop and a twitter account.  [...]

  41. Gustavo Roberto
    Gustavo Roberto at |

    Hello, Im from Brazil.

    Using Lynx :

    echo ’status=Motion Detected! Check Immediately’ | lynx –auth=USER:PASSWORD –dump -post_data http://twitter.com/statuses/update.xml

  42. kelly
    kelly at |

    Very useful resource! Thank you Shant – I’ve added your blog post to one of my newer blog entries.

    P.S. Would motion cameras work equally well?

  43. Richard
    Richard at |

    I like the idea but i cant get it to work with the perl script. Do I need to edit the perl script? Where do I paste the perl script command? After track_type?

  44. Richard
    Richard at |

    I’m really confused on the last step. I’m a total ubuntu 8.04 noob. Help me please! thanks.

  45. Home Security Guy
    Home Security Guy at |

    Thats really cool, I’m going to try that out, thanks for sharing that.

  46. Fenixnordic Group » Blog Archive » Twitter Fast Growing Beyond its Messaging Roots

    [...] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. [...]

  47. Twitter Fast Growing Beyond Its Messaging Roots | Rosemarie's Pearls

    [...] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. [...]

  48. Kelvin
    Kelvin at |

    I’ve just finished a similar project, this time with a bit of hardware connected to a burglar alarm:

    http://www.kelvinsthunderstorm.com/2009/02/twitter-burglar-alarm/

  49. Santa SEO » Twitter Innovations
    Santa SEO » Twitter Innovations at |

    [...] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. [...]

  50. Brack
    Brack at |

    Very nice twitter hack!

    http://www.brackhole.com

  51. Twitter Fast Growing Beyond Its Messaging Roots « Belmont Media Blog

    [...] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. [...]

  52. somed
    somed at |

    Here is a list of applications that do similar motion capture on PC, you should add your application there. http://www.ugolog.com/pages/25-applications-to-turn-your-webcam-into-home-security-system

  53. Twitter – not just for self indulgence and celeb stalking « Tangelos

    [...] need is your computer, a webcam and a twitter account to get real time tweets from your home. Click here for the simple set up.   Comments [...]

  54. caleb
    caleb at |

    set up a secondary twitter account just for this purpose, then follow it.

  55. David Slade’s engineering blog » Blog Archive » Twitter: Messaging service apps for home automation - Send a tweet to flip the switch by remote control

    [...] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. [...]

  56. kuraci
    kuraci at |

    Can Twitter really Be Saved?

  57. Monitore seu PC pelo Twitter « Zona livre - INFO Online

    [...] você pode baixar do Download INFO , o script em Perl criado pelo programador Shantanu Goel. O script identifica que o motion capturou uma imagem e envia uma mensagem personalizada para o [...]

  58. pinnacle
    pinnacle at |

    home security is an important issue to protect your home and its assets.The best home security can be as little as a simple alarm system or it can be as intricate as highly advanced infrared motion detectors. Regardless of housing cost, reliability is the most important aspect of the best home security system.

  59. ken
    ken at |

    Hi,
    Wonder if you can advise, have added ‘curl’ command ‘on motion detect’ in config file, but it seems to only work once. Files still get saved on subsequent motion detect but the curl command is not execute after the first motion detect.
    Your advice will be appreciated.
    Cheers,
    Ken

  60. Motion to the Rescue
    Motion to the Rescue at |

    [...] It also provides triggers for when motion is captured (for example, if you’d like to update Twitter you can do this with [...]

  61. David
    David at |

    I made a little Curl script to publish images to TwitPic too – it uses on_picture_save which is a little clumsy, since it uploads 100s of images to Twitter – oops!!! :)

    If someone can think of a way of posting one image from a series of a few in one motion event please let me know..

    #!/bin/bash
    IMG=$1
    USERNAME=
    PASSWORD=
    curl -F”username=$USERNAME” -F”password=$PASSWORD” -F”message=Motion Detected!” -Fmedia=@”$IMG” http://twitpic.com/api/uploadAndPost

    You then need to call this from on_picture_save with %f as the argument.

  62. Anthony
    Anthony at |

    I came across an article in The Times of India, Mumbai edition about “Keep Tab On Home Security With A Webcam And Twitter”. I want shantanugoel to show me a project that talks about being able to receive messages through internet and through mobile when an intruder walks into the house and I am at a distant place. I want something that is compatible with Windows XP. I am good in creating electronic hardware projects which involves soldering and fault finding jobs. However, I am not so well versed with software projects. Can Shantanu or anyone help me to acquire a security monitoring project, as explained above.

  63. Sweet Hacks - Vol II | GrokCode
    Sweet Hacks - Vol II | GrokCode at |

    [...] WikiViz is a Java program that renders graphical representations of graphs containing nodes and edges. In this case, the nodes are Wikipedia category pages and the edges are links between pages. The algorithm works by first placing each node, and then iteratively moving strongly linked nodes closer together and springing weakly linked nodes farther apart. Overlapping nodes are nudged away from each other by a different process. WikiViz can be used on other datasets such as related books in Amazon. Home Security Via Twitter and a Webcam [...]

  64. Alvinator
    Alvinator at |

    (Sorry I think there must be a character limit on these posts…)
    Heyy just wondering before I venture into this project, is it possible to be using multiple webcams? I have about 12 webcams (got them from china for a pretty sweet price)

    I’d like to be able to combine the images in somewhat of a matrix using the 12 snapshots so that when browsing through the pictures I can have it shown something like this:

  65. Alvinator
    Alvinator at |

    (Part 2)
    Okay maybe it just doesn’t like my ASCII matrix I made to illustrate;
    I want it to show camera images like this:

    1234
    5678
    9012 (last row 0 meaning 10, 11, 12)

    That way when you move through browsing the pictures you see all the cameras at one specific time stamp then you can move to the next photo and so on so that instead of looking though separate folders say “front door”, “back window” on the http server you just have to look at one folder of pictures.

    I’d also want to time stamp the script.

    And one last thing, just wondering if I’d be able to set it to automatically upload to an ftp server somewhere when it detects motion so that if the main computer gets stolen somehow I can just look at the ftp server images. (Just uploading the motion detected images so as not to kill my bandwidth)

    I’m pretty good with ubuntu just not so much the scripting side of it.

    Shantanu Goel this is an awesome post and if you’d like a challenge you should give my ideas a try :D

  66. Alvinator
    Alvinator at |

    Annnnnnd one last thought;

    Does this script you made compare the original image with future ones or does it compare each image to the next one. ’cause say if I had a leaning tower of pizza boxes (typical me) and it fell over, I don’t want to be receiving a twitter message every second (timestamps make for different messages) because pizza boxes fell over and it thinks theres an intruder. I’d like to have some way of remotely resetting its reference image so that once the pizza boxes have fallen I can tell it “heyy capture this images with the fallen boxes and stop looking at the original where the boxes are still on the table”

    Do you sorta get what I mean?

  67. Alvinator
    Alvinator at |

    Alrighty, cool thanks :D

  68. Joe
    Joe at |

    Check out Webcam Zone Trigger.
    http://www.zonetrigger.com
    With this software you can setup hot spots to detect motion, each hot spot can perform a different task when it detects motion. So you can had it run a command line with different parameters (or run a different .bat file).

  69. jodumont
    jodumont at |

    wget -O – –user=USERNAME –password=PASSWORD –post-data=”status=Motion” https://twitter.com/statuses/update.xml
    –2011-04-22 09:43:59– https://twitter.com/statuses/update.xml

    Resolving twitter.com… 199.59.148.82, 199.59.148.10, 199.59.148.83
    Connecting to twitter.com|199.59.148.82|:443… connected.
    HTTP request sent, awaiting response… 401 Unauthorized
    Unknown authentication scheme.
    Authorization failed.

    why ?

  70. Home security with Twitter and a webcam « Tybee Guy

    [...] Keep Tab On Home Security With A Webcam And Twitter Motion [...]

  71. Get Twitter Notifications From a Motion-Detecting Webcam | Lifehacker Australia

    [...] command line work, but it’s spelled out and explained pretty thoroughly. Photo by MShades. Keep Tab On Home Security With A Webcam And Twitter [My Technophilic [...]

  72. Twitter Fast Growing Beyond Its Messaging Roots | Business | Wired

    […] Linux hacker Shantanu Goel set up a video camera and some motion-sensing software on a PC connected to the internet. If anyone breaks into his house or goes snooping through his room, the software detects the movement and sends out a tweet. […]

Comments are closed.