Google Assistant notification events returning "oc" in %evtprm2

70 views
Skip to first unread message

Peter Howells

unread,
Mar 6, 2021, 8:01:47 AM3/6/21
to Tasker
In a notification event that triggers a profile, notifications of reminders issuing from Google Assistant are sometimes, seemingly randomly, returning the character string "oc" in %evtprm2 instead of the reminder text. 

The event parameters I get for an Assistant reminder are like this:
1: com.google.android.googlequicksearchbox
2: run a test (this is what I'd expect, but sometimes it's just "oc")
3: 12:26
4: Assistant
5: %evtprm5
6: 12:26
7: %evtprm7
8: true

The actual reminder appearing in the notifications bar on my phone shows the correct text even when "oc" is returned in %evtprm2.

I haven't seen any pattern here yet. It doesn't seem to make any difference whether I say "Hey Google, remind me to run a test in three minutes", or if I go though the whole conversation, "Hey Google", "Set a reminder", "Run a test", "In three minutes".

I haven't seen this happen with reminders issued by the calendar, but I use those fairly infrequently.

Any suggestions? Is this perhaps an Android issue rather than a Tasker one?

Oh, this is Tasker version 5.12.3-beta.


João Dias

unread,
Mar 8, 2021, 6:25:06 AM3/8/21
to tas...@googlegroups.com
Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Peter Howells

unread,
Mar 9, 2021, 9:48:40 AM3/9/21
to Tasker
Here's the profile. Action 4 differentiates Google triggered notifications and actions 12 – 15 handle Google Assistant reminders, with action 14 included so that the "oc" message isn't passed on. The rest deals with other notifications, generates text to be used for TTS in a task called Speak and writes a log file I'm using to try to understand notification events in general.

    Profile: Notification Test (124)
    Restore: no
    Event: Notification [ Owner Application:* Title:* Text:* Subtext:* Messages:* Other Text:* Cat:* New Only:Off ]
    Enter: Process notification 2 (120)
    A1: Variable Set [ Name:%newline To:
     Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    <Debug event time ms>
    A2: Write File [ File:Event logs/Notification log.txt Text:%TIMEMS Append:On Add Newline:On ] 
    A3: Array Set [ Variable Array:%source Values:%evtprm1 Splitter:. ] 
    A4: If [ %source2 ~ google ]
    <Google Pay>
    A5: If [ %evtprm4 ~ *gms* ]
    A6: Variable Set [ Name:%speech To:Google Pay payment: %evtprm3 at %evtprm2 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    <Incoming call>
    A7: Else If [ %evtprm3 ~ Incoming*call ]
    A8: Variable Set [ Name:%speech To:You have a call from %evtprm2 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    <Missed call>
    A9: Else If [ %evtprm2 ~ Missed call ]
    A10: Variable Set [ Name:%speech To:You have missed a call from %evtprm3 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A11: Variable Set [ Name:%MissedCalls To:%MissedCalls + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    <Assistant reminder>
    A12: Else If [ %evtprm4 ~ Assistant ]
    A13: Variable Set [ Name:%speech To:You have a reminder from your Google Assistant Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A14: Variable Set [ Name:%speech To:: %evtprm2 Recurse Variables:Off Do Maths:Off Append:On Max Rounding Digits:3 Structure Output:On ] If [ %evtprm2 !~ oc ]
    A15: Variable Set [ Name:%Reminders To:%Reminders + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    <Calendar event reminder>
    A16: Else If [ %evtprm4 ~ *calendar* & %evtprm7 ~ *event* ]
    A17: Variable Set [ Name:%speech To:You have a calendar event reminder: %evtprm2 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A18: Variable Set [ Name:%Reminders To:%Reminders + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    <Calendar task reminder>
    A19: Else If [ %source5 ~ *tasks* ]
    A20: Variable Set [ Name:%speech To:You have a calendar task reminder: %evtprm2 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A21: Variable Set [ Name:%Reminders To:%Reminders + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    <Bedtime>
    A22: Else If [ %evtprm2 ~ *Bedtime* & %Asleep !Set ]
    A23: Variable Set [ Name:%speech To:%evtprm2. %evtprm3 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A24: Variable Set [ Name:%Reminders To:%Reminders + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    A25: End If 
    A26: Else If [ %source3 ~ covid_zoe ]
    <COVID-19 report>
    A27: Variable Set [ Name:%speech To:Report your health for the Covid-19 study Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A28: Variable Set [ Name:%Reminders To:%Reminders + 1 Recurse Variables:Off Do Maths:On Append:Off Max Rounding Digits:3 Structure Output:On ] If [ %Asleep Set ]
    A29: End If 
    A30: If [ %speech Set & %speech !~ # ]
    A31: Perform Task [ Name:Speak Priority:%priority Parameter 1 (%par1):%speech Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ] 
    A32: Variable Set [ Name:%logtype To:***** Notification
     Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A33: Else 
    A34: If [ %ignore Set ]
    A35: Variable Set [ Name:%logtype To:***** Ignored notification
     Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A36: Else 
    A37: Perform Task [ Name:Speak Priority:%priority Parameter 1 (%par1):%UserName, you have a notification: %evtprm2 Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ] 
    A38: Variable Set [ Name:%logtype To:***** Unprocessed notification
     Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 Structure Output:Off ] 
    A39: End If 
    A40: End If 
    A41: Write File [ File:Event logs/Notification log.txt Text:%logtype%TIME %DATE Append:On Add Newline:On ] 
    A42: Write File [ File:Event logs/Notification log.txt Text:Say: %speech Append:On Add Newline:On ] If [ %speech Set & %speech !~ # ]
    A43: Write File [ File:Event logs/Notification log.txt Text:1: %evtprm1
    2: %evtprm2
    3: %evtprm3
    4: %evtprm4
    5: %evtprm5
    6: %evtprm6
    7: %evtprm7
    8: %evtprm8%newline Append:On Add Newline:On ] 
    A44: Test File [ Type:Size Data:Event logs/Notification log.txt Store Result In:%size Use Root:Off ] 
    A45: Variable Convert [ Name:%size Function:Bytes to Kilobytes Store Result In: Mode:Default ] 
    A46: If [ %size > 16 ]
    A47: Variable Set [ Name:%size To:kB Recurse Variables:Off Do Maths:Off Append:On Max Rounding Digits:3 Structure Output:Off ] 
    A48: Notify [ Title:Log file Text:The notification log file size is %size Icon:mw_editor_insert_drive_file Number:0 Permanent:Off Priority:3 Repeat Alert:Off LED Colour:Red LED Rate:0 Sound File: Vibration Pattern: Category: Actions:(2) ] 
    A49: End If 
    

jmjc...@gmail.com

unread,
Mar 9, 2021, 8:50:27 PM3/9/21
to Tasker
Just one idea. How is the collison handling setting for the entry task? Default is Abort New Task. Try to change it to Run Both. The reason is some apps do fire multiple notifications, under certain circumstances, at once EVEN if you only see one notification. For example, your app can fire one notification with "oc" and then immedately after another one with "run a test", but since your collision handling is to abort new (i.e. the second one) task, you only intercept the one with "oc" and not "run a test". 

Peter Howells

unread,
Mar 10, 2021, 8:00:41 AM3/10/21
to Tasker
Thanks. I'll try that and see how it goes.

Also, I've just noticed the New Only option in the notification event options. Does this filter out only completely identical notifications where all of %evtprm() is the same as the pervious, or is it based just on titles or text?

Reply all
Reply to author
Forward
0 new messages