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

Thank you for remembering and alerting me.

2 Likes

@ritchierich - is there any downside to having two searches with the same event criteria? I want a set of switches to turn on/off at the start and end of an event, but a different switch to turn on at the start of the event but turn off a certain offset BEFORE the end of the same event. I don't think I can do that in the one GCal search configuration or is there? Thanks for your help

No in fact I had several when my kids were younger looking at school holidays and each kid has their own switch.

As mentioned above I am not an expert with Rule Machine but maybe others can chime in here with the new Additional Action Variable feature you could set a variable with the end time and then do some math with that variable to turn things off accordingly. Though know you use NodeRed for most automations.

And thank YOU for always making this app better than before. I apologize for seeming to drop off the thread. For 3 weeks, I have been struggling with hub and internet issues and only yesterday did I get back to about 75%. So, you WILL be hearing from me in the coming days.

1 Like

[quote="ritchierich, post:784, topic:71397"]

Perfect! I will just duplicate the existing one and set up a negative end offset.

I don't use RM either (all my logic is in Node-RED). This will be used to trigger a virtual switch that is exposed to HomeKit and that action will cancel the thermostat hold (the other thread that I had started).

1 Like

The offset works like a charm. Thanks so much for this awesome app - I keep discovering new use cases for it!

1 Like

@ritchierich Between the addition of \n, prevention of duplicate messages, thebearmay's Notification Tile driver, and a Rule to replace/remove text from a variable, I am able to send myself exactly what I wanted - a list of tomorrow's events from the calendar at a specified time today.

All of this was implemented at the end of Sept, but I had to roll the HE database back a few days and lost it all. I've recreated it, but it's not the same. :man_shrugging:t4:

As far as I remember, the variables functionality was working great. There are some school holidays coming up, and I hope to see real-world results soon.

Edit: added a link to the Notification Tiles driver for others who may find it useful.

1 Like

Version 4.7.4 has been posted to Github and HPM:

  • Fixed issue with Gmail notifications where email description wasn't coming across in Outlook and non-Gmail clients when the From and To account were the same Gmail account. Thank you @mkgough for reporting this issue.
2 Likes

Need some help troubleshooting this...

I am trying to use the Parse Data from Details feature... Seems like i have everything working correctly however for some reason, the variable always updates with many words before the Text to Find word. For example, the word to find for trigger is *Tesla and the Parse Data trigger is % . (I am trying to use calendar to change charge level before big trips)

In my case, the title of the event is "H3 Summit tesla charge %100" however, the variable is being updated as "H3 Summit tesla charge 100"

What am i doing wrong? was expecting just the 100 to come over.

-edit: I am rereading the instructions and now see "If a match is found, the remaining text on that line (or next line) will become the value of the selected Hub Variable"
I guess "remaining" means ALL remaining words. Was hoping to discard all words previous to the trigger word as those words tend to vary alot.

Unfortunately this functionality isn't going to work for your use case. Instead you could use Rule Machine to trigger on changes to your child switch eventTitle and extract your value via token function but the fact your string has a % in it will cause problems. Know you mention your words tend to vary but I would recommend standardizing them or choose something other than % as a delimiter.

See this article on how to extract token from strings:

Here is an example where I changed your % to a : and the rule properly extracted the 100 from the string, ignore the "phone number" as I reused an existing string variable I have on my dev hub.

Variable value:

Note the rule trigger is eventTitle does not equal a space " ". When no event is found by the search trigger the app sets all state variables to a single space. So you can catch this by looking for eventTitle != " "

Thanks! Having real difficulty finding the Extract Token action - doesn't seem to be on any options?

I created a new rule in example above so v5.1 and it shows up with a string type variable, not number.

Ok. That was a bit cryptic but I think I got it now. Set up the variable as a string and then the Extract Token option appears in RM. Thanks!

2 Likes

Kind of new to this app, so please forgive me if this is a silly question.

I was wondering if there is a way to set up a search trigger that can determine if it is a weekend (Saturday/Sunday) before a holiday? For example, Christmas is Wednesday of next week. Is there a way I could set something up to mark Saturday/Sunday as "weekend days before Christmas" or something like that?

Google includes a Holidays in US calendar that I subscribe to for mail notifications for example to know when there is a mail holiday. You could setup a trigger to search for that holiday and have a negative start offset of X hours which equate to X days before the day. Then build a rule to leverage the child switch to know if it’s a Saturday vs Sunday, etc.

2 Likes

So I was wondering if I could get some help with understanding how to do something with this app. What I would like to happen is create a GCal Search that looks for a certain calendar event, and if it finds one that is within the next 7 days, to turn on a child switch.

I have other GCal Searches set up for other things that work well this way, but they only look to the end of the current day. I want this new one to look into the next 7 days. I thought I could do that by using the "Number of Hours from Current Time" in the Search Range drop down. I set it to 168 hours (7 days). But this did not seem to work. There is a calendar event 6 days out it should have found but seems to not have found it.

I hope this makes some sense.

Any help would be appreciated! Thanks.

This use case should work in the current version. Would you mind sharing your search trigger settings and screenshot of your calendar entry that should have been found? I can verify settings and try to reproduce the issue. Feel free to PM the details instead if you prefer.

1 Like

@maxq10 I just setup a quick test:

  • Created a calendar event on Saturday, 1/18 at 11 AM
  • Set the search trigger to:
  • If this setting is on, then the switch won't turn on until the 18th at 11 but if you set it to off the switch will turn on at the time of the scheduled query of your calendar (when the matching event is found).
  • I set the above setting to off and the switch turned on:
1 Like

This was it! It is working as I expected it to now. Thanks!

1 Like

@ritchierich Will the newly mandatory multi factor authentication to access Google Cloud have any impact on this app?

1 Like