Using Google Calendar For Machines To Keep Track Of Human Days

Daily triggers for automation are simple in theory, unless it needs to keep track of the calendar that humans actually live by. Seasonal changes, shifting public holidays, or just being on vacation are all exceptions you may need to account for. [Jeremy Rode] likes using Google Calendar to stay on top of events, so he created CalendarScraper, a simple script to make his machines use it too.

Jeremy needed a timer for his spa heater that would reduce costs by only switching it on when his local time-of-use-based electricity rates were favorable. The rates varied based on the time of day, day of the week, and even seasons and public holidays. Instead of trying to set up everything manually in a cron job, he created a short and easy-to-modify JavaScript script to keep track of events on a Google Calendar.

We’ve seen some other projects that pull data from Google Calendar, including a recycling day reminder, and even a physical desktop calendar.

10 thoughts on “Using Google Calendar For Machines To Keep Track Of Human Days

  1. I despise making myself vulnerable by too much internetting.
    These days state-sized adversaries can erase pipelines, so why will they spare glassfibre cables? Or cellphone stations?

    For such purposes I use remind (https://dianne.skoll.ca/projects/remind/) – ancient old linux software, only one apt-get install away, and it runs locally. the mostly catholic variable holidays over here can be easily modelled with it.

    yes, boooooring. Booh!
    But it works, as long as there is electricity.
    BTW, there are tools to convert from and to ICS.

    Recycling day calender is not needed any more, because with home office the shopping more local and cooking is different, almost no waste any more.

    1. Local independent timers are great… as long as you never need to change the timings. If the timings change dynamically on a week-to-week or even day-to-day basis, re-syncing a bunch of independent timers is a pointless pain in the arse.
      If you’re really worried about fibre-cuts, add diversification to your network links (not just Starlink or GSM or another link to the internet, but alternative networks like setting up a local community mesh too) rather than self-flagellating with manual performance of a trivially automatable task.

      1. Caching locally the calendar, is an even cheaper solution that is more than enough for most cases. Internet dropouts are usually no longer than a few hours, and in a doomsday scenario, a non functioning timer is the least of concerns.

      2. I’m the author of Remind. It’s far more flexible than anything you can do with Google Calendar.

        For example, my trash collection day is on a Wednesday… unless it’s a holiday, or the preceding Monday or Tuesday is a holiday. Then it gets moved to Thursday. I have that programmed into Remind and never have to update it.

        Good luck doing that with Google Calendar.

    2. So you’re concerned about a nation state taking down your internet and how it will affect your spa heater? Unless you’re living off the grid, you’re going to have much bigger problems if that happens.

  2. I have Google calendar linked to my home automation with things such as bin collection days, post delivery days, and perform tasks based on events in the calendar, such as night lights, and guest room heating if guests are staying in the house. I add when guests are expected to stay weeks ahead of when they come, so I don’t need to remember to perform those actions myself.

    1. Yeah. I agree we really should avoid feeding Google/Facebook/Apple/Microsoft/whatever with our data without even thinking about. I use Google search sometimes (still the best for finding obscure datasheets and stuff) but i wouldn’t register at them, log in every time and put a lot of my personal life on their servers. (Yes i know Youtube is from Google, but i don’t have a login there either and i often clear my cookies.)

  3. It would seem unnecessary to actually scrape the calendar.google.com website when all calendars provide an ics link. I don’t know much about ics format, but it’s got to be easier to process than parsing a web page that Google can restructure at any time.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.