Thursday, May 12, 2016

adding webcam string to ipfire

This is useful as it contains examples useful in bringing up a webcam server, as well as uploading info to dropbox.

Also demonstrates adding to pakfire (ipfire module)

Things to remember
  • Ipfire default web interface is on http port 81 or https port 444
  • Add .1 to version in /opt/pakfire/etc/pakfire.conf and do pakfire update --force so you can install addons from testing branch
  • Use pakfire to install motion
  • Motion by default streams on port 2500, but you can set this in /etc/motion.conf
  • Needed to add a video user and video group
  • The boot file /etc/init.d/motion needs some adjustments to allow starting motion at boot time
  • Set firewall rule correct to forward the port: From any to firewall red for tcp on port 2500 for webcam
Posts that helped me on the way
Adjustments to motion configuration
mkdir -p /var/motion/cam1
chown -R video: /var/motion/cam1
mkdir -p /var/run/motion/
chown video:video /var/run/motion/
chmod 755 /var/run/motion/
loadproc sudo -u video /usr/bin/motion
Move snapshots to dropbox
on_picture_save /etc/init.d/dropbox/ %f %Y%m%d %H%M%S
/etc/init.d/dropbox/ upload $1 cam1/$2/$2-$3-snapshot.jpg && rm -f $1
Sync dropbox to main website on ipfire
rm -rf /srv/web/localhost/html/
/etc/init.d/dropbox/ download html/ /src/web/localhost/
find /srv/web/localhost/html -type f -exec chmod 644 {} \;
find /srv/web/localhost/html -type d -exec chmod 755 {} \;

No comments:

Post a Comment