GCal Integration

Goal: I travel a lot and need to automate my flag pole to lower my flag to half staff and raise it back up automatically based on Google Calendar events, i.e. schedule "Flag Half Staff" and schedule "Flag Back Up" on specific dates/times.
----------------
Currently I have a physical device called "Flagpole" which is a Generic Z-Wave Garage Door Opener. When the flag is at the top, the device condition is "closed", as if it were a garage door. So normal condition is "closed". I have that device appearing on a Hubitat dashboard button. When I push the button, it asks me if I am sure, and when I press "yes", the mechanism lowers the flag and the condition changes to "open", i.e. the garage door is open. Similarly, when I push the same button again to raise the flag, it asks me if I am sure, and when I press the button to raise it back up it again asks me if I am sure, and when I press "yes" it raises the flag back up. It works very well.
--------------
To automate this, I found and I believe successfully installed the relatively new Hubitat Gcal Search app. I then used the app to create two virtual switches:
Flag Half Staff switch for a Google Calendar search result of =Flag Half Staff
Flag Back Up switch for a Google calendar search result of =Flag Back Up
The app creates these and they are called GCal switches. They can be defaulted either on or off and I have them both set for "off". When the Google calendar sees an event called "Flag Half Staff", the switch changes states from off to on. This virtual switch closure is not momentary.
------------
So I would appreciate anyone's assistance in guiding me how to get the GCal switch closure connected to activating the Flagpole device and then resetting the Flag Half Staff or Flag Back Up switch states. Thanks in advance.

The Rule Machine built-in app can do this easily.

(If you managed to install & setup the Gcal app successfully, then you should have no trouble with Rule Machine :smiley: )

You would set up the Gcal switch change as the trigger event, and then changing the Flagpole device as the action.
I don't think you need to adjust the Gcal switch value - they should revert to the default state once the calendar event ends.

1 Like

I thought I had GCal installed and set up correctly but I set up a couple test events on my Google Calendar today and nothing happened to the status of the switches created by the app. That has to happen successfully first before those switches will trigger other events. So, I will be back to the proverbial drawing board to troubleshoot the app. BUT, to my original question, I will play around a bot more with Rule Machine to seeif I can figure this out. Thanks,

I have successfully integrated GCal and have a fully operational system! The problem I was having with the basic GCal app was traced back to the text I used in my Google Calendar test events compared to the settings in the app. You can either use precisely the text you use in the app with the equal sign (=Flag Half Staff) or you can use the asterisk with a string of text that includes what you put in the app (*Flag Half Staff test event). Once I cleaned that up it started working as advertised! Then, as suggested by @cometfiash above, I used Rule Machine to create a trigger event that "opens" or "closes" the garage door device that raises and lowers my flag. I used a second "action to run" that resets the trigger switch created by the app. Bottom line, it works! I will be happy provide more info to anyone trying to use this app. Thanks for the assistance.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.