[Tasker Tips & Tricks] alray:
So you are driving, your phone is connected to your car BT and someone sent you a SMS. Here is how Tasker can read it for you through you car speakers without even looking at your phone. What this Tasker profile will do is

Pause your Music (if any music was playing)

Say who this SMS is from

Read the SMS

Resume the music (if any music was playing before)

To do this, we will need 2 profiles, The first one is needed to do what is listed just above, the second one to monitor if any music was playing (because you don't want to resume your music after a SMS if no music was playing before)

Variables used:

%MTRACK The MTRACK variable is set to the media track name actually playing. If there is no media playing, MTRACK is unset. In this case we don't really care about the real value stored in MTRACK, we only need to know if there is one or not (if there is some music playing or not)

%SMSRN The SMSRN variable is the contact name from the last SMS received

%SMSRB The SMSRB variable is text body from the last SMS received

Instructions:

Profile/task #1

:

Open Tasker and go at the profile page

Click the + sign to create a new profile and name it "Read SMS Aloud"

Select the "Event" trigger

in the "Select Event Category" menu, select "Phone"

in the "Select Phone Event" menu, select "Received Text"

In the Event Edit page, Select "Type" to "Any" and leave "Sender" and "Content" blank

Click your back button to exit and save the Even Edit page, this will bring your back to the Profiles page

Select "New Task" and name your task "Read SMS"

In the Task Edit page, click the + sign ---> Task ---> If

In the "Action Edit - If" page, set the Condition to "%MTRACK" and the Condition Operator to "Is Set" then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Media ---> Media Control

In the "Action Edit - Media Control" page, set the Cmd to "Pause" and deselect "Simulate Media Button" then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Alert ---> Say

In the "Action Edit - Say" page, set Text to "SMS received from %SMSRN" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Task ---> Wait

In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Alert ---> Say

In the "Action Edit - Say" page, set Text to "%SMSRB" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Task ---> Wait

In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Media ---> Media Control

In the "Action Edit - Media Control" page, set the Cmd to "Play" and deselect "Simulate Media Button" then click on your back button to save and go back to the Task Edit page

Click on the + sign ---> Task ---> Wait

In the "Action Edit - Wait" page, set Seconds to "2" then click on your back button to save and go back to the Task Edit page.

In the Task Edit page, click the + sign ---> Task ---> Else

In the "Action Edit - Else" page, leave everything default then click on your back button to save and go back to the Task Edit page.

In the "Action Edit - Say" page, set Text to "SMS received from %SMSRN" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Task ---> Wait

In the "Action Edit - Wait" page, set Seconds to "1" then click on your back button to save and go back to the Task Edit page.

Click on the + sign ---> Alert ---> Say

In the "Action Edit - Say" page, set Text to "%SMSRB" and leave all the other settings by default for now (You'll be able to adjust these settings later if you want) then click on your back button to save and go back to the Task Edit page.

In the Task Edit page, click the + sign ---> Task ---> End If

In the Task Edit page, click your back button to save the task and go back to the Profile page

On your "Read SMS Aloud" profile, click and hold your "Received Text" trigger, select "Add" ---> State ---> Net ---> BT Connected. Make sure your bluetooth is actually turned ON and that your phone already connected at least once to your car, on the "State Edit - BT Connected" page, click the magnifying glass and select your Car bluetooth Name and Address. Click your back button to go back to the profile page.

Now your task should look like this:

In summary:

Context:

If any SMS received and phone is connected to your car BT

Task:

If there some music playing, pause it, say aloud the name and message from the SMS, resume music. Else (if there is no music playing) don't pause or resume any music, just say aloud the name and message from the SMS.

Note:

If the MTRACK variable is SET (music playing) the "IF" portion of the task is valid (green) and the "ELSE" portion is invalid (red)

If the MTRACK variable is NOT SET (music paused or stopped) the "IF" portion of the task is invalid (red) and the "ELSE" portion is valid (green)

Action #8 (Wait 2 seconds) is needed to give time to the MTRACK variable to be set again and detected by Tasker after resuming the music so the "Else" part stay invalid and that you don't end up with your SMS being read twice. You might need to increase this value depending on your phone.

Profile/task #2

:

This profile is needed so the MTRACK variable is monitored. It looks like MTRACK isn't correctly monitored if directly integrated in a task, there must be a

profile

actively monitoring this variable so it can also be monitored in a task.

In the profiles page, click on the + sign, name your new profile "Monitor %MTRACK"

Select the "Event" trigger ---> Variable --> Variable Set

In the "State Edit - Variable Set" page, set the Variable to "%MTRACK" then hit the back button to go back at the Profiles page.

Select New Task, name your new task "Monitor %MTRACK" Click the + sign ---> Alert ---> Flash

In the Action Edit - Flash" page, set the Text to "%MTRACK"

Hit your back button to save and you're done.

Compatible with:

Google Play Music/Songza

Power Amp

Phantom Music Control Pro

You tell me

Remember that this profile might need some adjustments depending on your phone. It worked fine on my One M7