Add support for "Tuneblade windows" (airplay multi room)

Tuneblade is a piece of software that runs on windows.
what it does is rather simple. Its like a poor man’s Sonos multiroom in sync audio setup.

http://www.tuneblade.com/

Tuneblade transmits the audio rendered on the host machine running tuneblade to one or more airplay devices with audio 100% in sync.
Ideal for multi room audio.
eg. playing back spotify on the tuneblade machine would have the spotify audio rendered on multiple airport endpoints. A good client would be a rpi running shairport-sync.

The API would make it possible to enable/disable rendering to airplay clients as well as controlling their individual volume.

API details:
http://www.tuneblade.com/developer/

Hi @gibman ,
I’ve created a custom component for this. If you are still interested I can share it.
It’s not the most elegant solution but works well for me.

Hi @carlitoska, I am interested in your Tuneblade integration.
Thank you!

Hi @JeeCee,
Download it from here. Let me know if it works well or you have any problem setting it up.

Hi, thanks a lot, works perfect!
Only thing I changed was to display “playing” state only when substate = “streaming”.

@JeeCee Good to hear! Thanks for the feedback, state change update makes sense

Hello, I’m using your custom component, but it stop working after update to core-2021.3.2
Can you help me? Thanks in advance

Hello!
I’ve updated the package. It is available at the same URL as before. Let me know if this works for you.

Oh thank you very much, but unfortunately the link is broken

Sorry it worked when I posted. Not sure what happened. Please try this link

Thank you so much, the component works fine! So glad for your help!!!

Great to read! Thanks for the feedback!

1 Like

Hello! There is a way to control master volume of TuneBlade?
Thanks

Hello

here a message from the last update of Home Assistant core

2022-01-09 15:58:27 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that called async_timeout.timeout with loop keyword argument. The loop keyword argument is deprecated and calls will fail after Home Assistant 2022.2. Please report issue to the custom component author for tune_blade using this method at custom_components/tune_blade/media_player.py, line 172: with async_timeout.timeout(TIMEOUT, loop=self.hass.loop):

Thanks in advance

There’s a version available in HACS if you are interested. Supports master volume too.

Hey, thank you for the answer. I installed through HACS but I can’t find the TuneBlade integration and I can’t declare manually in the configuration.yaml
Can you please help me?

Yeah it doesn’t support config via yaml, you need to use the add integration option in Devices and Services. Should appear as long as you have restarted since adding from HACS

After a few attempt, I did it ! Thanks

hello, i spent about a week working on this project. Unfortunately the hacs add-ons didn’t work for me. So I designed a simple code that works with automation to control tuneblade in http request directly on the target machine with their api.

it is possible to reduce the code a little, because I use sensors which convert the value into % of the volume (it just removes the % in reality) but I will use it for something else later.

I can explain how it works for those who are interested, but the advantage is that it doesn’t require any particular update. here is :

Configuration.yaml:



#Activation switch for connecting airplay devices to the tuneblade server
switch:
  - platform: command_line
    switches:
      connect_airplay_receiver_man_cave_kazador_noir:
        command_on: "curl -X GET  http://192.168.1.199:6666/v2/123456789/Status/Connect"
        command_off: "curl -X GET  http://192.168.1.199:6666/v2/123456789/Status/Disconnect"

# Shell command for sending http command to tuneblade server
shell_command:
  volume_man_cave_kazador_noir: "curl -X GET http://192.168.1.199:6666/v2/123456789/Volume/{{ states.sensor.volume_man_cave_kazador_noir_value.state }}"

#Airplay device volume control button
input_number:
  volume_man_cave_kazador_noir:
    name: Volume Man Cave Kazador Noir
    min: 0
    max: 100
    step: 1
    unit_of_measurement: "%"
    initial: 50
    icon: mdi:volume-high

Automation.yaml

#Automation for triggering input_number value change and sending value in http for volume control
- alias: "Control volume"
  trigger:
    platform: state
    entity_id: input_number.volume_man_cave_kazador_noir
  action:
    service: shell_command.volume_man_cave_kazador_noir


explanation :
-the ip address of your machine hosting your tuneblade (here 192.168.1.199)
-The port directly configure in tuneblade for the remote control (here 6666)
The ID of your target device (here a homepod mini 123456789)

There is no particular design made for the moment on this code, but it allows to connect a specific airplay device, and to control the volume.

An automation allows you to control several devices in this way and synchronize their connection according to what you want.

On your lovelace dashboard, for this example you will need this code to have the corresponding buttons:


type: entities
entities:
  - entity: switch.connect_airplay_receiver_man_cave_kazador_noir
  - entity: sensor.volume_man_cave_kazador_noir_value
  - entity: input_number.volume_man_cave_kazador_noir

Kazador