[UPDATED 3/27/18] GCal Search

Fantastic work. I wanted to make a small contribution to you however I keep getting this message, “This recipient is currently unable to receive money.”

Just an FYI eventTime doesn’t work with all day events. Also, just a thought, rename it to eventOpenTime and add eventCloseTime

It doesn’t populate the eventTime attribute for all day events. It shows as — in the device tile

Also, is there a way to search multiple variations of strings? Ie. “no school” “spring recess” “paerent teacher” etc

Has anyone found a way to pull the next event title out of Gcal?
I can get location and most everything else. I know it’s in the event summary but it’s hard to pull it out of there if the event text length is different for different events.

I tried grabbing the different attribute values, but could not get a result with the event title.

Not super important just would be nice. I have the project I’m working on using Gcal and Webcore working. Only thing that would be nice is the event title.

New gCal Event Sensor version 20180327.1 :

  • eventTime now works for all-day events @Gopack2
  • added eventTitle attribute @TN_Oldman
  • 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
1 Like

Thank you Tony. I very much appreciate you adding that for me.

Could you please explain the last statement a little so I can wrap my head around it just a tad?

Am I reading / understanding that the power toggle lets you know when the data was refreshed? So you wouldn’t have to call for a device refresh?

Sorry 1 last question.

Will I have to create a new Gcal search in order for the new attribute “eventTitle” to populate? or will it populate when the data refreshes on my current setup?

Thank again, I didn’t expect you to edit this in for me. I really do appreciate it.

No problem - I was updating anyway and it was super easy.

Will I have to create a new Gcal search in order for the new attribute “eventTitle” to populate? or will it populate when the data refreshes on my current setup?

Nope. It will automatically populate with a refresh.

Could you please explain the [power attribute] statement a little so I can wrap my head around it just a tad?

Sure. The power attribute will toggle back-and-forth to 1 & 0 each time a new gCal event is detected. Why? Because webCoRE has limitations regarding subscriptions to custom attributes.

I have been working on a piston that defined variables using some of the custom attributes of my gCal Event Sensor (e.g., “eventTime” and “eventLocation”). I then used those variables as triggers (e.g., when {eventTime} changes), but webCoRE isn’t able to do this. So I now subscribe to the power attribute - which isn’t a custom attribute - as a way to inform webCoRE when eventTime changes. When it does, I set the Piston’s eventTime and eventLocation variables with the new data and continue with my Piston.

Clear?

1 Like

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(s) in the device, they will always override the offSets set in the gCal Trigger parent app!

Not currently - each Trigger can only be limited to a single search string. So you would need to use a new Trigger for each new string, and then use webCoRE to review each of the gCal event DTHs,

Why thanks! [blushing] Compliments (and donations!) are always appreciated…
I have updated the paypal link in the OP so it should now work again, but here it is again anyway

Yes, Very clear and along the same lines of issues I was running against. I was juist calling a refresh of the device to get around this. Thank you.

FYI, when using the new eventTitle attribute in an expression to get it into Webcore. Webcore is giving me an “invalid attribute” Error. Then when I trigger the refresh of my variables I am creating using the Gcal’s events attributes the eventTitle one does not populate?

I’ll play with it more later today, Unfortunately I have to go to work now. :frowning:

Ok, thanks. Let’s try a different angle. Is it possible to have the smart app allow you to select more than one calendar to search I have one main calendar, and multiple sub calendars that work with my main. Gcal lets me see all the calendars that are linked, but it only allows one calendar at a time. Would be nice to be able to search all or some of them.

‘Give them an inch and they will ask for a yard’
Thanks gopack2

I had same issue. Had to wait a bit, but also had to re sync the calendar event to webcore, and completely close webcore relogin and it started working

I’ll give that a shot, just ran out of time this morning. Stupid work getting in the way.

Thanks

What I do after updating a new DTH - open webCoRE smartapp on ST, go into settings, select devices, then exit and save. In webCoRE, make sure you go back to main dashboard. You should then see new attributes when editing your Pistons.

I got it to eventually start working. Thanks for all the help.

Okay…still doesn’t work. I put the client id and secret in the smart app setting in the IDE but i still get an error 400 when i try to install the gcal search smartapp.

What shard are you on? If not on shard 1, then you will need to change in code. What Google api did you sign up for? Check to make its the Google calendar api.

Read through this topic for suggestions on how to get it up and running.

NA01. I did enable for google calendar. 258 posts? Yeah…that’s not happening.

Hi.
I would like a hook for GCal Search to use the “Notification” (reminder / alert) data in the gcal event itself, so that if you set anevent in your calendar with a reminder Gcal Search can use that as a search tiem, and use as the Event offset.

My usecase would be:
if ( event notification do not exist) ignore event.
if (event notification exist) use data from event notification to generate event offset