Last active
November 3, 2016 12:24
-
-
Save LarsBergqvist/10e9aff180e091fee5f28989f2d3efd1 to your computer and use it in GitHub Desktop.
crontab file for automatically turning remote controlled outlets on/off
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn on outdoor lights in the afternoon | |
00 17 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"on"}' http://localhost:5000/Outlets/api/outlets/2/1 | |
# Turn off outdoor lights in the morning | |
00 08 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"off"}' http://localhost:5000/Outlets/api/outlets/2/1 | |
# Turn on downstairs window lights in the afternoon | |
30 19 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"on"}' http://localhost:5000/Outlets/api/outlets/1/2 | |
# Turn on upstairs window lights in the evening | |
30 18 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"on"}' http://localhost:5000/Outlets/api/outlets/1/1 | |
# Turn off all indoor lights at night | |
# windows upstairs | |
00 22 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"off"}' http://localhost:5000/Outlets/api/outlets/1/1 | |
# windows downstairs | |
00 22 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"off"}' http://localhost:5000/Outlets/api/outlets/1/2 | |
# Wall downstairs | |
00 22 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"off"}' http://localhost:5000/Outlets/api/outlets/1/3 | |
# Floor upstairs | |
00 22 * * * curl -i -H "Content-Type: application/json" -X PUT -d '{"state":"off"}' http://localhost:5000/Outlets/api/outlets/1/4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment