Virtual Switch to Play Amazon Music Station


#1

I have the following piston to to play an Amazon Music station when I turn on a virtual switch in Action Tiles. When I turn off the switch it stops playing music. I have additional switches for other music genres. The process works find if I turn off the switch of the station playing before I turn on the next switch for another station.

What do I need to do to make is so I can turn on the next station and it turns off the one playing before it starts to play?


#2

You can turn OFF all other switches in the piston so you don’t have to do it manually.
let’s say you have 3 switches (3 genres)

IF switch 1 changes to ON
Then
Switch 2 and 3 
do TURN OFF

IF switch 2 changes to ON
Then 
Switch 1 and 3 
do turn OFF

IF switch 3 changes to ON
then 
Switch 1 and 2 
Do turn OFF

#3

I am not at home to try it out now, is this what I need to do?


#4

Great start… But you need other pistons to tell your system what will happen IF/WHEN those switches turn OFF…
Turning switches 5,8 and 10 OFF need to trigger other pistons…


#5

one other way would be using expressions but I’m not that advanced. No idea how to use expressions…


#6

OK, I will look into your suggestions. Thanks for your help.


#7

The pistons work like I need them too. There is only one weird issued. I have switches for 4 stations all created the same way but only my 80s station switch announces the amazon station before it begins to play. Here is my 80s piston and another station. I do not know why they would behave differently.



#8

I wish I were home so I could test your pistons first.
I’m not sure why they behave differently???
Could it be the sequence?
Meaning,
no music… you select a station… announcement… you select another station… no announcement…

Have you tried different variations?

no music…you select a station… announcement… you stop the player (maybe from app - just for testing - choose another station…


#9

I have tried different sequences and only the 80s station announces the station using the switches.


#10

Just guessing here, but maybe “All 80’s” is the actual name of a playlist, and “Top Country” is perhaps a search term?


#11

My only workaround suggestion would be “speak text”

Speak text "Top country station is playing now"
Wait 5 seconds.
Play top country station

It would be 2-3 seconds for the announcement and station starts right after…


#12

They are both station names in amazon music.

I have even tried ‘station top country’ as the search term and it still does not anounce the station like all 80s.


#13

Thanks for the feedback, @dman97… but technically, that screenshot does not totally rule out my possibility…

In other words, “Recently Played” shows what played last… It does not mean those are “official” playlists…

To test this, try:
searchAmazonMusic('Banana');

My guess is it does a search… but does not announce it… and the next time you load Amazon Music, then “Banana” will be in that list.


PS. I really like Ike’s workaround.


#14

I will stick with Ike’s workaround. thanks.

I am now trying to get a speaker group working with echo speaks using the same piston format but it is not working. I will get a white ring light to come on my dot when I turn on the switch but no music. I am able to play music to the group throught he alexa app. Does anyone have any suggestions?
Here is my piston