Making voice announcements & controlling Amazon Alexa Echo


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


#21

Ahhh… That’s the missing piece to the puzzle…
This website is for webCoRE … not CoRE.
(as are all the instructions on this page)
Both programs are by @ady624, but webCoRE is much more powerful.

The two programs can both be installed at the same time without issue, but once you delve into webCoRE, you will likely not look back.

The install is a bit strange for most folks, but there is a good step-by-step here:
https://wiki.webcore.co/GitHub_Install

You might be able to get Alexa working with CoRE, but as I do not use that program anymore, I wouldn’t be able to help much… My experience with CoRE is very limited because I switched over to webCoRE shortly afterwards.


#22

I bought Tasker once, and it lets me install it on any device I own.
(I admit, Tasker is one of the first programs I put on ALL my Android devices)

But for the sake of this document, it is only required for the one device left at home connected to your speaker.


#23

I went back and removed the smartapp and reinstalled WebCoRE from scratch. This time, I did it correctly. I was able to register my WebCoRE dashboard, which I couldn’t do before. I created my one line Push Notification piston and each time I press test, the notification appears, which is great! But Tasker still did not say or do anything.

I have given up on Tasker as I realized that my Samsung R1 speaker can be used in WebCoRE to give voice prompts and other things, so I am going to use that instead of Tasker.

Thanks for all of your responses and feedback!!!


#24

Sorry I didn’t catch this sooner. For simple voice alerts, Tasker might not be needed if you already have a WiFi speaker. Keep in mind though that without Tasker, I think you’ll be giving up the following features:

  • Playing sound effects as an alert
  • Visual alerts on the tablet
  • Writing data to text file or spreadsheet
  • Being able to respond back to webCoRE with a new command
  • Control the dialect, pitch and sex of the voice

(ie: My smart-house alerts me in a female Australian voice, and my weather alerts are spoken in a male British voice… All thanks to Tasker)

If you can live without those features, then sending a direct command is likely best.

If you change your mind and decide to try Tasker again later, just say the word…


#25

I spent a few hours yesterday bringing about 50 of my Spotify playlists into webCoRE.
Now, I can trigger any of them at any time thanks to webCoRE! :sunglasses:


As an added bonus, I have found a great workaround to the old shuffle issue.

Normally, Spotify will remember if shuffle was on or off, and continue a new session with the previous setting. This is good, but there is one problem:

Spotify will begin each playlist at the first track, and does not shuffle the tracks until that first song is over…

This means if you play this playlist a few times, you will quickly get tired of track #1.

In the past, I would start a playlist, and then immediately skip to the next track, but I have come up with a better (hands-free) solution. We can put a really short and silent track in the #1 position. This way, you will never hear it, and when it shuffles a few seconds later, it will always be to a different track.

To implement this yourselves, simply copy the following line to clipboard:

spotify:track:5XSKC4d0y0DfcGbvDOiL93

Then in the desktop version of Spotify:

  • Load your playlist
  • Single click on the first track
  • Ctrl-V (to paste)
  • Drag the silent track to the top slot
  • Repeat the above steps in your other playlists

Now, when Alexa hears, “shuffle Shady Grove playlist”, you will always get fresh songs right from the start!

It is a shame Spotify cannot shuffle right off the bat, but this workaround works very well in the meantime.


NOTE :
The shortest silent track I could find is 11 seconds long.
If anyone finds one even shorter, please share it here…


#26

Where do you adjust the volume?


#27

I can change the volume on my phone or on my Speaker.

Normally, I tend to keep this old Android device at full volume, and just change the volumes on my external speakers.


#28

The volume on my phone S8 plus does not adjust the volume when Tasker is talking


#29

I am going to repost my earlier suggestions to you…
(If you choose to ignore them again, you are on your own)


You may need to edit the Task in Tasker.
Specifically, edit the “Say” command. Notice under “Stream” you have 6 choices. (Call, System, Ringer, Media, Alarm, Notification) I believe you can choose any of them, but keep in mind on Android, they each have a separate volume control.


Your particular phone may not have all 6 volume controls, so you might want to check your phone’s capabilities before tweaking that line in Tasker.

temp


NOTE :
You will likely have to follow BOTH of these suggestions to correct your volume…


#30

With the new integration between Alexa and sensors there’s so many more possibilities for notifications. I’ve got an Alexa routine that announces when people are home based on webCoRE presence sensors. Tied the presence sensors to simulated contact sensors so present equals open and in Alexa I’ve got routine so if Contact Sensor changes to open then announce “[person’s name] is home”.


#31

I’ve seen that new capability, but as far as I know, Alexa does not allow for variables in the voice announcement. (which means you have to make a simulated switch for EACH phrase you want announced) This also means that you could never have her read the inside temperature without creating 20 Simulated Switches. (one for each and every degree)

Did they improve her capabilities beyond this?

As far as I know, Alexa cannot announce a line like this with 5 different variables:
“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.”

This is why I created this page as a workaround. I want my speaker to announce more than a predetermined sentence.


#32

I gave my example specifically because it’s similar to this part of your original post

As far as temperatures go - you can query multi sensors for the temperature.


#33

Ahh ok, thanks for clarifying.

I tried to give simple examples in this thread, but in real life, my voice announcements are fairly robust. I have over 50 complex phrases that are spoken outloud (in a thousand different ways if we count the variables).

I will continue to use my webCoRE to Tasker method until Alexa no longer has that limitation.
(Your method might suffice if I only had a few canned responses)


There is no way I could make a SimSwitch for each spoken phrase…

With the current Alexa, the 5 variables in this ONE phrase:

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.

would require over one billion SimSwitches to cover all possible announcements!!!
(1440 x 68 x 20 x 38 x 14 = 1,041,868,800)

I think I prefer just adding one character (®) to my code as described in my original post… :sunglasses: