New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Pi to be set to start capture on boot (e.g. 100% headless/network-free) #8

geerlingguy opened this Issue May 7, 2017 · 5 comments


None yet
3 participants

geerlingguy commented May 7, 2017

I'd like to be able to set up my rig to start taking pictures immediately after it gets power; this way I could take it anywhere, set it up, then let it go (without having to have a WiFi network or some other means to log in and run the appropriate commands.

See immauss' comment on my Pi Timelapse blog post for a nice and simple implementation. Something like that seems like it would work great.


This comment has been minimized.

nabontra commented May 11, 2017

Thank you for this, I am also planning a similar feature in a current build where I will be hiking and have no network control. I plan to put some simple switches to start/stop the timelapse and will update you.


This comment has been minimized.

nbarry101 commented Aug 19, 2017

The way I've quickly done this is to install screen

sudo apt get install screen

and then invoke the script from in a 'screen'

screen -S timelapse -d -m /usr/bin/python /home/pi/pi-timelapse/

To run in crontab every 5 minutes, this would work:

*/5 * * * * screen -S timelapse -d -m /usr/bin/python /home/pi/pi-timelapse/

To run at boot, add this to the crontab

@reboot screen -S timelapse -d -m /usr/bin/python /home/pi/pi-timelapse/

To connect to the screen, simply execute

screen -r

I did also update the script so that it does not reference the current working directory, but rather the directory the script is located in, as this was required for crontab.
Would you like me to create a PR for this change?


This comment has been minimized.


geerlingguy commented Aug 21, 2017

@nbarry101 - Just saw the PRs, they look great (just a couple changes requested in the latest one)! Thanks for the contribution here... I'm actually going to use this tonight so my rig will start taking pictures early in the morning tomorrow for an eclipse timelapse!

geerlingguy added a commit that referenced this issue Aug 21, 2017

Merge pull request #11 from geerlingguy/8-systemd-timelapse-service
Fixes #8: systemd 'timelapse' service for boot timelapses and easier control

This comment has been minimized.


geerlingguy commented Aug 21, 2017

I decided to use Systemd, since it's present on the latest version of Raspbian, and since a unit file gives a lot of flexibility when it comes to starting/stopping/logging/system boot enabling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment