Control TuneBlade with Amazon Echo - HowTo!

1,777 views
Skip to first unread message

Chris Marx

unread,
Dec 18, 2016, 12:58:38 PM12/18/16
to Breakfree Audio
I can believe this was that easy. Who needs an app? Just tell Echo to do it. LOL!
Get this Java https://github.com/armzilla/amazon-echo-ha-bridge
Install the JRE from Oracle. http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Log into the HA Bridge. It's the IP of the machine it's running on plus whatever port you set.
Go to Bridge Devices and Click Manual Add.

Name: The name you will use verbally like, "Living Room Audio" without the quotes
Device Type: don't change
On URL: http://192.168.0.165:63245/devices/00A0DEA5D807@RX-V675%20A5D807
You can get your list of devices from TuneBlade by http://Your IP:PORT/devices/ then format it like above.
The same line goes in Dim URL and Off URL.

HTTP Headers: leave Blank
HTTP Verb: PUT
Content Type: Text/Plain
Content Body On: {"Status": "Connect"}
Content Body Dim: ???? Can some help format this? It's JSON formatting
Content Body Off: {"Status": "Disconnect"}

Save it. Tell Alexa to discover devices.
To connect an AirPlay device, just say, "Alexa Turn On the Living Room Audio"


Chris Marx

unread,
Dec 18, 2016, 2:57:35 PM12/18/16
to Breakfree Audio
I tried a string for the Content Body Dim: {"Volume": "${intensity.percent}"}
"Alexa, dim Living Room Audio to 15 percent"

Alexa says Ok, but nothing happens. ${intensity.percent} is the standard variable used in HA Bridge. So it should have sent Volume 15
I'm stumped. I didn't see anything in the TuneBlade logs either. I don't know what was passed to it if anything.

TuneBlade Support

unread,
Dec 19, 2016, 12:27:53 PM12/19/16
to Breakfree Audio
This is great! Thank you for sharing this! 

We tried this and it works amazingly well. The volume control also does works with your template: {"Volume": "${intensity.percent}"}. Probably some invisible invalid character (open/close quote instead of the normal quote) in your string? 

Did you mean this fork of the HA bridge: https://github.com/bwssytems/ha-bridge ?    

Feel free to contact us if you need any support on any further integration.  

Thank you again for sharing this!  

 

Chris Marx

unread,
Dec 20, 2016, 6:08:09 PM12/20/16
to Breakfree Audio
Opps. Yeah the fork by BWSystems is the right one  and that's what I use. I'll double check the Volume string again. I was sick that day and perhaps not all there.
Did you test this with an Amazon echo to see if it actually passed the ${intensity.percent} value?

TuneBlade Support

unread,
Dec 21, 2016, 12:33:54 AM12/21/16
to Breakfree Audio

Yes, we've tested the volume control with the Echo (not the dot though). 


Chris Marx

unread,
Dec 21, 2016, 3:28:02 PM12/21/16
to Breakfree Audio
Same thing, just DOT doesn't have the big speaker. The DOT is a better value at $50 with audio line out anyway.

joey...@gmail.com

unread,
Dec 27, 2016, 7:28:03 PM12/27/16
to Breakfree Audio
Hi Chris,
I have zero experience with Java but I really want to get this working in my house. Would is be too much to ask for your help? If you have the time could you publish detailed instructions for me. I can't seem to even get the github to run with java.

Thanks

Chris Marx

unread,
Dec 28, 2016, 8:14:47 AM12/28/16
to Breakfree Audio, joey...@gmail.com
https://github.com/bwssytems/ha-bridge
I posted the wrong project on the first comment. It was corrected later.

"I can't seem to even get the github to run with java." When you launch HA Bridge JAR it will look like nothing happens. It is a background server. HA Bridge has written a full ReadMe on the main page of how to use it.

You don't need to know anything about Java. Just follow the instructions. Download the JRE and install. Download the HA Bridge. UnZip and place it in a folder. I just make a shortcut and place that in the Windows Startup group. Double click the HA Bridge JAR file to run or reboot if you added it to the StartUp.
You can configure the HA Bridge by typing the PC's IP into a browser or http://localhost
The rest is just a few settings in the GUI of HA Bridge as stated in this discussion.
Message has been deleted

