#
# Kindle AutoX Screen Saver:
#
# show.sh invokes showtime.sh to display the time.
*/5 * * * * INSTALLROOT/screensaver/showimage.sh
0-4,6-9,11-14,16-19,21-24,26-29,31-34,36-39,41-44,46-49,51-54,56-59 * * * * INSTALLROOT/screensaver/showtime.sh
#
# Grandfather Clock:
#
# Only play sounds from 05:00 through 23:59.
#
15 5-23 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/one_quarter.wav > /dev/null 2>&1
30 5-23 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/one_half.wav > /dev/null 2>&1
45 5-23 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/three_quarter.wav > /dev/null 2>&1
0 13 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/01.wav > /dev/null 2>&1
0 14 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/02.wav > /dev/null 2>&1
0 15 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/03.wav > /dev/null 2>&1
0 16 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/04.wav > /dev/null 2>&1
0 5,17 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/05.wav > /dev/null 2>&1
0 6,18 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/06.wav > /dev/null 2>&1
0 7,19 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT//grandfatherclock/07.wav > /dev/null 2>&1
0 8,20 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/08.wav > /dev/null 2>&1
0 9,21 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/09.wav > /dev/null 2>&1
0 10,22 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/10.wav > /dev/null 2>&1
0 11,23 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/11.wav > /dev/null 2>&1
0 12 * * * INSTALLROOT/bin/playmediawhenpluggedinandinscreensavermode.sh INSTALLROOT/sounds/grandfatherclock/12.wav > /dev/null 2>&1
#
# Home Automation:
#
# Morning:
#
0 5 * * * /bin/bash -c 'INSTALLROOT/homeauto/AtSunriseOff.sh'
#
# Sunset:
#
30 15 * * * /bin/bash -c 'INSTALLROOT/homeauto/AtSunsetOn.sh'
30 15 * * * /bin/bash -c 'INSTALLROOT/homeauto/AtSunsetOnWithSecurity.sh'
#
# Nighttime:
#
# The following are turned on at Sunset or at Sunset with security.
#
0 22 * * * INSTALLROOT/homeauto/MasterWindowLight.sh off
0 22 * * * INSTALLROOT/homeauto/MasterBedsideLight.sh off
0 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/ChristmasTree.sh off'
0 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/LivingRoomLight1.sh off'
30 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/DiningRoomLight.sh off'
30 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/FrontHouseLights.sh off'
#
# Additional Dining Room Light Times
0 23 * * * /bin/bash -c 'sleep $((((${RANDOM} % 20) + 1) * 60)) && INSTALLROOT/homeauto/DiningRoomLight.sh on'
30 23 * * * /bin/bash -c 'sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/DiningRoomLight.sh off'
#
# Living Room Light 2
0 18 * * * /bin/bash -c 'sleep $((((${RANDOM} % 45) + 1) * 60)) && INSTALLROOT/homeauto/LivingRoomLight2.sh on'
0 19 * * * /bin/bash -c 'sleep $((((${RANDOM} % 20) + 1) * 60)) && INSTALLROOT/homeauto/LivingRoomLight2.sh off'
0 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 29) + 1) * 60)) && INSTALLROOT/homeauto/LivingRoomLight2.sh on'
30 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/LivingRoomLight2.sh off'
#
# Music Room Light:
0 19 * * * /bin/bash -c '/bin/sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/MusicRoomLight.sh on'
30 19 * * * /bin/bash -c '/bin/sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/MusicRoomLight.sh off'
15 21 * * * /bin/bash -c '/bin/sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/MusicRoomLight.sh on'
45 21 * * * /bin/bash -c '/bin/sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/MusicRoomLight.sh off'
#
# Office Light:
0 18 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/OfficeLight.sh on'
45 18 * * * /bin/bash -c 'sleep $((((${RANDOM} % 15) + 1) * 60)) && INSTALLROOT/homeauto/OfficeLight.sh off'
0 20 * * * /bin/bash -c 'sleep $((((${RANDOM} % 20) + 1) * 60)) && INSTALLROOT/homeauto/OfficeLight.sh on'
0 21 * * * /bin/bash -c 'sleep $((((${RANDOM} % 45) + 1) * 60)) && INSTALLROOT/homeauto/OfficeLight.sh off'
#
# Small bedroom light:
#
0 21 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/SmallBedroomLight.sh off'
0 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/SmallBedroomLight.sh on'
30 22 * * * /bin/bash -c 'sleep $((((${RANDOM} % 30) + 1) * 60)) && INSTALLROOT/homeauto/SmallBedroomLight.sh off'
#
