A simple way to turn your old laptop into a security monitoring device


In this post we consider how to turn your old laptop into a security monitoring device. In the example below an old Asus EEE PC (1st generation) is used.

lap

 

 

This laptop does not have an internal web camera, therefore an external usb webcam will be used.

cam

 

The final assembly is shown below.

lapcam

 

Step 1. First of all you need to install a linux OS. Ubuntu server is recommended, but any linux distro that works on your old laptop will be fine. See [1-3] for more details

 

Step 2. Install fswebcam. To do this on ubuntu OS run this command in the linux terminal:

sudo apt install fswebcam.

 

Step 3 Create a file webcam.sh and enter the following text into this file:

 

while true; do

fswebcam -r 1280x720 image.jpg

dt=$(date +%F)

tm=$(date +%T)

path="data/"$dt"_"$tm".jpg"

mv image.jpg $path

sleep 4

done

 

 

Save it.

 

Step 4. Run the script in bash.

s

 

Now your laptop takes pictures every 4 seconds and save them to the “data” directory. If you want a real time monitoring you should synchronize this directory with a directory on a remote device and see pictures with any image viewer. You can use rsync, scp, unison, lsyncd, etc. See [4-10].

 

To stop it use ctrl+c.

e

 

In the next post we consider a simple way to introduce cashbacks/rebates into friendly arbitrage.

 

 

References

 

[1] How to switch an old Windows laptop to Linux

https://www.theverge.com/21550815/windows-microsoft-linux-mint-laptop-how-to-switch

 

[2] How to install Ubuntu Server 16.04 LTS on an old computer

https://mk-dir.com/blogs/how-to-install-ubuntu-server-1604-lts-on-an-old-computer

 

[3] How To Turn Your Old PC Into A Linux (Ubuntu) Server

https://top5hosting.co.uk/blog/uk-hosting/356-how-to-turn-your-old-pc-into-a-linux-ubuntu-server

 

synchronization

 

[4] How To Use Rsync to Sync Local and Remote Directories

https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories

 

[5] How To Synchronize Local And Remote Directories In Linux

https://ostechnix.com/synchronize-local-remote-directories-linux/

 

[6] Remote File Synchronization in Linux

https://www.baeldung.com/linux/remote-file-synchronization

 

[7] How to use Unison to sync files on Linux machines across a network

https://www.techrepublic.com/article/how-to-use-unison-to-sync-files-on-linux-machines-across-a-network/

 

 

[8] Syncing Files Between a Local Computer and ExaVault

https://www.exavault.com/docs/ftp-clients-sync-files-folders

 

[9] Syncing with Gdrive

https://www.goodsync.com/file-sync

 

[10] HOW TO UPLOAD AND SYNCHRONIZE FILES WITH SCP / RSYNC?

https://creodias.eu/-/how-to-upload-and-synchronize-files-with-scp-rsync-

How do you rate this article?

42


I_g_o_r
I_g_o_r

I am curious about science, technologies and their applications to solving real problems.


Simple solutions to complex problems
Simple solutions to complex problems

Each post is devoted to a simple solution to a complex problem.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.