Making voice announcements & controlling Amazon Alexa Echo


#1

Edit January 2022: This post/thread is still active, and what you are about to read is still working like a champ. (With so many changes at SmartThings, it’s good to know that this method below will continue to work during and after the transition. Just make sure step 6 below points to whichever version of the ST app you are using)

♫ For your enjoyment, I have added optional background music while you read ♫
(both choices below are instrumentals, with no distracting vocals)

For the traditionalists, here’s some Classical Cello that might take you thru most of this thread…
I recommend setting the volume to about 20% on this one (it builds up)

For the younger generation, or world music lovers… here is an energetic Irish medley of sorts…
I recommend about 40% volume on this one. (Whiskey is optional)

OK, on to the good stuff!


I love my Echo devices, but the notification abilities are quite limiting at this time.

Wouldn’t it be cool if webCoRE could announce out loud any important notification?
(Alexa is not required for this… Any speaker will work!)

  • “There’s a 75% chance of rain today. Don’t forget your umbrella!”
  • “Your wife just pulled in the driveway. Better look busy!”
  • "It’s 79° and Partly Cloudy outdoors. Tonight’s low is 50°. It is a comfortable 73° inside.”
    (this last example uses 6 variables… 2 of which are somewhat hidden)

In addition, can you imagine the possibilities of webCoRE controlling your Echo devices?

  • Alexa, what’s on my calendar?
  • Alexa, play Pink Floyd on Spotify
  • Alexa, play WKRP on TuneIn
  • Alexa, set timer for 2 hours
  • Alexa, what’s my flash briefing?

Well, I have found an easy method to attain this, so webCoRE can now do anything that Echo can do (as well as things not normally possible). Depending on what you have laying around the house, your investment may only be $5 $6. (as of Aug 25, 2020)

Requirements:

  • An old Android phone/tablet
  • A bluetooth (or wired) speaker connected to that Android device
  • An Echo device near the speaker (Optional, but useful for advance features)
  • Tasker for Android ($3 $3.49)
  • AutoNotification for Android ($2 $2.49)

For those unaware, Tasker is a powerful way to control Android, and highly recommended for any power-user. It can also send/receive commands to/from webCoRE, so the possibilities are limitless.

Here is the basic setup:

(1) Plug your old Android device into the wall (we want permanent power)
(2) Connect your speaker to the Android (either Bluetooth or 3.5mm jack)
(3) For advanced features, move an Echo device within a couple of feet of that speaker
(4) Test to make sure all sounds go thru the connected speaker
(5) Install SmartThings, Tasker & AutoNotification on the Android
(6) Program Tasker to look for specific notifications, and read the text out loud
(7) Program any piston in webCoRE to send any text to be read out loud

Step 1-5 above only takes a few minutes, and should be self-explanatory. I will use this thread to focus on steps 6 & 7.

Step 6 might take 20-30 minutes to setup correctly. Thankfully, it only has to be done once, and will work for years without any further editing.

Step 7 only takes a few seconds for each piston that you want a voice announcement to be read out loud.


Step 6 Detailed Instructions:

Once Tasker is installed on your old Android, you’ll want to create a new profile:
(+) > Event > Plugin > AutoNotification > Intercept > Configuration

There’s a lot here, but you only need to edit the ones listed below:

Action Type: Created
Persistency Type: Both
Apps: SmartThings should be checked
App Name Filter / Notification App: SmartThings
Package Name Filter / Package Name: com.samsung.android.oneconnect
Title Filter / Notification Title: My home
Text Filter / Notification Text: ®

The last line above has the registered sign pic . If your Android keyboard doesn’t have it, use Windows Charmap.exe to find it, or copy it from here:
®
We want a key that we never use for anything except this.

Once you have done that, back up once, and it should look like this at the top:

pic

When you back up a second time, choose “New Task +” at the top,
(I called mine “ST_ReadAloud”)
Then touch the checkmark to jump to the Task Edit.

From this “Task Edit” screen, the (+) will add new commands (lines).
We are going to program 6 lines (the lines below are clickable).


LINE 1

(+) > Plugin > AutoNotification > Query > Configuration

