Amazon Music on OSx with Python or applescript

Posted on
Sat Dec 10, 2016 5:23 pm
dz1rfj offline
Posts: 136
Joined: Mar 13, 2016

Amazon Music on OSx with Python or applescript

I can get applescript to start music box, and play a playlist via imperihome tablet, or alexa echo / dot , both activating an indigo action group. I do this today from applescript.

If anyone has been able to do this with Amazon music, selecting a playlist, and playing it , please share a working script example. Pandora is ok, but want to look into amazon music also.

Thanks :D

Thanks
-Brian

Posted on
Sat Dec 10, 2016 5:26 pm
Different Computers offline
User avatar
Posts: 2549
Joined: Jan 02, 2016
Location: East Coast

Re: Amazon Music on OSx with Python or applescript

This would be great. Since I have Prime for other reasons, Amazon's lack of integration is the main reason I don't use it.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Dec 12, 2016 9:17 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Amazon Music on OSx with Python or applescript

Perhaps you could go this route:

Add a dot to your indigo server (Audio line out on dot to line-in on server computer) = Airfoil source.

Next, add (publish to Alexa) virtual devices that speak. So if any alexa device in the house hears (Turn on house audio) or (Turn off house audio) then it turns on/off the alexa published virtual device "house audio". The actions for on = turn on airfoil speakers and Speak "Alexa, play Pantera" and the opposite for off.

I asked rogue amoeba if they will integrate with Amazon Music.... still waiting on a reply.

Bill
My Plugin: My People

Posted on
Mon Dec 12, 2016 2:07 pm
dz1rfj offline
Posts: 136
Joined: Mar 13, 2016

Re: Amazon Music on OSx with Python or applescript

I have a DOT connected to line in, and if I am in office, works fine, or I have the echo remote paired to same DOT, works fine, but please tell me more about a virtual device that speaks. So this device would activate the one DOT that is connected to the Mac ? Thanks


Sent from my iPhone using Tapatalk

Thanks
-Brian

Posted on
Mon Dec 12, 2016 2:30 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Amazon Music on OSx with Python or applescript

dz1rfj wrote:
more about a virtual device that speaks.


Here is the 'How To' with Virtual Devices http://wiki.indigodomo.com/doku.php?id=plugins:devicecollection

Since you can't add an Action as a device to Alexa.... You create a Virtual device. You will need to create the backbone to each virtual device. (Actions and a Variable) An action for when the virtual device turns on, one for off and one for toggle. Then you can even create a variable for your new Virtual Device to track it's state.

The remainder is done with new actions. You can add any action... turn on crap, etc.... but at the bottom of the Edit Action Group, I use "Speak: Alexa,, Play Metallica" and that is my On command. I needed two commas after Alexa to give her an extra second to pay attention.

It works... lots of room for error. Guy is outside my office mowing right now so I had to execute the command three times for her to hear it correctly. But usually it works fine. It is a little weird having devices talking to each other... like with actual words. Fast forward a year from now and I will probably walk in on an argument between tech devices.

The problem is naming the Virtual Device so it doesn't confuse Alexa when you verbally give the command to another Alexa Device. If I name the Virtual Device "Play Metallica" and I tell my living room Echo "Play Metallic On".... it will just play Metallica in that room. So I called it "Airfoil". So my verbal command to Living room Echo is "Turn Airfoil On" (Which then turns 'On' the Virtual Device which runs the "Airfoil On" Action Group which Switches Source to Input, Turn on Airfoil Speakers, Speak "Alexa,, Play Metallica".

As long as the Dot is close enough to hear the itty-bitty MacMini speaker.... it should work for you.

I hope someone writes a Amazon Skill that allows you to control one Alexa device from another. But this lets me sorta do it until then.

Bill
My Plugin: My People

Posted on
Mon Dec 12, 2016 6:28 pm
dz1rfj offline
Posts: 136
Joined: Mar 13, 2016

Re: Amazon Music on OSx with Python or applescript

whmoorejr wrote:
dz1rfj wrote:
more about a virtual device that speaks.


Here is the 'How To' with Virtual Devices http://wiki.indigodomo.com/doku.php?id=plugins:devicecollection

Since you can't add an Action as a device to Alexa.... You create a Virtual device. You will need to create the backbone to each virtual device. (Actions and a Variable) An action for when the virtual device turns on, one for off and one for toggle. Then you can even create a variable for your new Virtual Device to track it's state.

The remainder is done with new actions. You can add any action... turn on crap, etc.... but at the bottom of the Edit Action Group, I use "Speak: Alexa,, Play Metallica" and that is my On command. I needed two commas after Alexa to give her an extra second to pay attention.

It works... lots of room for error. Guy is outside my office mowing right now so I had to execute the command three times for her to hear it correctly. But usually it works fine. It is a little weird having devices talking to each other... like with actual words. Fast forward a year from now and I will probably walk in on an argument between tech devices.

The problem is naming the Virtual Device so it doesn't confuse Alexa when you verbally give the command to another Alexa Device. If I name the Virtual Device "Play Metallica" and I tell my living room Echo "Play Metallic On".... it will just play Metallica in that room. So I called it "Airfoil". So my verbal command to Living room Echo is "Turn Airfoil On" (Which then turns 'On' the Virtual Device which runs the "Airfoil On" Action Group which Switches Source to Input, Turn on Airfoil Speakers, Speak "Alexa,, Play Metallica".

As long as the Dot is close enough to hear the itty-bitty MacMini speaker.... it should work for you.

I hope someone writes a Amazon Skill that allows you to control one Alexa device from another. But this lets me sorta do it until then.


Tricky stuff :-)

I am with ya, so no virtual device that will talk to a main Alexa over Ethernet , you do it by activating the ability connected echo using a speaker.

Yeah, I have like vSoft, vMedium, vpoolUp connected to Alexa as soft , medium, pool up to activate airfoil scenes . (I add a lower case v to help me identify it as a virtual device )

Unrelated, but an echo work around I do is turn on intercom, Daniel , my British indigo voice comes over all speakers and say I will now allow Alexa to use my speakers to send a message, then the DOT in my office changes input to built in input, and I can use my echo remote to say " Simon says : kids dad has fallen and can't get up" and of course the leave their steam games and run to my rescue. I leave that source on for 60 seconds in case I need to repeat my call for help :-(

Fun stuff seeing how we all integrate this stuff. Thanks for sharing




Sent from my iPhone using Tapatalk

Thanks
-Brian

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests