Sending Custom Commands

Hey, I added my Echo devices to Smartthings using “Echo Speaks”, a somewhat convoluted process that I won’t go into.

What I was curious about was the possibility of being able to send custom commands. I was thinking of a Dashboard with all my favorite albums, a virtual home jukebox.

Here is a list of supported commands.
https://tonesto7.github.io/echo-speaks-docs/#/docs/devices/deviceCommands/musicCommands

This is what it looks like in Sharptools while playing.
image

I’m hoping Amazon comes out with native integration but until that happens I’m curious about how feasible it would be to have a “programmable” tile?

1 Like

You can do this with the SharpTools Rule Engine. You can create a rule and then run that rule directly from your dashboard. :sunglasses:

Sometimes I’ll create a rule with just a single action with a custom command on a device just so I can run it from the dashboard.

@james do you still have Echo Speaks setup?

1 Like

@Gary_Milne, as @josh mentioned, you can create a rule to have Echo to search for the album name, and play at certain volume through Rule Engine.
See my example rule below to have my echo play “Appetite for Destruction” album from Spotify at volume 40. (You don’t need set trigger here if you are going to trigger it from dashboard tap.)

Please note that you’ll need to toggle the “advanced” option and set the first argument as STRING for the album name, 2nd argument as NUMBER for the volume, and remove the 3rd argument if you don’t want it to stop playing after certain time. I need to investigate why the default arguments’ order is not following what is defined in the Echo Speak DH though.
command "searchSpotify", ["string", "number", "number"]

Once the rule is created, you can then add this rule as rule tile in the dashboard.


Then tap the rule tile to rock. :sunglasses:

2 Likes

Now I understand the nature of the “Advanced” option in rules it has some interesting possibilities. However at the moment I cannot replicate your results.

I don’t have Spotify but I have all my Music on Amazon so a verbal command “Alexa, play my album Greatest Hits by Bob Seger” will work for example.

I get no sound nor do I get an eMail.

Tried some other album titles

Same result, no music and no eMail.

Saying “Alexa, play bat out of hell” works so I don’t think the problem lies there.

Without getting the eMail it seems to me the execution of the rule. On a related note when I click the rule tile it would be nice to get a “Command Sent” that I see for other executions. Without it I’m not sure if the command is actually getting and failing or not getting sent at all.

It sounds the rule wasn’t triggered from your tile touch. It does show “Executing rule…” when I touched my tile, like “Command Sent” message from a device tile touch.

Did you test the tile while you were in the “edit” mode? If you see the “…:” and “dragging” mouse cursor, then you are in the edit mode.
image

BTW, I just tested “searchAmazonMusic” command with the similar action settings, and it works for me too.

I just get the click effect on the rule tile but not the “Executing Rule” statement. I’ll send video via e-Mail.

Thanks - we got it. I saw your mention in the email that AdBlock was disabled on SharpTools.io on this PCs browser.

Have you tried the rule tile on your iPad? Just want to try to rule out a browser plugin causing issues.

I get the same outcome on Chrome on my iPad.

Created a brand new dashboard on my account called Music, put on the rule tile and the Echo Speaks device and the rule fired and the correct music played.

Don’t have any more time at the moment.

2 Likes

Just so you know the rules seem to execute on all of my Dashboards except for the one called “Test”. I don’t care if you fix it in my instance, but you should know you have a latent bug that will be sure to manifest sometime in the future.

Interesting, I will look into this. We didn’t do anything to your particular dashboard(s), so I am curious what was the cause. Thanks for reporting.

I don’t know the cause. It works on all dashboards except the one called test. None of the rules on that dashboard execute, hence the bug report.

@Gary_Milne it sounds like the dashboard security (or individual tile security) might be set to View Only.

To change the dashboard security back to the default:

  1. Open your desired dashboard
  2. Tap the ... menu in the bottom-right corner and select Configuration
  3. Scroll down to the Security section and switch the Make all tiles ‘view only’ setting off

Josh, you were spot on with your diagnosis. Perhaps an on screen indicator of being in View only mode would be helpful.

2 Likes

Wow. I am using Webcore for playlist shortcuts with Echo Speaks. I had no idea rule tiles could do this! Game changer. Thanks all.

2 Likes