cliff.s...@gmail.com

unread,
Dec 28, 2016, 4:06:31 PM12/28/16
to Breakfree Audio
This is helpful and I am having some luck with controlling my airplay zones.  Is there a way to get Alexa to control the actual music playing on the Windows machine?  What are you all using as your source for music to allow Alexa to control the music that is being sent to your Airplay speakers?  I am using Spotify which Alexa doesn't seem to want to control on the Windows machine. 

Thanks for your help!
Cliff

On Sunday, December 18, 2016 at 12:58:38 PM UTC-5, Chris Marx wrote:

joey...@gmail.com

unread,
Dec 28, 2016, 4:29:35 PM12/28/16
to Breakfree Audio, joey...@gmail.com
Thanks Chris,
I figured out was downloading the developer package and not just the Jar file. I have it up and working now but I have not been able to test with my echo yet.

Chris Marx

unread,
Dec 29, 2016, 7:34:18 AM12/29/16
to Breakfree Audio, cliff.s...@gmail.com
Alexa can control JRiver Media Center with the House Band Skill. It's not the best. There was a Skill in development for Plex. I think we should expect that in 2017.
The best music for Alexa to control is Amazon Music Unlimited. We found the unlimited family package that allow 6 users. It's a better deal than Spotify when you share the costs.

Chris Marx

unread,
Dec 29, 2016, 7:37:32 AM12/29/16
to Breakfree Audio, joey...@gmail.com
Once you have the server setup and it can control TuneBlade from the web interface. Tell Alexa to discover devices. The new devices should show up in your Alexa app. If so, then you can say, "Alexa turn on Living Room Audio."
The invocation command is what you name it in HA Bridge.

joey...@gmail.com

unread,
Dec 29, 2016, 12:10:21 PM12/29/16
to Breakfree Audio, joey...@gmail.com
Okay so I tried to get Alexa to discover my airplay devices and she is not finding anything. I followed all of the instructions from the first post but no luck. Is there something I am missing? If I test the device from the HA bridge should it be successful? Here is a screen shot of one of my devices.
Capture.PNG

Chris Marx

unread,
Dec 30, 2016, 6:25:13 PM12/30/16
to Breakfree Audio, joey...@gmail.com
HTTP Headers should be blank. When you click on Bridges Devices is it listed? Is Alexa on the same Network?

Chris Marx

unread,
Dec 30, 2016, 6:27:05 PM12/30/16
to Breakfree Audio, joey...@gmail.com
Another problem I see is that there is a space between Kitchen and Speakers. You have "Kitchen Speakers". The format is "Kitchen%20Speakers"
%20 is a sub for a space.



On Thursday, December 29, 2016 at 12:10:21 PM UTC-5, joey...@gmail.com wrote:

Chris Marx

unread,
Dec 30, 2016, 6:32:57 PM12/30/16
to Breakfree Audio, joey...@gmail.com
Also in the Bridge Control Tab you need to enter the IP of the machine running HA Bridge. UPNP IP Address: Your Server IP otherwise Alexa won't find anything.


On Thursday, December 29, 2016 at 12:10:21 PM UTC-5, joey...@gmail.com wrote:

joey...@gmail.com

unread,
Dec 30, 2016, 9:18:27 PM12/30/16
to Breakfree Audio, joey...@gmail.com
Thanks Chris that worked for me. So how are you playing audio to your speakers? do you have a physical connection from your echo to the server running tuneblade or can you stream audio from the echo to the tuneblade server? If so how did you set that up?

Chris Marx

unread,
Dec 31, 2016, 8:30:21 AM12/31/16
to Breakfree Audio, joey...@gmail.com
Only two ways to get audio from an Echo Dot. BlueTooth or line out. I use the line out for better audio quality. BlueTooth has a muddy sound.
I connected the Echo Dot to a USB DAC Behringer UCA222. TuneBlade captures that USB audio in. You can try the line in on the PC.


