Here is the build and the steps we took to get this project up and running.

Materials:

Steps:

  1. Download Raspbian Jessie Lite
  2. Image the SD card and insert into your Raspberry Pi 3
  3. Update your Raspberry Pi 3
 - sudo apt-get update -y
 - sudo apt-get upgrade –y
 - sudo apt-get install rpi-update
 - sudo reboot
  1. Enable SSH on the PI
In a terminal window : sudo raspi-config
 Select Interfacing Options
 Navigate to and select SSH
 Choose Yes
 Select Ok
 Choose Finish
  1. Get your Pi online, either via WiFi or Ethernet

-- For Wifi: -- sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

network={
ssid="YOUR_NETWORK_NAME"
  		psk="YOUR_NETWORK_PASSWORD"
key_mgmt=WPA-PSK
}

  1. Prepare the PiDrive Volume
  sudo fdisk /dev/sda (in my case, the WD PiDrive is /dev/sda)
  sudo mkfs.ext4 /dev/sda1 -L "data"
  sudo mkdir /mnt/data (mount the partition)
  sudo mount -t ext4 -o "noatime" /dev/sda1 /mnt/data
  sudo chown -R 1000:1000 /mnt/data
  sudo chmod -R 775 /mnt/data
  1. Auto mount the drive after every reboot
  sudo mkdir /mnt/data (if not already present)
  sudo nano /etc/fstab

Add this entry in this file

LABEL=Data /mnt/data ext4 defaults,noatime,nofail 0 2

Save

<ctrl-x>, <y>, <enter>
  1. Reboot

  2. Make sure everything works and that you can see the data drive mount

  1. df -h
  1. Follow steps 1-6 from Build a Timelapse Rig with your Raspberry Pi

  2. Test the your camera is working

  3. raspistill -o cam.jpg

  4. If the output from raspistill gave you an error,

Check Step 1 in Alex's guide Enable RPi camera

Check that the cables the silver connectors are facing the HDMI port and the blue part faces the USB

  1. Start Docker
docker run --restart=always --privileged -e TZ=&quot;US/Central&quot; -v `pwd`/phototimer/config.py:/root/images/config.py -v /mnt/data:/var/image --name cam -d alexellis2/phototimer
  1. One of the things we noticed was by default the container runs By adding the -e TZ="US/Central" parameter, we can change the timezone in the container to be what we want. *** Alex has updated his notes to fix this ***

  2. Install ngrok. This will allow us to SSH into the box from anywhere, even if from behind a firewall.

  3. Create an account on Ngrok https://dashboard.ngrok.com/user/login

  4. sudo wget https://dl.ngrok.com/ngrok\_2.0.19\_linux\_arm.zip

  5. unzip ngrok_2.0.19_linux_arm.zip

  6. ./ngrok "yourauthtoken" (from the online portal)

  7. ./ngrok tcp 221

  8. Have ngrok load on reboot

  9. Sudo nano /home/pi/start.sh

  10. Add this to this new file: /usr/local/bin/ngrok tcp 22

  11. Crontab -e

  12. Add to the bottom: @reboot /home/pi/start.sh