no images were found
This is a script I created as a proof-of-concept to illustrate how simple technologies- ones that are available now, to anyone with a browser- can be used by people to control the space they inhabit. All you need is time to think creatively about what the technology around is capable of doing beyond what it’s doing now.
The script allows you to use Google Calendar as a frontend for cron-like scheduling on your Unix/Linux system. If that system is acting as a home server, you’ve suddenly gained an incredibly powerful administration tool that anyone can use to control and automate their environment. On this page, I talk about the technical aspects of the project, but in this post I talk more about the cool implications when looking at the bigger picture of design and interactive architecture.
How It Works
All you have to do is create a dedicated calendar in your Google Calendar and then create events as you see fit. When you create the events, include any commands you want executed at the time of the event in the event description. The script will check in every little while (half an hour default), and if there are events scheduled, will execute the associated commands.
You can have events execute at the end of an events as well, So, you could have an “Lights On” event where the coloured block actually shows when the light is on, rather than needing two events (one to turn lights on, and the other to turn them off). Much better than a list of cron jobs.
Detailed instructions may be found in README in the tar file, but here is a super-simplified guide for installation under Ubuntu/Debian.
- Download the compressed files to your home directory.
- Open a terminal session and unpack the files with tar -xvf gcalcron-0.1.tar.gz followed by cd gcalcron-0.1Start the installation script with sudo ./setup.sh install
- Enter your Google account name, password and calendar ID when prompted. (The calendar ID is the ID of the calendar that will be checked for commands to run. You can find the ID of the calendar you want to use by looking at the “Calendar Address” field on the its setting page. The calendar settings pages can be found by clicking on “Settings”, selecting the “Calendars” tab.)
- The script will then install and set up everything for you. Once installed, you can run commands on your computer using GCal by simply creating an event in your automation calendar and listing any commands to be executed in the “Details” section of the event. If you want to have commands executed at the end of the event, list those commands after a “—“, as shown below.
For a more detailed explanation, instructions for other distros, instructions on how to set up a calendar specifically for automation and instructions for removal, see the README.
First off, it’s been a while since I’ve programmed and I taught myself some python just to make this thing. As such, I have made it available under the GPL 3.0 licence (more in the gzip), and I invite better people to adopt it and take it to the next level- more robust, more secure, tighter, all packaged up with better much installer. Please just credit me for the idea, and if you could include a link back to this page or the post page somewhere in the docs, I’d appreciate it.
Secondly, keep in mind that there is a security risk in exposing your computer to the net in this manner. With this script running, your computer will only be as safe as your Google account- anyone who get access to that will also be able to execute commands on your machine. The chances of someone hacking your account, noticing what you’re doing and deciding to be malicious about are probably pretty slim, but they’re there. You’ve been warned.
Finally, please note that I take no responsibility for anything that might happen as a result of running this script. You’re running this script as-is and I take no responsibility for any bad things that might happen. I’ve done my best with it and I’d like to be able to give you a better guarantee than that, but sadly I can’t.
Download the script here.