Persistency Type: Both
Apps: SmartThings should be checked
Title: My home
Text: ®
Advanced > Get All Fields: Check this box

Backing up once should show you this up top:

pic

Backing up again should put you on the Task Edit screen.
From here, we can make the second command now:


LINE 2

(+) > Variables > Variable Split

It should look like this (case sensitive):

d_TaskStep2_30

Backing up again should put you on the Task Edit screen.
From here, we can make the third command now:


LINE 3

(+) > Alert > Say

It should look something like this:

Manually type %antext2, but next to Engine:Voice, click the magnifying glass to choose a voice. (every device is different) You might come back to this one later to play with the Pitch & Speed to get the voice sounding the way you want it.

I would also make sure that there is no check mark next to:
“Continue Task Immediately”
(It sounds counter-intuitive, but it doesn’t speak immediately if checked)

Back up to the Task Edit screen.

The next two lines (4&5) are optional, but they clear the notifications from the device once they are read aloud.


LINE 4

(+) > Task > Wait

I set mine to 7 seconds, but ideally you want it a bit longer than your longest text to be read out loud.
(10-15 seconds might be better if you’re prone to complex pistons)

Back up to the Task Edit screen.
From here, we can make the fifth command now:


LINE 5

(+) > Plugin > AutoNotification > Cancel > Configuration

Apps: SmartThings should be checked
Title Filter / Notification Title: My home (then check exact)

Backing up once should look like this up top:

pic

Back up to the Task Edit screen.
From here, we can make the sixth, and final command:


LINE 6

(+) > Task > Stop

There is no need to config this one. Just back up to the Task Edit screen.
Your full Task should look like this:

If yours matches, then back up many times all the way to your desktop to save all your code.

OK, we are done with Tasker. Everything else is done inside webCoRE, and is much easier from here on out.


Step 7 Detailed Instructions:

You won’t believe how easy it is in webCoRE now. Once Tasker is set up correctly, you only have to add 1 extra character (®) in your piston to make any notification be read out loud. (You will never need to tweak the Tasker profile, unless you want to change the voice heard)

In any piston, all we need is to:

Send PUSH notification

and in the expression box, put something like this:
"® This text will be read out loud"

Note: In the new ST app, I believe “Store in Messages” should be ‘true’ for the PUSH to go thru.


Edit April 2020:

Feel free to copy this line to webCoRE’s clipboard, so you will always have a one click voice alert.

pic


Basically, any PUSH notification that begins with ®, will have the rest of the notification read out loud. Using webCoRE variables is a brilliant way to get real data into the voice alert. For example, if I:

Send Push Notification "® The time is "$time". It's "currentOutsideTemp", and "currentWeatherString" outdoors. "hiLoString" It is a comfortable "motionTemp"° inside."

My speaker would say something like:
“The time is 4:00 P.M. It’s 79 degrees and Partly Cloudy outdoors. Tonight’s low is 50 degrees. It is a comfortable 73 degrees inside.”


For advanced users, if you are using two speakers like I mentioned at the beginning (one Alexa Echo, and one speaker nearby connected to the Android), then you can have webCoRE control Alexa Echo, simply by doing something like this:

Send Push Notification "{"® A lexa, what's on my calendar?"}"
Send Push Notification "{"® A lexa, play Pink Floyd on Spotify"}"
Send Push Notification "{"® A lexa, set timer for 2 hours"}"
Send Push Notification "{"® A lexa, what's my flash briefing?"}"

(Or any other invocation for any of her Skills)

The space I put in "A lexa" above seems to work best for my TTS voice to be understood, but feel free to experiment.

The reason that 2 speakers are required for this ability, is because Alexa (like humans) cannot talk and listen at the same time. The “talking” speaker has to give commands to the “listening” Echo.

One great example, in my “go to bed routine” in webCoRE, it turns off lights, tells me the weather forecast for the next 8 hours etc… but my favorite part is a vocal command, “A lexa, open Babbling Brook” … it pauses for a few seconds, then says, “A lexa, turn off in 30 minutes”. This gives me a nice peaceful sound to fall asleep to.

