Monitor Google Calendar Events

tmbrown97

Senior Member
My wife works nights - only about 10 days/month though, and they're pretty random. It just so happened that she's working this weekend, and for some reason, today lots of people were bothering us - phones ringing, two different people came to the door (I have a big No Soliciting sign that gets rid of most; both of these were service people I have business with checking in). When the wife gets woken up, it's hard for her to fall asleep again, and that makes for a very unpleasant wife.

So - The simple solution I think - is to program a "Quiet Mode" into the M1. I actually kinda have one already, but want to expand it to do the following:
  • Turn off non-alarm voices
  • disable keypad beeps
  • change the sound of the doorbell to a shorter/lower volume one
  • disconnect the elk-124's link to the speaker in the MBR and the hallway
  • potentially kill the ringers on the phone (not sure; would need to be tied to something I can override remotely if I need to reach wife in an emergency; and if I defeat the ringer on the phone, the answering machine won't pick up either).

So - I have an idea how to do a lot of that; I'll come back as needed... here's the big one though - I'd like this automated. She updates a family calendar with her work days on Google Calendar - I'd like to figure out how to monitor this so I can use it. If she worked the night, be in quiet mode for the next 5 hours. If she works tonight, go into Quiet mode 5 hours before her shift. Effectively, if she's in between 2 shifts, that should silence the whole day.

So - any ideas how to monitor a google calendar completely automatically for a specific event, and get it into something usable? I'm also using J9AE as my automation platform (in its infancy, admittedly). MustangCoupe offered the suggestion of monitoring for the email alerts - but I'm curious about any other ideas?

Thx all! If I swing this one, the wife will really love HA for a while.

The only thing left would be a flag for when the baby is asleep; Not sure how yet - we always keep the door closed and the lights off whether she's in there or not; but I'll tackle that one next.
 
Can't help with the google calandar but I can help with the phone ringer thing.

I hate the phone ringing during dinner so from 5:30 to 6:30 every night I disable the ringers with one of these ringer cut off things:

http://www.sandman.com/wizard.html#RingerCut-off

I have this thing hooked up to a relay and it works like a champ. Never had an issue. You can call out when the ringer is off. I have caller ID on my system so if it sees that one of our cell phones is calling home the ringer is enabled. This is one of the neat things in our home automation system that you don't really notice but is really nice.
 
Google offers several ways to access its services (Calendar, Gmail, Picasa, Youtube) programmatically. Here's the Data API Developer's Guide for Google Calendar ... it lists client libraries for major programming languages. It includes a .NET library which would be a good fit for J9AE. They also have an example showing how to use cURL to get data.

Don't thank me yet because you've asked how to build a house and I've given you a floor plan ... there's a lot of additional elbow grease required!
Unless you're a software developer, wading through Google's documentation and learning all of the programming concepts will not be fast or fun.

FYI
In my opinion, all HA apps need 'personal calendar' functionality ... either native or via an interface to an external application (Outlook, Google, etc). I believe Homeseer has a plugin for Outlook. There's a post in the Homeseer forum about the same topic and it contains some code that might help you get started. You also might want to investigate using iCal to acquire calendar information. According to the posts, the chief deficiency in Google Calendar, for HA purposes, is the inability to assign a category to an event ... the suggested workaround is to markup the event with a category (i.e. write something in the body of the event).

FWIW
The "Newscaster" item in my forum signature (see below) is a calendar application I created for my HA software. It lets me create categorized events (Task, Holiday, Appointment, Birthday, Anniversary, Weather, General, etc) that can be used to influence how things work (i.e. don't do something because today is a holiday). Currently, Newscaster creates a daily "Newscast" that is spoken every morning. It sounds something like: "Good morning! There are two bulletins this morning. There is one Birthday bulletin. Reminder, in two days. Uncle Steve's eighty-eighth birthday. There is one Weather bulletin. It is currently Cloudy and -7 degrees. Wind is from the southwest at 20km/h etc etc". The daily bulletins are also visible in a browser and can be spoken on demand.
 

Attachments

  • NewCaster_NewsEvent.png
    NewCaster_NewsEvent.png
    19.1 KB · Views: 42
i wrote an xPL app that monitors gcal for very similar reasons http://bit.ly/dghGNY and at one point i had an xPL plugin working for j9ae, but haven't had time or interest to maintain it.
 
Back
Top