added Power capability (toggles between 0 and 1 on each refresh) - for use with webCoRE bc defined subscriptions to custom attributes of virtual devices don’t work
UPDATED gCal Event Sensor version 20180327.2
added startOffset and endOffset attributes;
these can be set by new commands setStartoffset() and setEndoffset()
(Keep in mind that if you modify these attribute, they will always override the offSets in the gCal Trigger parent app!)
There are two smartapps:
Gcal Search (latest version is 20170223.1)
Gcal Search Trigger (latest version is 20170223.1)
and two DTHs:
Gcal Event Sensor (latest version is 20180327.2)
Gcal Presence Sensor (latest version is 20170306.1)
The GCal Search app works by creating Search Trigger sub-apps that in turn create a virtual device with either (i) Gcal Event Sensor: a virtual device with contact and switch capabilities or (ii) Gcal Presence Sensor: a virtual device presence and switch capabilities. This will allow you to select a single calendar per sub-app and also create a search string so that you can have it only look at events that match instead of all events. So you can have a first Trigger app that activates on a calendar event titled “Holiday” on a first calendar and a second Trigger app that activates on a calendar event titled “Son Here” on a second calendar.
I use this in combination with webCoRE and some Routines.
Examples: use to prevent Pistons/Routines from activating if the sensor/switch is open/close, present/not present, or on/off. And since the virtual devices also act as a switch/sensor, you can trigger other Pistons to happen as well. Also used for notifications (SMS, Push, AskAlexa).
Why not just use IFTTT?
More customization, more accuracy (IFTTT gives you a 15-minute window), 1 less link in the chain that can break, and because its freaking cool.
Installation with GitHub Integration:
To get the latest updates for GCal-Search, the best way is to enable the GitHub Integration in your IDE, and then:
This is one of my favorite community apps, actually.
I put in all my sports team’s calendars as well as the UFC calendar. The switch goes on when the game starts (or main card starts for UFC).
I’ve thought about using this for presence by setting up my work schedule and adding in vacation and OT days. I think I may go ahead and do that now.
I’ll use CoRE for presence by taking my existing 4 presence sensors, adding a 5th from GCal, and matching at least 3 (sometimes my tasker one won’t switch and I’ll give myself some leeway in case my arrival sensor battery dies and I don’t notice it or I forget to change my work schedule) to get an actual presence.
(Jason "The Enabler" as deemed so by @Smart)
I’m glad to see this one come back. I never got a chance to play with it.
Glad to see it’s being worked on again. I had to make some changes to the code awhile back because it wasn’t killing scheduled events that were removed in the calendar. This is my most essential app i use.
If you use mnestor’s original code and wish to update: First, reset Github links to new repository. Then download and install the two new device handlers in the IDE. Finally, make sure that your existing GCal search devices (which are virtual contact sensors) are changed to the new GCal Contact Sensor DTH.
Are the settings supposed to be pasted somewhere into the code? I don’t think they are, so in answering your question I could not get to the point where I could paste my clientId and clientSecret into the app because that screen appears after I am asked to verify my credentials.