This is a great way to run Alexa skills (commands) using webCoRE!
(set reminders, read the news, play Spotify playlist, etc)

By the way, for those interested, most of the “babbling brook” sound effects are lame in Alexa,
but this one sounds really good:
temp2


Edit Oct 2020

For new installs, the steps above are perfect…
… but for those going from the ST Classic app to the new app:

Click here to see what changes you'll need to do

In the Profile trigger, change to:

  • Notification Title: My home
  • Package Name: com.samsung.android.oneconnect

In the Task, change to:

  • Line 1 = Title: My home
  • Line 5 = Notification Title: My home

For reference, (or for those still using SmartThings Classic), previously it was:

  • Notification Title: SmartThings
  • Package Name: com.smartthings.android

Initiating Alexa actions from a Piston
Automate Alexa Commands w/out Voice
Triggering Echo Dot Routine
Speak text wait between sentences
Play custom test on samsung R1
Voices within Webcore?
Playing sounds or a wav file
Send a notification to only ONE device without a SIM card
Echo Speaks questions
Whole house fan timer need to be created
Setting up a Piston as a variable "flag" system
Play music on Alexa when i unlock August smart lock
Solution - Echo Alarm Clock Like Reminder
Off Line Notification
How To Troubleshoot when Pistons are no longer running?
How To Troubleshoot when Pistons are no longer running?
Alexa / Sensor Checks
Alexa / Sensor Checks
A Simple Notification for Door Sensors
A Simple Notification for Door Sensors
Contact sensor MP3
Speaker for ST/Webcore
Why isnt my piston speaking? But is sending an SMS
Announcements Happening When They Shouldnt be
Daily Commute Traffic in Lights!
Garbage Collection Reminder
Echo Speaks Repeats the first statement - No idea why
Echo Speaks Repeats the first statement - No idea why
Which Alexa am I talking to?
WebCoRE asks a question, my voice response determines the action
WebCoRE asks a question, my voice response determines the action
WebCoRE asks a question, my voice response determines the action
Automate Alexa Commands w/out Voice
Harmony Hub Piston Design
When on vacation - randomly toggle lights/switches
Piston to start radio playback on Samsung wireless audio speaker
Piston Speak is repeating 3 times
WebCore and EventGhost
Dumbest Question You will See on this Forum re:ST; Google Home; WebCore
Speech synthesizers and speech engine on DLNA speakers
Announce The Temperature of a Thermostat
Echo Speaks Repeats the first statement - No idea why
Webcore with Tasker
"continued conversation" trigger
"continued conversation" trigger
WebCoRE asks a question, my voice response determines the action
Create a push question then do action based on answers
Is there a way to access Echo Alarms through WebCore
Replacement for Echo Speaks?
Local Web Request to Vizio SmartCast API is getting 408
Sonos One Gen 2 Text to Speech help
Email as a Trigger
Speak Text and resume do not appear in command selction table of Webcore Dashboard of
"Define" help needed
Skybell indoor chime
Alexa Announcing Nest Doorbell Rings Possible Using Tasker and AutoNotification?
"Play Track" on Echo Dot Reads Name of MP3 but Fails to Play It
Turn on Bluetooth speakers when Audio is played via Alexa
Echo Speaks - Fire Alexa Routine from Webcore
Using Alexa to sound an alarm (in 2020)
Using Alexa to sound an alarm (in 2020)
Wrong Echo responding
Alert when door sensor is tripped, then wait 2 minutes before alerting again
Echo Speaks and Own Playlists
Door Left Open Reminder - Configurable by Individual Contact
Sensor piston help
Routine with time delay as a trigger
#2

Here is a quick recap, with some common questions answered.

► When I want a voice alert to be Read outloud for me, my PUSH Notifications begin with pic

► On the Android device, Tasker will intercept the Notification, and read it outloud.

► For voice alerts, Alexa will work, but she is not required. Absolutely any speaker that you connect to your Android will also work. It can be a modern Bluetooth connection, or a 25 year old speaker with a 3.5mm headphone jack… You can connect the Android to a home stereo or theater system, for full house alerts, or at the other end of the spectrum, (if you can deal with the tiny speaker), you can cheat and use only the internal speaker on the Android for voice alerts. (IE: my Android in my pocket will voice alert me if a window opens when nobody is home, or if I am at Walmart, my phone might say it is about to rain, so I know to hurry up)