On Friday, December 30, 2016 at 9:18:27 PM UTC-5, joey...@gmail.com wrote:
Thanks Chris that worked for me. So how are you playing audio to your speakers? do you have a physical connection from your echo to the server running tuneblade or can you stream audio from the echo to the tuneblade server? If so how did you set that up?

On Friday, December 30, 2016 at 3:32:57 PM UTC-8, Chris Marx wrote:
Also in the Bridge Control Tab you need to enter the IP of the machine running HA Bridge. UPNP IP Address: Your Server IP otherwise Alexa won't find anything.
 sound.

acc...@gmail.com

unread,
Jan 2, 2017, 10:25:40 PM1/2/17
to Breakfree Audio
Thanks for sharing this.

I've logged into the HA Bridge and am now trying to get my "list of devices", but am stuck.
  --> You can get your list of devices from TuneBlade by http://Your IP:PORT/devices/ then format it like above.
I'm trying to use my local IP address and port 8080 (which I'm using for the HA Bridge), but I get a "refused to connect" message in my browser (Chrome).

Any guidance on what I'm doing wrong?

Thanks for any assistance!

acc...@gmail.com

unread,
Jan 3, 2017, 8:42:42 PM1/3/17
to Breakfree Audio
Thanks again, I got mine working now.  Here are the steps I used (welcome edits or corrections):

Setting up Amazon Alexa to use TuneBlade to connect to an Airplay speaker

Assumptions:  You have an Alexa device (Echo, Dot), You have TuneBlade and Java installed, You have an AirPlay device entered in TuneBlade

Establish HA Bridge on machine running TuneBlade:
1.  Download JAR file of BWS Systems HA Bridge:  https://github.com/bwssytems/ha-bridge/releases
2.  Execute JAR file (from CMD prompt) by entering the following command:  java -jar ha-bridge-3.5.1.jar --upnp.config.address=192.168.x.xxx  (jar filename should match your downloaded file, use your machines local IP address)
3.  Confirm HA Bridge is running: http://localhost/#

Find TuneBlade devices and create URL string:
4.  Start TuneBlade (from CMD prompt): TuneBlade.exe StartHttpControl Port=51497  (choose your port)
5.  View TuneBlade Device details: http://localhost:51497/devices  (port number must match step 5)
6.  Copy your Device ID:
  Example entry from http://localhost:51497/devices: [{"ID":"20C9D0991A48@Main Floor","Name":"Main Floor","Volume":49,"Status":"Connected","SubState":"Streaming","Buffering":false,"BufferingPercent":0},
Example ID to copy : 20C9D0991A48@Main Floor
7.  Substitute any spaces with "%20" and add it to the following string: http://192.168.x.xx:51497/devices/   (use your IP address and the port chosen in step 4)

Create a Manual entry in HA Bridge:
7.  Return to HA Bridge: http://localhost/#
8.  Under "Home", click "Manual Add"
9.  Enter the following variables using the string from step 7 (all three entries are the same):
10. Enter the following variables:
Name: Main Floor (choose whatever you want your verbal keyword to be)
Http Verb: PUT
Content Type: Text/Plain
Content Body On: {"Status": "Connect"}
Content Body Dim: {"Volume": "${intensity.percent}"}
Content Body Off:{"Status": "Disconnect"}
11. Click "Add Bridge Device"

Discover with Alexa
12. Run "Discover Devices" from Alexa
13. Speak to Alexa!  Example: "Alexa, Turn on Main Floor"

Run at Startup on machine running TuneBlade and HA Bridge
13. Create a batch file to run the HA Bridge and Tuneblade at startup (steps 2 and 4)

Hope this helps!

On Sunday, December 18, 2016 at 11:58:38 AM UTC-6, Chris Marx wrote:

TuneBlade Support

unread,
Jan 4, 2017, 4:18:06 PM1/4/17
to Breakfree Audio
This is very helpful! Thanks! 

Just to add, in step 4, you can alternatively set the port number of TuneBlade remote in TuneBlade preferences > Remote Control tab:





Chris Marx

