[RELEASE] Google Calendar, Task, and Gmail Search and Gmail Notification Device

I think so.... :slight_smile: Yes, read it again, you have interpretted it correctly. I run the query at 4am every day, if my team is playing later that afternoon, I want to have the switch turned on a 4am. I like the idea of the switch preference and the naming of it. The end time I hadn't really thought about, but turning it off at the end of the event sounds like a good solution too.

I know what you mean, it is a nice feeling being the one asking... :slight_smile: You can use a driver of mine as an example if you want. All I'm thinking is something similar where you can provide a format string as a preference setting, a blank could act as a switch to use the default. Not the most user friendly for those not into programming, but functional, as long as you include a default in the code, so the user doesn't HAVE to provide a format string if they don't know how.

With the tiles, I'm not motivated enough to take a stab myself, was only interested to find out if you were intending to, there's probably enough alternatives, and you can never please everyone with the layout, so it's a small win for a reasonable amount of work I expect.

Simon

@sburke781 I just uploaded v2.4.1 to GitHub. Added the following new preferences in the GCal Search Trigger app:

  • Delay toggle to event start: By default the switch will toggle based on the matching Event Start Time. If this setting is set to false, the switch will toggle at the time a match by this search trigger. The switch will continue to toggle again based on the Event End Time.
  • Date Format: You can now choose the Date format for dates set within the child GCal Switch. By default the time format set within the hub settings will be used however you may choose "Other" and enter your own custom date/time format.

@alan564923 you might be interested in the date format updates with your custom edits to show the dates on a dashboard.

HPM has been updated as well and you should be prompted to update.

1 Like

Thanks I will look at it. I don't display the date/time on my dashboard just event titles.

1 Like

The switch for my calendar search turned on when I ran the search this morning. So the changes works the way I want it to, thanks for getting it in so quickly.

1 Like

I'm getting an error in HPM when upgrading to this version. It's related to the "switch" driver and causes HPM to state it's rolling back.

I am not able to reproduce this. When I launched this new version a few days ago, I was getting a rollback with the .0 release when I was updating my production hub via HPM and realized I had mistakenly updated the main and child app with the same code and had to fix that via the .1 release. I just verified and GitHub has the right code. I just performed a HPM repair on this app and got no errors.

I just performed a repair in HPM, it completed without issue. But now I have two GCal switch drivers and the older one is still linked to my current searches so I can't delete it. Probably best to delete all searches and then rebuild them?

EDIT: Disregard, I just copied the raw URL into the original driver, imported, and deleted the newly created driver and all seems good now.

Cool glad you got it sorted. Curious did you go from 2.3.x to 2.4.1 or did you install 2.4.0?

I think it was from 2.31 to 2.40 and then 2.41

Ah ok then you might have had same issue I did before I fixed it in the .1 release. Keep me posted if you continue to have issues.

@makirules I see you deleted your post but I had gotten an email that you were having trouble with the Google API setup. I just went through the steps again with another Gmail account and updated the readme file in GitHub. The Google Console has changed since I originally posted the instructions and I realized some of the steps were out of order so that has now been corrected. If things still aren't working for you, please view the updated instructions and hopefully that will get you going.

1 Like

My apologies for deleting my post. I had figured it out. It helps if I read through the instructions lol.

1 Like

@ritchierich
I have a specific scenario that is causing me trouble, but I think it may relate to two aspects of the app design.

The scenario is that my boss has setup a partial day "meeting" to block our schedules for us to work on a certain task. However, they know we may need to still accept critical other meetings that overlap. Generally, I want to get the first meeting of any title every day, so I've been using a once a day search every evening that goes to end of next day, and the search is just *.

For that one segment of blocked time, I was trying to have it be ignored by the calendar trigger almost like an all day event is. I tried adding the additional search criteria of the ignore full phrase of my bosses' meeting title:
-EVAL Processing.

So the full search term is *,-EVAL Processing.

So the two observations I had were:

  1. The ignore routine is only single words, and trying to ignore the whole title phrase doesn't work. It does partial match, but opens the door to matching other meetings too.

  2. Since the other search term is * , it disregards the intent to ignore my bosses' meeting because * matches anything. Even if I reverse the order :arrow_right: in the original order the * matches and it skips processing the rest, and in the reverse it ignores the block meeting in the first pass, but matches it with the * on the second pass.

Relating to the first item, is there a way to modify the ignore portion, or provide an option to have it search for the whole phrase instead of just single words (perhaps using =-, or -= syntax)?

Relating to the second item, is there a way to determine an ignore clause exists as one or more of the search terms, and use it more like the all day event filter โ€“ to revise the item list and remove ignored events โ€“ before looping through the remaining search terms to find matching events? (Maybe it only applies if the combination of one criteria is only *, and another includes a - search?)

I'm kind of learning groovy as I explore more in HE, and I'm willing to take a stab at it, but I wasn't sure if something might be more obvious to you straight off, or if there's some way for me to just adjust the search criteria to make it work the way it already is programmed?

@es_ferret This is where I would suggest using Google Query Matching instead. As you may read further up suggestions were coming that was starting to mimic/replicate Google query features and it was just too much for me to do that. I added a toggle to allow you to use those features instead. I attempted to replicate your use case in my testing calendar where I had an entry with a title of "EVAL Processing" first and then another entry right after that. Using the following query string using Google Query Matching ignored the EVAL Processing entry:

Given the search is just an "-" exclusion, it will match on the first entry on the list that doesn't contain EVAL Processing in the title which I believe is what you want. The use of quotes around it will tell Google to find a match with both of those words, See the GoogleGuide for more examples.

Awesome!

I had seen the setting, but didn't really understand how it worked. I can totally appreciate the complexity of it (I had been trying to research how to modify the regex to search for full phrases, but then realized the individual phrase already was in searchTerm, but just wasn't fully being used). I then realized the usage was for space delimited sequence of ignore terms...each with their own prefix of -, and wasn't sure what to look say next. This is why I gave up and asked.

Thank you for finding a solution that already works!

1 Like

Glad this will work for you! I started to explore allowing quotes for multiple words and then decided itโ€™s best to just let Google do what it does best.

What impact will there be to not having the cache ability?

Also...there is a typo in the word format in the settings for date formats :wink:

Very minimal. Really only useful if you have multiple searches running seconds/minutes apart. For example I have switches for all members of my family to automate lights on school days.

Thanks for letting me know!

@ritchierich I love this app and my whole smart home is built around it, but it stopped working for me last week with an upgrade to 2.4.1 on 8/31. No events are found since that upgrade when the calendar device is refreshed or when the calendar run is scheduled to run once per day. I see errors like the following in logs:

@es_ferret Again thank you for letting me know about this, I have posted v2.4.2 to fix this issue.

@andy9 Thank you for the feedback on the app as I am glad you are finding it useful. This error is strange because it is complaining about a function named unscheduleEvent which I don't have in any of the apps or driver. Really not sure where that is coming from. I would suggest running a repair in HPM (assuming you used it to install) and/or manually install the code from GitHub using the import URLs:

1 Like