► If you want to use the advanced features in Alexa (IE: Spotify, News, Weather, Calendar, Reminders, Alarms, Waterfall sounds to fall asleep to etc), then you will need two speakers. You will need one to speak (as mentioned above), and a nearby Alexa that will follow the commands.

► If you go this route, you will have the added benefit of being able to control all of Alexa’s Skills…
(there are well over 100,000 at the moment)

► You can change the pitch of the voice, and choose different dialects or languages, such as American, British, Australian, Spanish etc. (although commands to Alexa should probably be in English)

► You can use a male or female voice (or both) For example, my smart-house normally alerts me in a female Australian voice, but my weather alerts are spoken in a male British voice. I achieve this by “cloning” my Tasker profile, and making a small tweak to the new one. I begin notifications with ® to be read by the female, but I prefix with ¥ when I want the British Male to speak weather data. In some households, I have set it up so alerts for the Husband use one voice, and alerts for the wife use a different voice. It is really cool! It’s like having a whole “family” of AI at my disposal…

► Tasker also has the ability to write to local files, so for example, you could tell Tasker to write a new line to a text file each time a voice alert comes in. Optionally, you can also make a popup window display the last message. (which is handy if you stepped out for a minute, and did not hear the message)

► Personally, I took that scenario to the next level. In my house, if I ever need the last message read outloud again, I just say, “Alexa, repeat”. She flips a SimSwitch, webCoRE sends a unique notification, and Tasker will read back the last spoken message. (which is always stored in a Tasker variable)

► Not mentioned above, but you can also store sound clips on the Android, and let webCoRE trigger any sound effect you want. (when I am at work, if there is motion outside my house, then “rowdydogs.mp3” will automatically play, to deter thieves)

► Tasker can also execute a piston via the External URL… So, for example, if my Android battery drops below 20%, then Tasker sends a HTTP Get request, which will run a piston, that alerts me and the family.


#3

Holy f8!^ s#!^ b@!!$ this is awesome! Great write up! I’ve got plenty of ideas for this.

What reads the notification out loud? And what are you doing to keep the notification from being sent to multiple devices?

** edited by admin to blur “colorful” language. **


#4

The voice is read back by Android’s Text-to-speech. On my device, I can change the voice by going to:
Android > Settings > My Device > Language and Input > Text-to speech options
(but every device is a bit different)

There are a lot of options there, just play around a bit until you find a voice you like (or download a new voice from the same location). When you are done, make sure line 3 in Tasker points to the language that you chose. (ie: eng-usa, eng-gbr, eng-aus etc.)

As far as multiple devices goes, as long as you tell webCoRE where to send it, you should have no issues. An alternative method would be simply sending an SMS to one device, and telling Tasker to monitor that instead.

Of course, if Tasker is installed on multiple devices, you can have the one notification do different things on each device… depending on what device / time of day / location etc.


#5

