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

That would be great! Basically mirror the GCal switch, right?

Mirror the state value yes. What you couldn't do is click "poll" or "refresh" to have it query the calendar immediately. That would have to happen on the GCal switch. This is where I was struggling before linking those commands to the "parent" app.

1 Like

@rakeshg I have uploaded Beta v2.3.0.3 to Github with an additional setting to set switches to sync.

You can download these files in the Beta folder. Please update all three files. Its worth noting that I built upon the Beta enhancements that @neerav.modi is currently testing. Please let me know if this works and feedback on the instructional text.

Thanks!

1 Like

Thanks - will check out the beta. Should I disable the HPM version and import this or just overwrite the original?

Just overwrite the 2 apps and driver you have. Once y’all give me the Green light I will update main branch and HPM will get it back in sync.

1 Like

I am not seeing the new Toggle/Sync Switches - still seeing the original.

The version did not change when I imported from GitHub - was that correct?

Let me know if I did something incorrectly - I just used the URL in the app and the driver.

UPDATE: Created a new child app - still don't see the new settings
UPDATE2: Figured it out - had to go to the beta URL and now I see the settings.

That URL points to the main branch and not Beta version. Probably easiest to just manually cut and paste code.

1 Like
  1. I like the ability to control other switches. Matter of fact, I definitely want to use @rakeshg's request. However, can you put an on/off toggle to be able to reverse the action? e.g. if the toggle is on, those switches would be turned ON when Google switch turns on. If the toggle is off, those switches would be turned OFF when the Google Switch is turned on.

  2. The request I was trying to make was to have a button in the google switch to resync the calendars, right next to the On, Off, Poll, and Refresh buttons. And a link in the child app to resync the calendars and another link to go to directly to the google switch. This request is just for convenience, NOT required, so I would be ok if you can't or don't want to do it. Right now, for testing, I make a change the in child app, I have to save it, go to apps list, open the parent app, go to Utilities, click clear cache, click sync calendars, then go to devices, open the Google Switch, and then watch see if the next event is correct, and then go to logs, then past history to see the debug info.

  3. After having updated all 3 to the beta version (apps: 2.3.0.3, driver: 2.3.0), it's broken. My google search is: -busy -lunch -"focus time". In debugging, the BEFORE results are correct, the AFTER doesn't have any events. Further testing shows that the quotes in the (valid) google query causes a problem in the AFTER. Removing the quotes and altering the search works, but obviously not as I would prefer it to.
    image

  4. And one more request: the option to ignore all-day events.

  5. The sequential vs non-sequential appears to work correctly in beta 2.3.0.3 for the first meeting in the morning. So, the option is successful so far! I'm working away from my desk until Friday, so I won't be able to give detailed feedback regarding non-sequential and the -10 minute offset for every single event throughout the day. You'll hear more from me late Friday.

1 Like

Actually it’s there :+1: Poll or Refresh buttons cause a query to the calendar. In fact the scheduled jobs are basically calling the child switch Poll function, refresh just calls Poll. The original app used these names plus they are native capabilities so I just left them.

Will look into this but probably hide them by default with a toggle as the app page is getting super long.

Hum will test this out. When you mean before, was that your edited code of v2.2?

Sure

Please keep me posted

2 Likes

@neerav.modi I tested this scenario out using your -"focus time" example and was able to replicate the issue. I neglected to update the GCal Search Trigger child app code to utilize Google Matching so that is why its broken. I will get that squared away along with some of the other ideas in the next version.

1 Like

@neerav.modi @rakeshg I have uploaded Beta v2.3.0.4 to the Beta folder which includes the following changes and enhancements:

  • As requested, added a preference to set switches to synchronize and a list of switches to reverse:
  • Fixed bug with Google API query matching with -"focus time"
  • Added preference to ignore all day events, default is to include them
  • All these settings are at the individual GCal Calendar Search trigger level so these can vary from search query to search query
1 Like

Ah! That's what that means and that's what it's for. Thank you.

I've installed them all. Will test all the features and let you know. So far this morning:

  1. next event is showing correctly
  2. all day event is being ignored correctly.
  3. toggle additional switches (reverse) is working as expected.

The google switch wasn't turning on/off yesterday with the previous beta 2.3.0.3. Seems ok today with the latest beta.

1 Like

@neerav.modi I just posted BETA v2.3.0.5 as @rakeshg found an issue. If you are using "Google Matching" for all your search triggers, you won't encounter the issue I just fixed and can continue to use v2.3.0.4.

I will let things settle for a few days and told @rakeshg that I would publish this code to the main branch as v2.3.1 late weekend or early next week if yall don't encounter any issues. Thanks again for testing these changes and the ideas to enhance this app.

2 Likes

I've downloaded 2.3.0.6. Will have to wait until Monday for real world testing.

1 Like

There was a previous unreported bug that seems to be fixed now. Every time the calendar synced (15 minutes), the Google switch would briefly turn on an then back to the default off, which kept triggering rules. Doesn't appear to be an issue in 2.3.0.6.

1 Like

How did your testing go today? Any issues? Thank you again for your help testing.

V2.3.1 is available on Github and HPM

  • Added an option to use Google Query Matching. By default calendar event matching is done by the HE hub and it allows multiple search strings. Caching of events is not supported when using Google query matching.
  • Added ability to prefix search words with a "-" (minus) to exclude events with this word in the title or location.
  • Added ability to exclude All Day Events (default is to include)
  • Added ability to set whether sequential events will expand the scheduling of when the child switch turns off. If this is turned off, the switch will turn off 1 minute in advance of calendar event end time to ensure the toggle can happen. You can override this via the Event End Offset setting.
  • Added ability to toggle/sync additional switches. A list of switches can be designated to synchronize and a list of switches can be designated to reverse the switch state as the child calendar switch is toggled.
3 Likes

Could you clarify the advantages of this? I'm assuming that it takes a bit of the load off the HE when scraping the data?

Edit: After updating I read the description in the app and it explained it well enough disregard by question please

Edit 2: I noticed the HPM installed a new "GCal switch driver" instead of updating the existing one, not sure if that was intended? All of my switches still referenced the original "old" code so I went ahead and manually updated the existing switch to the new code.

Cool on the edit but just to make sure folks are clear, in working with @neerav.modi it was requested to replicate many of Google's search features such as -, "", etc which became a challenge. Decided to provide an option at the individual search trigger level to leverage Google's search features if desired. Caching of events doesn't work with this option. Worth noting that I had several "false positives" using it in the past and it also doesn't support multiple search strings like the default HE matching does where multiple strings can be separated by commas.

I didn't experience this with my "production" hub. FWIW I develop this on my "dev" hub and use HPM like everyone else to keep updates to my production version of this. I didn't get a duplicate driver and curious if others experience it because I didn't change anything in the HPM settings other than the version and release notes.

Ya, I thought it was kind of strange as I also noted it didn't appear to be any different with the exception of the version.

EDIT: In hindsight, I may have caused the problem myself. I think I manually installed the app copying the code from another hub and originally missed the "switch driver" code which I then installed after I got some errors. I may have installed HPM and marked it as "up to date" before I manually added the "switch" driver" which probably gummed something up.

1 Like