If you try it, let me know how you go. I spent several hours trying to get it all working, and then once I got it working, went back to document the required steps.
Great thing is you can have multiple Bluetooth speakers connected to your HA (i.e. in different areas of the house), and control them all individually (including volume control).
BTW, my Bluetooth speaker was switched off overnight. I just switched it back on and TTS has continued working with that speaker, so it looks like the Raspberry Pi is smart enough to automatically reconnect, even after the speaker has been switched off.
This is great, thanks for sharing. I have a couple of BT speakers laying around and will give it a try.
What Iād really like to do is have all of HAās TTS go through my Echo Dot and just get all TTS through that speaker. Does anyone know if you can still use Alexa commands if itās paired as a speaker?
Hi @hackertc. I think thatās exactly what this is for. Any time you want something spoken through your speakers, call the tts.google_say service, as you have demonstrated.
@hackertc Which version of HA are you using? Iām on 0.48.0 (latest).
Did you create /home/pi/.homeassistant/custom_components/media_player/bluetooth_speaker.py in the correct folder? Is your HA installed in the same location as mine?
Well. i just tried to reproduce the tutorial and get those:
[pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
@thundergreen Did those messages appear in a log file? I recall getting some error messages regarding X11 although it still worked. I think they were more like warnings in my case. Have you tried calling the TTS service regardless of this to see if it works?
[pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist