Skip to content

How to Schedule Motion, Timelapse or VideoRepeat

Claude Pageau edited this page Oct 15, 2020 · 23 revisions

Delay startup to a specified date and/or time for motion, timelapse or video repeat

Description

pi-timolo.py release 10.x now has a schedule start feature that delays starting of a Motion Track, Timelapse or Video Repeat sequence. This allows customizing the start date and or time for a particular camera operations. Once the sequence is started (start date/time passed) then pi-timolo.py will continue normally. If a specific START_AT variable has a date that is in the past then the current date will be substituted and the scheduled time will determine the start operation. If it is also past then particular camera operation will start immediately.

IMPORTANT The Scheduled Start feature is initialize only on a fresh start of pi-timolo.py If the Date and Time are passed pi-timolo.py will start normally depending on the settings. If the date is past but the time is still in the future then today's date, with the future time will be used..

How to Upgrade

The default is for pi-timolo-install.sh to not overwrite configuration files. If you have upgraded you will have to save your original config.py
IMPORTANT: pi-timolo.py ver 10.x Adds a Sched Start Feature and Requires latest config.py per commands below

cd ~/pi-timolo
cp config.py config.py.bak
cp config.py.new config.py
nano config.py    

Use nano to Restore Custom Settings from config.py.bak then ctrl-x y to Save and Exit"

How to Implement

To implement edit config.py and Add a valid date and/or time to one of the StartAt variables per examples below

cd ~/pi-timolo
nano config.py

Use nano editor to customize one or more of the startAt variable settings for motion, timelapse or video repeat.
Note If variable VIDEO_REPEAT_ON = True then it Will override Motion Track and Timelapse modes.
Also The date and time entries are parsed to most valid date formats. All unambiguous formats should work OK. For clarity I use 24 hour clock settings.

Valid Examples

MOTION_START_AT = "13-jan-2018 08:00:00"  # starts on specified day and time.  if day past then day reset to today

MOTION_START_AT = "12-January-2018"    # starts at 00:00:00 on specified day

TIMELAPSE_START_AT = "06:21:00"     # If time is not past starts at specified time when pi-timolo.py is started.

Error Handling Examples of How Invalid entries are handled

VIDEO_START_AT = "13-xxx-2018 20:00"  # Invalid day. Today date used with valid time entry.

TIMELAPSE_START_AT = "12-xxx-2018"  # Invalid day.  Today date and current time will be used.

MOTION_START_AT = "13-xxx-2018 99:21"  # Invalid day and time. Error message displayed and datetime(now) used
Clone this wiki locally