I may not be the first to do this, but the concept amused me enough that I thought I’d post what I did.
I have Chromecast audio in every room, and I wanted home assistant to play Google Music on all my speakers. I haven’t seen a way of doing it directly with HA; but, I can tell Google Music to play whatever I want through my Google Home… So now every morning I hear HA announce: “Hey Google, play some music!” (using the TTS component)
There are loads of people that have looked for a way to control Spotify but as Spotify doesn’t have an API you can’t… but this way you can
So the way to do it is have a speaker with a chromecast and have HA playing a TTS saying “Hey Google play xmas music on xxx speaker” so Google home can hear it and you have a automated way to start spotify … works I guess also on an echo…
well done and
So my next automation is setting the alarm by playing a TTS msg to play xxx on the bedroom speaker … super
I have a google home in my kitchen and a couple of speakers with a chromecast throughout my house (wife wanted to be able to play music in every room )
I have various playlists in Spotify and I like to wake up with music…
So I will adapt my alarm clock script to play music from spotify instead of playing a selection of my own MP3s.
so the script will do the following when it is time to wake up:
On the kitchen speaker so GH can hear it I use TTS to say:
OK Google set volume bedroom 5%
OK Google play XXX on bedroom
after 5 mins : OK Google volume bed room up 5%
after 5 mins : OK Google volume bed room up 5%
etc etc
It works perfect! so now waking up with music that slowly is increasing in volume from spotify…
Now I could do this always with my local playlists but now also with Spotify…
Other option you could use it is TV with Netflix and Chromecast to start program x every evening/morning, order a pizza every Friday evening, Get Uber taxi
in fact everything echo or GH can do for you that HASS can’t… yet
Hehehe, way to run with the idea! Glad my post was of use The concept came to me when I was pondering the security ramifications of having a voice assistant, “What personal info could an attacker get if they took over my speakers and recorded the results?” But I like the idea of malware that orders me pizza, I’m ok with those ramifications
i think this is a nice way to go around complicated yaml.
creating an alarm or setting a timer in yaml can be painfull, making an automation to send a notify to TTS is straight forward.
i played around with it and let Alexa tell me a joke on unexpected moments.
i even can imagine to make a custom component and then all that you put in the yaml:
timer:
lightson:
- time: 18:00:00
- message: lights in livingroom on
telljoke:
- time: 19:45:00
- message: tell me a joke
settimer:
- time: 20:00:00
- message: set timer for 5 minutes
playmusic:
- time: 7:00:00
- message: play some music
Unfortunately it doesn’t work when playing the TTS on GH… you would expect it does as when it is playing music it does capture commands…
I believe it has to do with the echo canceling algorithm as to capture something GH probably filters out his own noise (in this case the playing of the TTS) so it will not recognize it as it will be filtered out
You can cast TuneIn and Youtube directly to Google Home without the need for TTS. Might be a little more pleasant in the morning to not hear TTS, but instead some nice music. Another option could be using Autocast/Autoinput along with the “I’m feeling lucky” option from an Android device.
I took this idea and applied in another way for my family movie night. I now have an IFTTT applet that is triggered with “tell the fam that we’re watching $ in x minutes”. This will then start my automation that will:
Set the volume of all other GHs/CCs in the house
TTS to all other GHs/CCs in the house “$ is about to start in x minutes in the basement, come on down”
Delay x minutes
Turn on my surround sound
Turn off the lights
Turn on the stair’s track lights
Set the audio input
Set the volume of the surround sound
Set my TV’s backlights to blue
Set the volume of my CCA
TTS to basement CCA to say “okay google, play $ on the basement tv”