• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Profile "Who is Texting" problem

Mfracher

Newbie
Feb 5, 2016
34
3
Say Who's texting Issue
Profile works for all messages. But my "context" should skip some.
I get SAY announcements for a message from my Home alarm system
and they are not in my "GROUP" / FAMILY (see context below)
I have also added and removed my wife's contact name from Family. Either way, I get a SAY annoucement.
I do not get a lot of text, but it appears the context will not work.

Profile Context ( 3 rules) looks like this in Tasker:
SENDER
%SMSRN/CG:FAMILY

Not Call Any --> Whos Texting
SAY "tesxted recieved from %SMSRN

Variable Value
%DAY_NIGHT
Eq DAY

The %SMSRN value annouced is "1410100045" "one million four hundred ten... etc. "
 
I'm a little confused by what you posted. Please export the profile description to the clipboard and paste it into a post here to remove the confusion. What I use is ...
Code:
Profile: tlaSaySMS
Event: Received Text [ Type:SMS Sender:* Content:* ]
Enter: tlaSaySMSEnter
A1: If [ %SILENT ~ off ]
A2: Say [ Text:SMS from Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ] 
A3: If [ %SMSRN ~R [0-9] ]
A4: Say [ Text:unknown Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ] 
A5: Else 
A6: Say [ Text:%SMSRN Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ] 
A7: End If 
A8: Say [ Text:%SMSRB Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ] 
A9: End If

... Thom
 
Upvote 0
I'm a little confused by what you posted. Please export the profile description to the clipboard and paste it into a post here to remove the confusion. What I use is ...
Code:
Profile: tlaSaySMS
Event: Received Text [ Type:SMS Sender:* Content:* ]
Enter: tlaSaySMSEnter
A1: If [ %SILENT ~ off ]
A2: Say [ Text:SMS from Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A3: If [ %SMSRN ~R [0-9] ]
A4: Say [ Text:unknown Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A5: Else
A6: Say [ Text:%SMSRN Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A7: End If
A8: Say [ Text:%SMSRB Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A9: End If

... Thom
Profile: Who Is Texting (10)
Event: Received Text [ Type:Any Sender:%SMSRN/CG:Family Content:* ]
State: Not Call [ Type:Any Number:* ]
State: Variable Value [ %DAY_NIGHT eq DAY ]
Enter: Whos Texting (8)
A1: Say [ Text:Received Text from %SMSRN Engine:Voice:default:default Stream:5 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
 
  • Like
Reactions: Jawadm
Upvote 0
I have removed all context but one:
Created a new group "TEST" with one person in Group.

Event: Received Text [ Type:Any Sender:%SMSRN/CG:TEST Content:* ]

When there is a Message from another ( not in the group) the Task executes and it should not.
I made sure I did Save on Exit. Disabled the profile,, Power/Restart Activated Profile
Task still executes ????
 
Upvote 0
I have removed all context but one:
Created a new group "TEST" with one person in Group.

Event: Received Text [ Type:Any Sender:%SMSRN/CG:TEST Content:* ]

When there is a Message from another ( not in the group) the Task executes and it should not.
I made sure I did Save on Exit. Disabled the profile,, Power/Restart Activated Profile
Task still executes ????
Could this be a "ROOT" issue? I am not rooted.

I am close ... I suspect using Groups will not work
I have found this and used it ...

An Inbound SMS initialises a few variables, 2 of which are %SMSRN and %SMSRF. SMSRN contains the contact's name, if it exists in your address book. If it does not exist, it defaults to being the contacts number. SMSRF contains the number always.

Therefore I would use the following logic.

If %SMSRN ~ %SMSRF
Say "You have received a message for from an unknown number saying %SMSRB"
ELSE
Say "You have received a message from %SMSRN saying %SMSRB."

This works Smilee....
Goal was to Say Message Sender if Known (and in Group but that is still an unknown solution)
and stop SAYING if message is from my Alarm Company.
Alarm Company Messages handled differently will be the next step..
BTW Thank you and My background was 20 years Programmer, PA, IT manager, but atage 70 now, IF THEN ELSEsolutions come a little slower than in years past.
Mike,, no RSVP is fine
 
Last edited:
Upvote 0
I tried a simple example ...

Profile: XxxXxx (114)
Event: Received Text [ Type:Any Sender:CG:Test Content:* ]
Enter: Anon (115)
A1: Say [ Text:Test from %SMSRN Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]

Notice that mine says ...
Sender:CG:Test
... and yours says ...
Sender:%SMSRN/CG:TEST

Yours is read ... %SMSRN or CG:TEST

So what is the content of %SMSRN? The condition will be met for all incoming SMS text messages.

... Thom
 
Last edited:
Upvote 0
Using Sender:CG:Test did not work, but the above Task filter solves some problems.
Your other question: %SMSRN EQ Contact Name (if exists) Else it EQ's %SMSRF
With my alarm company ( not in my Contacts), %SMSRF is a long number 1401xxxxxx
another topic for later Googling will be : An explanation of how to use Tasker to build a "multiple context" Profile with "AND" logic would help.


This thread can be Closed/Marked Answered.
 
Upvote 0
So ... you changed ...
Sender:%SMSRN/CG:TEST​
... to ...
Sender:CG:TEST​
... and it worked?

... Thom
Yes I changed it (tried with Contact in and Contact out)
and
No,, It did not work Behaved as if it did not matter what was in TEST
I also tried FAV and emptied Favorites firsrt , Then one Group add , all I got was Say "one million fourhundred,, etc. "
 
Upvote 0
There is a glitch in Tasker. Whenever you make a change you need to go to the top level and choose Exit. You then need to select Save First.

If you don't then the change it not may not be totally applied and the results can be unpredictable.

In your original example you were saying X or Y and X was always present. The net result was that every text message was being accepted. in that situation Y was irrelevant.

... Thom
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones