Amazon Echo Control play Amazon Station


(Scott Johnson) #1

I am enjoying the Amazon Echo Control Binding. This is related to control via rules. No problems whatsoever playing Amazon Music Playlists or TUNEIN stations. I am trying to play an Amazon Music Station and if I keep “fiddling” with the controls it will play some time, but not on a repeatable basis. I am running the latest binding. 2.4.0.201811161948. Has anyone figured out the correct sequence to make an Amazon station play?

This does NOT work:

// Amazon Radio
rule Alexa_Playlist2
when
    Item mhPlaylist2 received update ON
then
	//Echo_Home_MusicProviderId.sendCommand('Amazon Music')
	//Thread::sleep(1000)
	//Echo_Home_AmazonMusicPlayListId.sendCommand('')
	//Thread::sleep(1000)
	Echo_Home_PlayMusicCommand.sendCommand('')
	Thread::sleep(5000)
	Echo_Home_PlayMusicCommand.sendCommand('90s Country')

end

(Vincent Regaud) #2

Please post you item definitions and use the code fences


(Scott Johnson) #3
Group Alexa_Home <player>

// Player control
Player Echo_Home_Player               "Player"                            (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:player"}
Dimmer Echo_Home_Volume               "Volume [%.0f %%]" <soundvolume>    (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:volume"}
Switch Echo_Home_Shuffle              "Shuffle"                           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:shuffle"}

// Player Information
String Echo_Home_ImageUrl             "Image URL"                         (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:imageUrl"}
String Echo_Home_Title                "Title"                             (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:title"}
String Echo_Home_Subtitle1            "Subtitle 1"                        (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:subtitle1"}
String Echo_Home_Subtitle2            "Subtitle 2"                        (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:subtitle2"}
String Echo_Home_ProviderDisplayName  "Provider"                          (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:providerDisplayName"}

// Music provider and start command
String Echo_Home_MusicProviderId      "Music Provider Id"                 (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:musicProviderId"}
String Echo_Home_PlayMusicCommand     "Play music voice command (Write Only)" (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:playMusicVoiceCommand"}
String Echo_Home_StartCommand         "Start Information" (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:startCommand"}

// TuneIn Radio
String Echo_Home_RadioStationId       "TuneIn Radio Station Id"           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:radioStationId"}
Switch Echo_Home_Radio                "TuneIn Radio"                      (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:radio"}

// Amazon Music
String Echo_Home_AmazonMusicTrackId    "Amazon Music Track Id"            (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:amazonMusicTrackId"}
String Echo_Home_AmazonMusicPlayListId "Amazon Music Playlist Id"  (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:amazonMusicPlayListId"}
Switch Echo_Home_AmazonMusic           "Amazon Music"                     (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:amazonMusic"}



// Commands
String Echo_Home_TTS                "Text to Speech"                           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:textToSpeech"}
String Echo_Home_Remind                "Remind"                           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:remind"}
String Echo_Home_PlayAlarmSound         "Play Alarm Sound"                           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:playAlarmSound"}
String Echo_Home_StartRoutine         "Start Routine"                           (Alexa_Home) {channel="amazonechocontrol:echo:account1:echo1:startRoutine"}