Jump to content

Any way to get the ISY to play an MP3 file through Alexa?


madmartian

Recommended Posts

I'm basically trying to use Alexa as a doorbell chime. Specifically, I want her to play 15 seconds of a specific song when someone rings the bell. Detecting the ring and triggering a program in the ISY is the easy part. How do I get the ISY to play a sound file on Alexa? Playing a song from Spotify isn't good enough - I want a 15-second clip, not a whole song. Also, I want it to play on all my Echoes at once so it won't matter what room I'm in.

Link to comment
14 hours ago, madmartian said:

Also, I want it to play on all my Echoes at once so it won't matter what room I'm in.

Alexa routines will let you play the song, and you can even stop it after 15 seconds, however that only gets it on one device.

Then there's Alexa Custom Command under routines.  That's were you type what you would say out loud to her and she does it as part of the routine, so you can use the Custom Command under routines to "Play XXXXX by YYYY on everywhere"  (or whatever the name of your everywhere speaker group is).  The problem is tho, you can only use one Custom Command per routine and it has to be the last item in the routine..... so I don't think you can stop it after 15 seconds.

I have an idea to get around it but you'll have to play around and see if it works, this part is uncharted territory..... have the ISY trigger two routines, one to start the song using a custom command "Play XXXXX by YYYY on everywhere" then have the ISY wait the 15 seconds and trigger a second routine to "Stop playing".

Then there's Alexa Blueprints, that's like making your own Alexa app so you should be able to make it work using that... but so far that's above my pay grade so if you have to take that route then "glhf"

Link to comment
14 hours ago, madmartian said:

I'm basically trying to use Alexa as a doorbell chime. Specifically, I want her to play 15 seconds of a specific song when someone rings the bell. Detecting the ring and triggering a program in the ISY is the easy part. How do I get the ISY to play a sound file on Alexa? Playing a song from Spotify isn't good enough - I want a 15-second clip, not a whole song. Also, I want it to play on all my Echoes at once so it won't matter what room I'm in.

I have a program based on a motion sensor and Alexa routine whereby Alexa announces when someone enters our home. I assume that the announcement can be replaced with a song, or a radio station, and  (though I may be wrong on this)  add a wait 15 seconds instructions to end the song. In my case the issue is that, because the motion sensor is Zwave, there is a delay of several seconds between the trigger and the announcement.

Link to comment
1 hour ago, asbril said:

I have a program based on a motion sensor and Alexa routine whereby Alexa announces when someone enters our home. I assume that the announcement can be replaced with a song, or a radio station, and  (though I may be wrong on this)  add a wait 15 seconds instructions to end the song. In my case the issue is that, because the motion sensor is Zwave, there is a delay of several seconds between the trigger and the announcement.

Are you talking about an ISY program or a computer program? If ISY, can you screenshot the program and post it here? Thanks much.

Link to comment

Thanks for the replies. I am playing around with Alexa Routines and have run into the following issues:

1. I have to choose a specific Alexa device to play on. It will not let me choose "everywhere" or a custom group if I am not using the custom command.

2. While it will play a song, I must choose the length of time in 5 second increments. I can play the song for 10 seconds or 15 seconds, but not 12 seconds. (again, when not using the custom command)

3. I must play the song from the beginning - I can't choose to skip any. My desire to play Devo's "There's No Place Like Home" as my doorbell won't work since the song does not begin with the chorus.

4. I tried the custom command, which does work on "everywhere", but there is a six-second delay. This appears to be an artifact of the "everywhere" command as there is a three-second delay when I play spotify on my PC to "everywhere" that otherwise isn't there when I play to one device.

5. I found I can add "for 15 seconds" to the end of the custom command, and that works, but then Alexa will say "playing for 15 seconds or until the end of the song" before the song starts. Quite annoying!

6. Reading the ISY/Alexa instructions, I found I can setup motion sensors and contact sensors to trigger Alexa Routines. However in practice this did not work so well. I tried to setup three different remotes as contact sensors and none of them worked to trigger the routine. I also tried telling Alexa they were motion sensors (following the removal and rediscovery protocols) but that didn't work either. Only actual motion sensors set as motion sensors worked to trigger the routine. False triggers make a motion sensor terribly impractical for a doorbell, though.