unread,
Jan 6, 2017, 6:50:41 AM1/6/17
to Breakfree Audio, acc...@gmail.com
No need for the cmd line. If you installed JRE then just add a ShortCut of HABridge jar in the startup folder of Windows. You can set the UPNP IP in the HA Bridge interface. It will save it in it's config for the next time it is launched. Just remember the IP and you can access it from any machine on your network. It runs on port 80 by default.TuneBlade has a check box option to start automatically also.
After you get it setup, Use HA Bridge to backup your devices in case something goes wrong. So far this is a solid system. Ours runs 24/7 and works great. You can also install an Android app called Alexa Listens on your phone or smart watch. Now you can issue voice commands even when you are not next to an Echo Dot. I have 5 Audio Zones through the house. So I'm not always within ear shot of the Echo.
To make this even more fun, integrate you audio amps with Zwave switches controlled by a Vera MiOS. HA Bridge connects to that. Now Echo can control Scenes.

Pete Fletcher

unread,
Jan 18, 2017, 4:43:08 PM1/18/17
to Breakfree Audio
This is great and works a treat. Thanks for sharing.
Message has been deleted

dougcl...@gmail.com

unread,
Feb 4, 2017, 7:14:11 PM2/4/17
to Breakfree Audio
I set this up and it works great!  3 Airport Express Receivers for Outside, Kitchen and the Living/Dining Room Area.  1 Bluetooth Receiver on the PC along with TuneBlade and HA Bridge.  I can toggle on off speakers, set volumes, start playing songs or radio stations all with my voice.  Simply say "Alexa turn off Bluetooth" and everything is back to local Dot use.  Thanks for sharing!


On Sunday, December 18, 2016 at 12:58:38 PM UTC-5, Chris Marx wrote:
Message has been deleted

shane.t...@gmail.com

unread,
Feb 21, 2017, 9:43:51 AM2/21/17
to Breakfree Audio
Can you please update the config for the new version. Im getting an error saying it cant control the device state? 

Thanks 

Chris Marx

unread,
Feb 21, 2017, 2:07:42 PM2/21/17
to Breakfree Audio, shane.t...@gmail.com
I don't know of any new versions. I run TuneBlade 1.6.3.0 and the latest HA Bridge.
I have seen a device get corrupted and not work. Just delete it and recreate it. One other problem I ran into on Win10 was app permissions of HA Bridge. If it can't write to it's directory it won't work. I just place the folder in My Documents and that works fine. Also make sure the port is correct.

shane.t...@gmail.com

unread,
Feb 21, 2017, 9:14:20 PM2/21/17
to Breakfree Audio, shane.t...@gmail.com
Thanks, 

Sorry I wasn't very clear, the HA Bridge config has changed a bit since Tuneblade posted that domo config. Im just not sure values go where now. Could someone post a screen shot so I can see?

I moved the folder, but no luck. Im pretty sure i just dont have the right things in the right place 

shane.t...@gmail.com

unread,
Feb 22, 2017, 12:39:58 AM2/22/17
to Breakfree Audio, shane.t...@gmail.com
Error on calling url to change device state is the error im getting.

shane.t...@gmail.com

unread,
Feb 22, 2017, 12:42:24 AM2/22/17
to Breakfree Audio, shane.t...@gmail.com
But, if I actually use the URL, it gives me the 

{"ID":"XXXXXXX@Lounge","Name":"Lounge","Volume":75,"Status":"Connected","SubState":"Standby","Buffering":false,"BufferingPercent":0}

shane.t...@gmail.com

unread,
Feb 22, 2017, 12:45:26 AM2/22/17
to Breakfree Audio, acc...@gmail.com
You need to use the same IP as the machine where tune blade is installed, not the HA Bridge

shane.t...@gmail.com

unread,
Feb 22, 2017, 1:07:47 AM2/22/17
to Breakfree Audio, shane.t...@gmail.com
Hey, thanks again, 

I think you may have been right with the permissions issues, changed the folder permissions, but now im getting 

Could not find device: 1 for hue state change request: test from 192.168.190.12 body: {"on":true}

HAHA always something! 

