.ics calendar support

"Because you are not a G Suite user, you can only make your app available to external (general audience) users."

I don't see how to delete and start over, but this was the only choice I was able to select when initially following the steps on Github.

Very strange - I see in the docs that Internal says it's restricted to G Suite, but I definitely don't have one (used to have one but made a totally new account to get away from the G Suite restrictions on everything else!)

I found a discussion here, looks like you might just be able to use the credentials from an External app without submitting for review...?

I had the same experience over the weekend... I didn't persist with it though, decided I would come back to it.

Interesting.
I suspect it's something that has changed on Google's side recently - as the other post I found referencing that error message was also recent (Jan 2020), and was also a case of following a set of instructions that had previously worked for others.

Interesting I don’t have Gsuite either. I did setup an API to my contacts years ago and added my calendar to it when I set this up so maybe that’s why I didn’t have any issues. Very sorry to hear they have locked this down very unfortunate.

Nevermind...i got it....had to look in the logs. Not completely clear that that is where to get the code.

Since it hasn't been verified by google you just have to give consent and "proceed to unsafe" or whatever it's called in chrome.

I do have one question though...I set the offset time in the app to 45 minutes but I still see an "open time" of the start of the event. Is the offset not used? I can work it in if it hasn't been but I just wanted to check first.

Thanks!

I haven't tried using the offset, so it's possible it doesn't work... are you using my version, or the @ritchierich version?

Yours.

But I think I have to remove it anyway. My hub has slowed to a crawl since installing it. I think it is just too intense for the hub to handle.

This shouldn’t happen. Only calls the Google API based on what is defined in the child app. I’d be curious if you try my version and have the same experience. I do cache the calendar entries to help with performance.

Curious did you have any challenges getting the Google API setup like @sburke781?

Yes, several challenges. It wasn't until i realized that the "Device Code" was in the logs that I had to enter into the authorization screen that I was able to get it to work. I also had to click on "Proceed to unsafe" or whatever it is to get to the authorization screen because the app isn't published yet (Google Security). But once I got that done, it was able to get it authorized fine.

I was able to get an offset built into the driver which seems to be working well. Also, after un-installing and re-installing it seems to be running much better. I think I ran into a problem when I entered an offset into the app itself. The tip said to use a "-" sign to offset before the event start time but I think it treated that as a string instead of a negative number and that REALLY screwed the pooch.

So, everything is sorted out at this point. The one question I had was in regards to Ignoring all day events. Is there any way using the event filter to ignore all day events and only return ones with a start and end time? Thanks!!

Great to hear you got it working :slight_smile:
If you'd like to share your fix for the offset I'd be happy to add it in for others (PM is fine, or a github PR).

I honestly don't know - I didn't write the app, just ported it. There might be some clues in the original ST forum thread (linked at the start).

Thanks...I'll take a look.

I'll send you a PR in Github. To keep things simple, I isolated the offset times as making the motion attribute go active and inactive. That way, you can keep the real event time tied to the switch and the offset is only motion. It's also done at the driver level rather than at the app level. I was actually thinking of moving some of the scheduling stuff to the driver too. ST seemed to like all that stuff at the App level but Hubitat seems to keep a move device-centric model for schedules like that.

Ryan unfortunately there isn’t via google calendar API. The code does derive it based on the date values returned. You may want to look at my version instead where it gathers all the events and you can easily loop through them to find what you are looking for. I do capture eventAllDay that you can easily filter with.

Thanks! I'll take a look later today. I'm thinking that for some uses, the IFTTT integration might still be more useful but I will definitely use this for others. I have several calendars set up so having one for all-day events isn't too difficult either. Thanks again!

Did you put this in a "release" topic yet? I think it deserves one.

*edit: Also, if you click on the home link after you successfully validate authentication the app crashes. Something is wrong with that link.

I haven’t and honestly a little gun shy because I am no expert on the Google API side to help folks with setup there. But will consider.

Not following here. Mind providing steps to reproduce or errors from log?

Thank you for the effort, but this seems like a LOT of setup for something that in theory should be quite simple since Google Calendar can generate public "secret" ical feeds... Why is the API and cloud app project necessary?

How does the "Time to Run" feature work? It seems that if it finds a string match within the cache period it will turn the switch ON right away even if the event is not scheduled to occur until later.

That is the time when you want the app to run each day. For my use case I check once a day and I have it run just after midnight.

If you need it to run more often you could create a Rule Machine rule that runs a custom command on your virtual switch that calls Refresh which causes the app to query the calendar again.

1 Like