Link to comment

Thanks to Asbril and MrBill, I was able to get this to work with remotes. You have to do the following:

  1. Set a state (not integer) variable in the ISY
  2. Create a program with an "if" that says "control [your remote button] is on"
  3. Set the "then" to "variable [your variable] = 1
  4. add to "then": "wait 15 seconds"
  5. add to "then": "variable [your variable] = 0
  6. In the ISY portal Amazon Echo Device List, select add variable and select the desired variable, setting the trigger to "1"
  7. Ask Alexa to discover devices.
  8. When setting a trigger in Alexa Routines, click on Smarthome and select the trigger you setup.
  9. Set a custom response to "play [song name] by [artist] to everywhere for [# of seconds] seconds"

I can now use the GoControl WA00Z-1 as a doorbell. I added both buttons in the "if" statement so either one will work. These are super cheap, by the way, going for about $12. They are being closed out on Amazon, Ebay, and here:

https://www.zwaveproducts.com/products/gocontrol-z-wave-scene-controller-wall-switch-wa00z-1

Get 'em while you can!

The only issues remaining are the delay and Alexa saying  "playing for 15 seconds or until end of the song" before the song starts. I googled this but could not find a single inquiry about it. Sadly, Alexa's "brief mode" has no affect on this. Just one of many things I wish I could get Alexa to stop saying, along with "playing from [device name]" when my tablet connects to Alexa via Bluetooth. <sigh>

 

Link to comment
6 hours ago, madmartian said:

The only issues remaining are the delay and Alexa saying  "playing for 15 seconds or until end of the song" before the song starts. I googled this but could not find a single inquiry about it. Sadly, Alexa's "brief mode" has no affect on this. Just one of many things I wish I could get Alexa to stop saying, along with "playing from [device name]" when my tablet connects to Alexa via Bluetooth. <sigh>

It's annoying that "brief mode" doesn't actually eliminate some things or make everything "brief" every night i say "sleep timer 90 minutes" and she has to say "OK I will stop playing in 1 hour and 30 minutes" brief mode should make that "ok, 90 minutes".  Another one is "Play KKLZ" she has a whole sentence about how she's getting my 96.3 Las Vegas station from iheartradio.  It  might be interesting the first time but after years of telling me the same things shes getting annoying with her wordyness.

Link to comment

Why don't you just edit an mp3 file to be 15 seconds long (with the part you want).  That's what I do (you will need to upload the file to a music service such as Apple Music and tell Alexa to use that service).
 

On 2/19/2021 at 2:56 PM, MrBill said:

Then there's Alexa Custom Command under routines.  That's were you type what you would say out loud to her and she does it as part of the routine, so you can use the Custom Command under routines to "Play XXXXX by YYYY on everywhere"

Thanks for this tip.  Previously I was only able to get the song on one echo device.

Now I am able to play on all.

Link to comment
5 hours ago, gzahar said:

Why don't you just edit an mp3 file to be 15 seconds long (with the part you want).  That's what I do (you will need to upload the file to a music service such as Apple Music and tell Alexa to use that service).

I use Spotify. While it does let you add your own files to the library, it only lets you use them on the device they are stored on. Playing on Everywhere automatically skips manually added files.

Link to comment

I don't use Alexa, but on Google Home I have found that I can add videos to Youtube and get Google home to play them from any device.  I have created little home automation instructions for specific guest rooms and have them associated with the room. Maybe you can do the same thing on Alexa to get the audio you want to play.

Link to comment
14 hours ago, gzahar said:

Why don't you just edit an mp3 file to be 15 seconds long (with the part you want).  That's what I do (you will need to upload the file to a music service such as Apple Music and tell Alexa to use that service).

Do you know of a place to upload a clip?  I don't know of anyway to upload and play such a clip on echo.  I'd love to be able to, I have a 7 attention chime I'd love to use.

Link to comment
1 hour ago, MrBill said:

Do you know of a place to upload a clip?  I don't know of anyway to upload and play such a clip on echo.  I'd love to be able to, I have a 7 attention chime I'd love to use.

You can use a local Plex Media Server and the Plex Skill to play local music on an echo. 

Link to comment
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...