Webcam Video Surveillance via Motion Debian Arm

If you own a webcam from this list than you can attach it to the AsusWRT routers usb port and capture images from it when motion is detected, like babyroom, garage, courtyard...

It's only for arm devices like RT-AC56U, RT-AC68U, RT-AC87U...

1- Install Debian from here
2- Download videomod script

wget -c -O /opt/etc/videomod.sh http://goo.gl/1RW00w
chmod a+rx /opt/etc/videomod.sh

2b - Download and load UVC Modules

wget -c -O /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz http://goo.gl/UkS8Xy
cd /
tar -zxf /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz
/opt/etc/videomod.sh load

3 - Enter Debian

debian enter

4 - Update Debian

apt-get update
apt-get upgrade

5 - Install motion

apt-get install motion

6 - Enable start

sed -i 's/start_motion_daemon=no/start_motion_daemon=yes/g' "/etc/default/motion"

7 - Fix start

sed -i 's/--chuid motion/--chuid root/g' "/etc/init.d/motion"

8 - Change download directory

sed -i 's/target_dir \/var\/lib\/motion/target_dir \/mnt\/motion/g' "/etc/motion/motion.conf"

9 -Exit debian

exit

10 - Rename original script and add it to chrooted services list

mv /opt/debian/etc/init.d/motion /opt/debian/etc/init.d/S90motion-debian
echo "" >>/opt/etc/chroot-services.list
echo "S90motion-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

11 - Create script to load UVC Modules and motion at startup

nano /jffs/scripts/post-mount

Add this lines

#!/bin/sh
sleep 5
/opt/etc/videomod.sh load
sleep 10
/opt/etc/init.d/S99debian start

Save with CTRL-O / Enter / and exit with CTRL-X

chmod a+rx /jffs/scripts/post-mount

12 - Start motion

debian restart

13 - Perform a movement in the front of your webcam.

14 - Go to media folder you setup in S99debian script here at point 4 and you'll find pictures captured by webcam and some .swf files witch can be oppened with your internet browser.

 

Tested successfully with Logitech C270 webcam
c270

 

  • Incognito Psytrancer

    Thank you very much, the modules work well on the new firmware Merlin!

  • khan

    How can I get the sound record from my c270 camera?

    • I'm not shore if is possible, maybe with alsa-lib

  • Incognito Psytrancer

    Hello! With the new firmware from Merlin RT-AC68U_3.0.0.4_378.50_beta1 modules of this manual (input-core.ko, v4l1-compat.ko, videodev.ko, v4l2-int-device.ko, v4l2-common.ko, uvcvideo .ko) do not work! Maybe tell how to compile these modules for the new firmware or lay ready? Thanks You!

SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Nginx Web Server with PHP Support through Optware-NG
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm
NetData System Monitor Entware

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...