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

@ritchierich - just upgraded to the latest app code using Hubitat Package Manager and got this error in the log:

Subject: Log: error - Away
Message: Date/Time: 2024-01-24 16:56:48.687
Message: java.lang.RuntimeException: invalid device id 'null' on line 2374 (method upgradeSettings)

Any idea what may cause this?

Latest update changed the name of a few settings from prior version and the upgradeSettings function moves old to new. Given it says null you weren’t using the old setting so no worries. Will put in better error handling in the next release.

2 Likes

Version 4.6.1 has been posted to GitHub and HPM:

  • Fixed NullPointerException while loading the parent GCal Search app when a Gmail Notification device is disabled. Thank you @dpanagiotou for reporting this issue!
  • Added additional error handling in the upgradeSettings app to prevent errors. Thank you @rakeshg for reporting this issue.
3 Likes

Hi, Probably a weird question, but could google sheet api linked the same way ? I try to update some cells using api and its complicated but if we could have the service linked like this we could update the sheet directly from hubitat without creating forms or public share.

Unfortunately I haven’t done much with Google Sheets so don’t know. Know there are several threads in this community on how to push data to sheets so maybe those will solve your needs.

Thanks for your reply! Yes, I saw that I could use form or even a url to my script to send some data... That s just that google sheet are pretty good way to store data and also proceed data and since its in the cloud, no problem on power outage... So the idea was that if we could connect google sheet with hubitat or webcore, it would be a lot usefull, like you could select a document,sheet and cell to update directly in webcore... or maybe use cell change as trigger in piston?
For now I use variable to get data from my sheet bt sending back information is harder since ifttt and zapier have made webhook a pro feature...

     I think I could make a request on it and if someone want to get there once a day it could be cool! :) 

have a nice day!

You should consider submitting that as an enhancement request in the webcore thread. I don’t have any plans to extend this app to Google Sheets.

1 Like

Google has announced changes to their calendar API. Everyone should have gotten an email announcing that. I will explore what this means for this app and make the necessary updates and post a new version if necessary.

Hopefully they also enhance the task API so it includes the due date time versus defaulting to midnight. More to come as I spend some time exploring these changes.

5 Likes

Thank you @ritchierich for your dedication to this app. Looking forward to any (possible) improvements!

2 Likes

Was just coming to see if you had seen the update announcement. As always you are two or three steps ahead of me. :wink::+1:

2 Likes

Thanks for the awesome integration.

I have one schedule that simply turns a switch on and off. I have a calendar event named 'On' for on and 'Off' for off.
The 'off' command works, but at the end of the event, it turns the switch back on.

"Toggle switches at the event scheduled end" setting is turned off.

I've tried removing the scheduler and starting again, and I'm at a loss. Hub and app is up to date.
The 'on' command works fine.
Any ideas?

I am running v4.6.1 through HPM.

Are you using the Additional Actions, Control Switches from calendar event details capability? Maybe posting your settings here or via PM will help so I can try to reproduce.

Version 4.6.2 has been posted to GitHub and HPM:

  • Fixed issue with Additional Actions Control Switches where switches listed were toggling at the event scheduled event even though the setting was set to false. Thank you @kbo5000 for reporting this!

I explored these changes further and in July 2023 Google introduced Working Locations in calendar events.

  • Please see this blog article for details.
  • As part of that update, the Calendar API has an eventType attribute for each calendar event to designate the following values:
  • The email announcement we all received was advertising this feature and that the calendar event query can now filter for specific event types.
  • From what I understand this is an optional query parameter when searching our calendars.

I am personally using the free Gmail and my account it not associated to a work or school account so every eventType on my events is "default". From my experience interacting with many HE Community members over the years most of you are also using the free accounts. At this time I don't believe any changes are necessary to the app to support this feature.

If anyone is using this community app with a Work or School account and having the event type available for querying or this attribute available on the child GCal Switch please let me know. I am happy to spend some time adding it but I will have to beta test with someone who has access to this feature since my free account does not.

3 Likes

Hello Ritchie,
I noticed since a few days ago a loop when I press the ON button in the App. Any advice from someone would be greatly appreciated.

Assume you mean click the on button in the child device?

I am not able to reproduce. Are the produced by and triggered apps populated in your switch events? You might have another app causing this loop. As you can see on my test I don’t have anything populated.

Here are 3 events, the first one (13:20) triggered by your app and the other 2 (13:21 and 13:27) by pressing the ON/OFF buttons of the virtual switch, created by your app, directly. Except when I press OFF, log showed the loop. In every occasion switch field toggled correctly even if it was looping. This is why I don't think it is Google Search related.

"G Search Hydro Switch Am" is the name of the virtual switch.
"EvenementAm" is the name of the Google Search app.

Name Value Produced by Triggered apps Date/Time
lastUpdated 18-02-2024 01:27:56 PM G Search Hydro Switch Am 2/18/2024 13:27:56.934
switch on G Search Hydro Switch Am 2/18/2024 13:27:53.653
messageReceived G Search Hydro Switch Am 2/18/2024 13:27:52.947
messageBody G Search Hydro Switch Am 2/18/2024 13:27:52.946
messageTitle G Search Hydro Switch Am 2/18/2024 13:27:52.944
lastUpdated 18-02-2024 01:27:52 PM G Search Hydro Switch Am 2/18/2024 13:27:52.937
switch off G Search Hydro Switch Am 2/18/2024 13:27:46.982
switch on G Search Hydro Switch Am 2/18/2024 13:21:04.028
messageTitle :snowflake: Avis d’événement de pointe EvenementAm 2/18/2024 13:20:54.051
messageReceived 18-02-2024 12:58:12 PM EvenementAm 2/18/2024 13:20:54.050
messageBody Préparez-vous à réduire votre consommation d'électricité et à économiser. Si vous avez de la difficulté à voir ce message, consultez sa version Web EvenementAm 2/18/2024 13:20:54.036
lastUpdated 18-02-2024 01:20:54 PM EvenementAm 2/18/2024 13:20:54.030

Thank you for the additional details. I don’t see a loop in the logs you just shared.

What are these?
G Search Hydro Switch Am
EvenementAm

The logs you pasted earlier appear to loop with consecutive On commands. Curious what the produced by column is for that situation.