201407 MGVCpi

From Seamonster
Jump to: navigation, search

MGVC pi at Dave Klein’s with a new SD. ssh is on, port forwarding is on.. this works. ok, I’m in. ssh -p 2223 pi@

now fix up seamonster wiki to find SD card notes..

setup thepi VPN via http://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing#awesm=~oBvYD8BOiTdCQN

Had to flash a new SD card -- Dave Klein did this with 2014-06-20-wheezy raspbian

apt-get motion screen tcsh openvpn
pi@mgvcpi ~ $ wget
pi@mgvcpi ~ $ scp oneshotimage.jpg.1 seamonster@seamonsterak.com:oneshotimage.jpg 
seamonsterak:~> ncftpput -u USER -p PASS webcam.wunderground.com . oneshotimage.jpg
seamonsterak:~> mv oneshotimage.jpg seamonsterak.com/WebCams/MGVC/lastsnap.jpg
pi@mgvcpi ~ $ crontab -l
* * * * * /home/pi/bin/grab_move_web.sh 
pi@mgvcpi ~ $ cat /home/pi/bin/grab_move_web.sh
pi@raspberrypi:~$ cat /home/pi/bin/grab_move_web.sh 
wget -O /home/pi/lastsnap.jpg
# scp /home/pi/lastsnap.jpg seamonster@seamonsterak.com:seamonsterak.com/WebCams/MGVC/
scp /home/pi/lastsnap.jpg seamonster@seamonsterak.com:seamonsterak.com/WebCams/MGVC/2014/`date +%Y%m%d%H%M`MGVC.jpg
seamonsterak:~> crontab -l
*/2 * * * * cd ~/seamonsterak.com/WebCams/MGVC/2014 && convert -pointsize 20 -fill red -draw "text 270,460 '`ls -t 2* | head -2 | tail -1`'" `ls -t 2* | head -2 | tail -1` ../lastsnap.jpg; ncftpput -u USER -p PASS webcam.wunderground.com . /home/seamonster/seamonsterak.com/WebCams/MGVC/lastsnap.jpg >& /dev/null

Outstanding issues:

  • YYYY/MM directories on seamonsterak.com (and in crontab on mgvcpi)
  • openvpn isn't assigning a static IP to mgvcpi. This isn't a problem at the moment but as the VPN builds back out...
  • hmmm...