Has anyone gotten this to work on a Fire HD 10 tablet? I’ve followed the steps to a T and i’m not seeing any notifications on my Fire HD and it’s not speaking. I’m getting the push notifications to all my other devices except my Fire HD 10 and that’s the one I want to do the talking :(.


#6

I don’t have a Fire tablet to test… Were you able to install the ST app on that device? (that is one way to get the notifications)


#7

Yes I was… But am not getting notifications on it… But notifications aren’t disabled on the app so not sure what’s up :frowning:


#8

Hmmm, if the tablet is not getting any notifications, then Tasker cannot do it’s job…

Just to make sure, the webCoRE command I use is:
Send PUSH notification "® Blah blah blah"

I heard SmartThings made a new app that doesn’t work quite the same as the old app. Maybe try the SmartThings CLASSIC app to see if notifications work?

Also, keep in mind that apps in the Amazon store are RARELY the same version as apps in Google Play store. (I have never seen them match actually)

If the above tips do not help, thankfully Tasker can monitor ANY notifications sent to that device. (SMS, Email, chat apps etc) Although this method means you would have to reprogram Tasker to watch for THAT instead, so this should be a last resort IMO. Also, some apps do not put the message in the notification tray, so watch out and avoid using those types of apps. (Tasker can only read back what is displayed in the notification tray)

Does anyone else have a Fire Tablet with working ST notifications on it?


#9

Yeah I installed the Google Play version (I installed Google Play on my Fire 10). I did the push notification right I believe. I did a send push notification and “® The pantry door is open”. All my devices but the Fire get the push :(.


#10

Just for kicks, can you DISABLE that apps notifications, wait a few seconds and then ENABLE it afterwards. I don’t know why a simple notification is not going thru.

(Dumb question, but are you logged into the ST app on the tablet?)


#11

Any suggestions on how to accomplish this with contact books being disabled? I can change all my other notifications to individuals by sending a text message but I’m not sure how to send a notification to a tablet without notifying the whole family.


#12

If you don’t want to use the PUSH Notification mentioned in this tutorial, there are many chat apps that would work as well… (as long as it assigns the tablet a pseudo phone number so you can send a normal text to it) The other thing to watch for is, most chat apps show the text message in the notification tray as it comes in. (this is good)… But some apps do not show the 2nd and 3rd texts as they arrive. (this is bad) So basically, if your app condenses multiple text messages into one notification, then try a different app. You want one that shows each and every message as it comes in.

You can do your testing by sending a few SMS from your phone to your tablet.

During testing, it’s OK to side-swipe the notifications between texts, but do NOT open the app! (we want to see how the notifications look without the app actually being opened at all)

Once you find a good app, then it is easy to bring into webCoRE & Tasker…


A few Android apps to consider:

Google Voice on the tablet works well for me, as long as the notification is cleared after it is received. (you can configure Tasker to do this automatically)

Also, Text+ might be worth checking out. It has been a couple of years since I used that one, but (unless they changed something) it might work as well.

There are probably many other apps that assign you a phone number to receive texts… Please report back your findings because many other people will also be looking for solutions to the disabled contact book…


Alternative approach:

You could also setup a new email account, and have Tasker monitor emails from webCoRE… Although you will still have to pay attention to how your device handles multiple notifications in the tray… Also, keep an eye open to see if the message gets cropped (shortened) in the notification tray. (If it doesn’t make it to the tray, then Tasker cannot read it out loud) You could test by sending a couple of long sentences to see how much text makes it thru to your notification tray.


Edit April 2020:

Emails now have a strict daily limit, so I would not recommend using emails to send a voice alert.


#13

This was great! However, I get an error on task 2 - Variable Split. I have tasker and auto-notification running on my old Samsung galaxy S3. The error says:

Variables doreplresult: |%antext| -> |%antext|
E Variable Split: %antext -> %antext
Variables doreplresult: |%antext| -> |%antext|
E variable Split can’t split unset value to set %antext
E result: stop task (error)
Variables doreplresult: |%antext| -> |%antext|
E Error 1
/MacroEdit action finished exelD 1 action no 1 code 590 status: Err next 1

I followed the directions explicitly, twice! Does anyone know what to do to correct this error?

Thank you!


#14

Hmmm… That error looks like %antext is written in both boxes…

Can you verify that Line 2 looks like this?

temp


#15

That is exactly how it looks, just that I used the @ symbol because the Smartthings classic app would not allow me to enter the trademark symbol.


#16

You might be able to get away with it, but I would highly recommend using a different symbol. The @ symbol is used way too often. Ideally, it will be a symbol that is NEVER used for anything else. (maybe ¢, £, or ¥)

I am also a little perplexed as to why you are trying to type in the symbol in the SmartThings app… I only had to use it in Tasker, and then in webCoRE’s piston editor using my PC’s browser. I have never once used any symbols in the ST app.

I do not know what Android keyboard you are using, but I know my Samsung default keyboard does not have that symbol. Thankfully, many other Android keyboards do have obscure symbols as an option.

The keyboards I use all have that ® symbol:


Keep in mind whatever symbol you go with, you will have to change the Tasker code in three places to sync it up…

FIRST LOCATION :

Profiles > AutoNotification Intercept Event Behavior (Left side) > Notification Text: SYMBOLHERE
temp


SECOND LOCATION :

Task > ST_ReadAloud > LINE 1: AutoNotification Query > Text: SYMBOLHERE
temp2


THIRD LOCATION :

Task > ST_ReadAloud > LINE 2: Variable Split > Splitter: SYMBOLHERE
temp


Also, I just did a little poking around, and if I try to test the Task directly in Tasker, I get the EXACT same error as you. This is because the variable %antext only exists when the notification arrives.

To test this properly, you will have to go into webcore, make a new piston with only one command:

Send PUSH notification "® This is only a test"

and then Test the piston to see if your Android acts accordingly…


If these steps do not resolve your issue, then I will need a clipboard copy of both your Profile and Task.

Profile > Long Press your Profile > 3 dot menu > Export > Description to Clipboard
Paste here, and then go back to Tasker for the next step:

Tasks > Long Press ST_ReadAloud > 3 dot menu > Export > Description to Clipboard
Paste here as well…


#17

I was creating a piston using webcore through the smartthings app, not on a pc. When trying it that way, I would select the trademark symbol, but it would not allow me to enter it. I actually deleted the Tasker tasks & profile and restarted from the beginning to use the @ symbol.

I will start over again. The reason I thought it wasn’t working is because the piston did not work and on the phone, it says there are no active Tasker profiles. The write up didn’t say if there are changes needed for the auto notification app after installation.

I created a simple piston, but the only way I found to enable the Send A Push Notification is to first select a notification device, which is my Samsung R1 speaker. The only thing that happened is that on both my phone and the old phone, I received the push notification. It’s like Tasker didn’t actually intercept to the notification.

Maybe I need to find more articles on testing Tasker or something. I feel like there is one step that I am missing, but I just don’t know what it is.

I really appreciate you taking the time to assist me! Thank you!


#18

Wow, I didn’t even know this was possible. Learn something new everyday here!!
Can you tell me the steps you did to do this? I cannot replicate this…

I tend to do all my piston coding in a full size PC web browser… Maybe that is the secret?


Just to clarify, in my first post above, Step 6 Detailed Instructions: is in the “PROFILE” tab…
The 6 lines below that will be in the “TASK” tab…


It has been AGES since I installed Tasker and AutoNotification, but I believe you may have to allow them both Accessibility access… They should prompt you the first time they need it.


Send PUSH Notification is built-in to webCoRE, so it can go inside of ANY device. (It does not use the device to send it though) I tend to place them in the “Location” device, but any spot will work:

temp2


This is good. It means your webCoRE piston is working as expected. PUSH Notifications go to all devices that have the ST app installed. Maybe “intercept” is the wrong word since the message has to actually arrive in your Notification Tray for Tasker to see it and act upon it.

The way I do it is to Send PUSH notification (which goes to all my devices)

  • On my old phone, Tasker reads it outloud, then clears the notification…
  • On all other devices, I have Tasker simply clear that notification so my screen is not cluttered.

#19

By the way, one thing I did not mention in the original write up is…

If you write a one line piston FIRST:
Send PUSH notification "® This is only a test"
and then test that piston to send the notification…

Do NOT delete the notification on your old phone… You can use that new notification on your Samsung to make the Tasker coding a bit easier…

In Tasker, once you tap on “Configuration”, the thing to look for is “Fill From Current”

Then select the exact notification sent from webCoRE.

This does NOT populate the data automatically, (so you still have to do all the steps), but it does prevent any possible spelling errors.


Edit July 2020:

For a more detailed example of this approach, take a look at steps 8-19 here.


#20

In SmartThings, I go to Automation, SmartApps, and then CoRE. When I tap on CoRE, I click on Add a new piston. From there, it has a UI that I just follow the prompts.

I can’t get to webcore.co website. When I click on CoRE Dashboard, it takes me to my SmartThings webpage for Global variables.

So you have Tasker installed on all of the phones in your home? I didn’t expect to have to do that.