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

@fritz - I have LGK Sendmail installed and have setup a notification (door opening) that notfies me via LGK and Gmail, and don't see a difference between the two services in terms of timing or reliability - both work very well for me (LGK using my ISP provider email).

1 Like

v3.5.1 has been posted to GitHub and HPM:

  • Changed instructional verbiage based on @danabw's suggestions/comments
  • When creating a new Gmail notification device, the Create Notification Device button now displays after entering name and email address to reduce confusion. The email subject now defaults to ' Notification'
  • Updated Gmail Notification Device section to use new table format for displaying existing devices and adding new ones
    image
2 Likes

@ritchierich None of the Gmail Notification Devices I have created appear under either drop down list within the Settings-Swap Apps Device page. Did I do something wrong in creating the Gmail Notification Devices? Is there a setting I need to change to make them appear within the drop down list?

Looks great, nice update. The table integration is excellent. :clap: :+1:

I created a new notification device in the new UI and worked as expected.

1 Like

It’s my understanding that “child” devices don’t work with the Swap devices app. Unfortunately you will have to swap these manually in your apps.

Correct - don't work and (from HE staff) will never work in Swap Apps Device due to the underlying complexity of trying to make that happen.

1 Like

Bummer! So it’s not a really a “device”….just a link or pointer to a child app?

But virtual devices can be used in the Swap Device app. Can a virtual device be created to call or initiate a child app?

It’s a definitely a device but it is created by a parent app. The Swap App only works for devices that you create via Add Device button on the device list. Devices can also be created by apps or even parent devices, such as a fan controller with child device for fan and light. Devices created this way cannot be swapped by the Swap app.

I’ve been using Hubitat for 4.5 years and this Swap App is new so I haven’t used it that much. Manually swapping devices really isn’t that much effort. I pull up the device I want to remove, scroll to the In Use By section and then I right click on each app and open in new browser tab. Then I work through each of those tabs and change the device in the app. Once complete I go back to the original tab and browser refresh to confirm No in use by apps and then I remove the device.

1 Like

You really should try the Swap app. I used to do the same process as you, but the app does it in seconds, always been perfect for me. Really a game changer.

1 Like

v3.5.2 has been posted to GitHub and HPM. Found a NullPointerException error in my logs this morning from an overnight trigger. Realized I had a calendar entry with an empty Title which caused the error. Not sure how this meeting got added but nonetheless it exposed an edge case that needed fixing. If a title or subject is not entered in an event, task, reminder, or email it will default to 'none' like I had for other fields like calendar location.

2 Likes

v3.5.3 was just posted to fix a typo introduced in 3.5.2. Very sorry if this caused any issues with your searches if you updated yesterday.

This has been a fun project to work on. Started out with a simple use case for me and expanded to so much more based on community member questions and suggestions.

What features are missing? Are there other Google "items"/APIs you wish to search or automate?

4 Likes

@nfd0800 approached me with a question about how to invoke a calendar search Refresh from a HE Dashboard. The GCal switch has Poll and Refresh buttons that will invoke the calendar query immediately (both buttons perform the same action) but unfortunately the dashboards don't expose these commands.

I suggested an approach to add a virtual button and then create a RM rule that will trigger based on the button being pressed and then the action is Device Refresh on the child GCal switch.

This got me thinking and I could very easily add the Button capability to the GCal Switch driver to reduce this additional complexity. Then code things where if button 1 is pressed it invokes the Refresh command. This will allow you to add your GCal switches to any dashboard and use the Button template.

Thoughts? If several of you would find this useful I am happy to invest the time to add it. Please let me know by liking this post or replying! Thanks.

3 Likes

Version 3.5.4 has been posted to Github and HPM. This release adds the Pushable Button capability to the GCal Switch driver so that you can now add it to a HE Dashboard via button template and invoke a Refresh via push command. Push, Refresh, and Poll commands on the driver all perform the same action to query Google for new items that match the trigger search criteria.

Thank you @nfd0800 for the idea!

3 Likes

Hello @ritchierich !
I've been a happy user of your app for almost a year.
However, a few days ago I started noticing my buttons would not be toggled when they find matching reminders in my calendar. I haven't changed anything at all on hubitat in that period.
I tried re-authenticating with my email account in your app (that wasn't the issue according the logs) and the problem has persisted.
Strangely, checking the logs it seems that the code tries to switch my button to Off (the behavior I expect) but imaginelly sets it to On, as you can see in the image. Any suggestion?

What version of the app are you using? To confirm you are matching Google reminders that are in the future? Need these details to try to reproduce on my end.

tks for the quick reply!
driver version is 3.2.2
GCal Search Version also 3.2.2

Basically it is configured for every day around 2am to catch reminders for the day to start. Sometimes it happens that the reminder was created in a past date, but since it hasn't been marked as done yet I expect that reminder to still pop. This behavior has worked well. It seems to me the logic still works and the reminders are fetch on my calendar.
For example this case:

  • lastUpdated : 2022-12-26 02:30:00 AM
  • repeat : DAILY
  • switch : on
  • taskDueDate : 2022-12-25 06:00:00 PM
  • taskID : 1724282452016829431
  • taskTitle : Make the bed

Notice the task due date is in the past, dunno if it used to be like this before.

Thank you for the additional details. I just tested this on the current v3.5.4 version and I am not able to reproduce the issue. I find it strange that the issue appeared all of a sudden with your setup.

Could you upgrade to the latest v3.5.4 version and see if the issue persists? There have been many bug fixes and enhancements since your version. Main one you might be interested in is Gmail notifications.

You can upgrade via HPM or manually via import links mentioned in the first post. Please keep me posted.

1 Like

Tks! I updated the driver and everything works well now!

My only guess is that some days ago (dunno if exactly at the same time when the issue started) my hubitat stopped responding and I had to force restart it. Dunno if this caused some kind of glitch with the GCal driver... but great things seem to be back to normal now!
Merry Xmas!

1 Like

I would think checking emails would be a logical progression if it can be done.