On Wednesday, 22 February 2017 06:07:42 UTC+11, Chris Marx wrote:

dougcl...@gmail.com

unread,
Feb 22, 2017, 8:12:48 AM2/22/17
to Breakfree Audio
I have the new HA Bridge working with Tune Blade.  Here is a screenshot that works for me,  -Doug
Capture.JPG

shane.t...@gmail.com

unread,
Feb 22, 2017, 9:52:02 PM2/22/17
to Breakfree Audio, dougcl...@gmail.com
THANK YOU SO MUCH!!!!!

Thats what I needed, I had things in the wrong place and this fixed everything. Now have TuneBlade working though the bridge. 

Awesome 

in2su...@gmail.com

unread,
Dec 15, 2017, 5:08:16 PM12/15/17
to Breakfree Audio
Not sure anyone was missing this, but I struggled to find the port on the TuneBlade... that is because I just clicked on it on the win 10 machine in the Programs Menu, instead, I had to start it from command line:
C:\Program Files (x86)\TuneBlade\TuneBlade>TuneBlade.exe StartHttpControl Port=51497

once I done that, I could go to the PC that had TuneBlade and enter 
http://localhost:51497/devices

and get the device list.

once you have that, you can go back to the HA Bridge and configure it as explained above.

I hope that this helps someone!

PS: This will allow you to turn on the air-player receivers. But, I was hoping to play from the Echo Dot directly through the receiver, but this would allow you to physically connect to receiver, not play to the receiver. Too bad, my search continues to air-play from Echo WITHOUT a hardware piece physically connected to the Echo. I'm OK having a device in the network doing any conversion, but not beside the Echo (connected to a cable and then streaming from there...)

Cheers,
Hans

rachelg...@gmail.com

unread,
Dec 27, 2017, 10:28:56 PM12/27/17
to Breakfree Audio
Hans I think we are in the same boat... I got echo dots for my mother for christmas, and wanted to hook them up to her in-ceiling speakers in four separate areas of the house. Turns out all the speakers are set up through airport express receivers and can't connect to the dot. Then, i bought four bluetooth receivers since Echo can connect to bluetooth, but the echo dot keeps rotating through each of the bluetooths and won't stay connected to one because all the receivers are stored next to each other in the same cabinet, not in each separate location. Came across this page thinking I could indeed use the airport expresses to play music through the dot, only to see your PS. Any other suggestions, or do you perhaps know why the echo is rotating through the four different bluetooth speakers and won't let me stay connected to just one?

Thanks in advance,
Rachel

in2su...@gmail.com

unread,
Jan 10, 2018, 10:15:06 PM1/10/18
to Breakfree Audio
Rachel, I haven’t found a solution yet. As I mentioned, the solution above requires the dot to be physically connected to a server(running the App), that Server would then stream it to the airport receivers.
Anyhow, I currently have it connected to one receiver (Denon S910W) via Bluetooth, the other receiver is in a different floor and it doesn’t have Bluetooth, just airport. Fortunately both receivers support Spotify, so I play directly from Spotify and controlling what is playing via my phone, but unfortunately no Alexa in this scenario.
I have posted I. The Spotify forum a suggestion for them to improve their Alexa skill to allow you to chose where you play... this whole technology is just beginning; there are lots of gaps and possibilities!

mark.s...@gmail.com

unread,
Jan 31, 2018, 2:15:49 AM1/31/18
to Breakfree Audio
Will this work for multiple echos around the house?

For example, my PC is in one room connected to a dot, but I issue the verbal command for Alexa to play music in the living room from, say, the kitchen echo; which is in another room from the PC dot?

Read this with interest and want to know if it suits my setup before I set off down the installation route.

Thanks.

qqaa...@yahoo.com

unread,
Apr 29, 2018, 11:08:18 PM4/29/18
to Breakfree Audio
Can this control the tuneblade master volume for all devices, through Alexa?

fred fontaine

unread,
Dec 12, 2020, 2:31:05 PM12/12/20
to Breakfree Audio
All set up and I can't get Alexa to see HA bridge devices. HELP!! 
Reply all
Reply to author
Forward
0 new messages