Making voice announcements & controlling Amazon Alexa Echo


#1

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)

  • “There’s a 75% chance of rain today. Don’t forget your umbrella!”
  • “Your wife just pulled in the driveway. Better look busy!”

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.

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)
  • AutoNotification for Android ($2)

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) 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 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.smartthings.android
Title Filter / Notification Title: SmartThings
Text Filter / Notification Text: ®

The last line above has the registered sign (R with a circle around it). 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:

a_ProfileEvent_30

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 (shown below).


LINE 1
(+) > Plugin > AutoNotification > Query > Configuration

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

Backing up once should show you this up top:

c_TaskStep1_30

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:

although you can click the magnifying glass next to Engine:Voice to choose another voice. You might come back to this one later to play with the Pitch & Speed to get the voice the way you want it.

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: SmartThings (then check exact)

Backing up once should look like this up top:

f_TaskStep5_30

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"

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


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
Dumbest Question You will See on this Forum re:ST; Google Home; WebCore
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
Voices within Webcore?
Send a notification to only ONE device without a SIM card
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
Which Alexa am I talking to?
Speech synthesizers and speech engine on DLNA speakers
Announce The Temperature of a Thermostat
#2

Placeholder


#3

Holy f8!^ s#!^ [email protected]!!$ 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.


#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.


#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.