[Support WITHDRAWN] GCal-Search: Google Calendar Event contact sensor/switch

When you created the clientId/Secret on Google’s side did you set the redirect URI?

I belive so. This is what it looks like in Google

Authorized redirect URIs
For use with requests from a web server. This is the path in your application that users are redirected to after they have authenticated with Google. The path will be appended with the authorization code for access. Must have a protocol. Cannot contain URL fragments or relative paths. Cannot be a public IP address.

https://graph.api.smartthings.com/oauth/callback

That looks right.

It looks like a cut/paste from code where you set the clientId/Secret? Which would be wrong, it goes in the smartapp Settings, not in the code.

Other than that I’m not sure.

Btw, you’ll want to delete and create new the Google side since you publicly posted your ID/Secret lest evil minions use it in nefarious ways and your account gets suspended.

1 Like

Thanks I will change it once I get it working. I appreciate your help. In the app settings I did try to do that. I enabled OAuth but it will allow me to hi-lite the id and secret, but I cannot del or paste anything in it. Its like it is hard coded and cant be changed.

So the OAuth has 2 meanings in ST. That section enable the app to use OAuth and it allows the app to act as an endpoint. We just need to enable it and ignore the values there and set the ones from Google in the Settings section, not the OAuth section.

Thanks a bunch. That worked. i will start over with new credentials

I have everything working exactly as I had envisioned, but only when I refresh it manually. It doesn’t seem to be switching automatically. I must press refresh in the device in order for it to see my calendar event. Any suggestions on what to check first?

… Smartthings :frowning:

I’ve noticed this as well the past few days. A lot of my time based routines are failing to fire off. sigh They really need to fix this and stop breaking it.

Encountered the same issue. Used the new periodic setting in Rule Machine to refresh GCal devices once per day. So far so good.

Just wanted to let you know I haven’t forgotten about your issue. I’m in the middle of a contract/company change and things are a bit crazy right now. I took tomorrow afternoon off so I can look into things. Sorry about the wait.

Since the 25th, this is not working anymore. In the activity log, I don’t see the open/close of the switch. Could this be related to the ST scheduling problem? Am I the only one in this situation?

Thanks!

LJ

No worries. I appreciate the update!

You are not alone. @ErnieG has the suggestion of using the periodic setting in Rule Machine. [Support WITHDRAWN] GCal-Search: Google Calendar Event contact sensor/switch

I haven’t tried it myself yet.

@Rigging65 - My brain hurts. I am very confident it is fixed now though.

If anyone wants to do timezone parsing and dateformat and such (using a bunch of keywords to help searching :slight_smile:)
You can use java.text.SimpleDateFormat I could not find this mentioned anywhere. Good luck!

rock on! Thanks! Now…any idea why GCal isn’t automatically refreshing and catching calendar items?
Thanks for the continued hard work!

How are you using RM to Refresh? I get the periodic part, but can’t figure out the refresh…?

The ST scheduler issues. It really is just so unstable! Has me seriously considering going with something open source I can run on my ESX server and be completely local.

With what I learned from fixing the bug @Rigging65 found I redid how I parse non full-day events. I would really appreciate it if everyone would check that those event types are showing up correctly for them.

I did away with the regex conversion and am using the built in date conversion now so it should yield more accurate results even when you use different timezones for your calendar and ST hub.

Just create an event that is not an all-day event, after refresh look on the Recently tab and make sure the Open/Close text shows the right values. You will get 3 new lines on an update, 2 of them will show the date/time in UTC the text that gets set to the tile will show it in your correct timezone.

I’m not sure what’s going on with the tile text being so small. That happened in the last update and I haven’t figured out if I can change that or if ST needs to do something. Probably ST :frowning2:

Mike,

The text thing can be fixed by converting it to two lines instead of 3…unfortunately there is an ‘autoscale’ function that seems broken (Support knows and it is in the list of things for them to fix).