Home Automation : Reading out Text and Playing Media on Google Home using Node Red

 

I discovered this useful node-red plugin node over the weekend, called node-red-contrib-cast (https://flows.nodered.org/node/node-red-contrib-cast). With it I can get node-red to tell my google home devices to either read out some text or play some media.
 
So now when my door bell is pressed, in addition to triggering my 80s doorbell, the google home minis around the house start playing a clip from Paul McCartney’s 1976 track “Let ‘Em In” …
 
♫ Someone’s knocking at the door …
Somebody’s ringing the bell …
Someone’s knocking at the door …
Somebody’s ringing the bell …
Do me favour …
Open the door …
And Let Em In … ♫
 

The google home devices are addressed by IP rather than by name, so I had to configure my DHCP server and fix the IP for each Google Home device. It would be nicer if it talked to google’s API and allowed simultaneous casting to groups of speakers, as then the audio would be in sync across all speakers. I could have a lot of fun playing them at max volume then. Right now I’ve set the volume to just enough for the room its in. Still a useful tool nonetheless.

Originally created with EverNote at 20200223T180439Z