{"id":8310,"date":"2020-02-23T18:04:39","date_gmt":"2020-02-23T18:04:39","guid":{"rendered":"http:\/\/localhost:8105\/?p=8310"},"modified":"2021-12-06T22:05:53","modified_gmt":"2021-12-06T22:05:53","slug":"home-automation-reading-out-text-and-playing-media-on-google-home-using-node-red","status":"publish","type":"post","link":"https:\/\/blog.shahada.abubakar.net\/?p=8310","title":{"rendered":"Home Automation : Reading out Text and Playing Media on Google Home using Node Red"},"content":{"rendered":"<p>\u00a0<\/p>\n<div>I discovered this useful node-red plugin node over the weekend, called node-red-contrib-cast (<a href=\"https:\/\/flows.nodered.org\/node\/node-red-contrib-cast\" rev=\"en_rl_none\">https:\/\/flows.nodered.org\/node\/node-red-contrib-cast<\/a>). With it I can get node-red to tell my google home devices to either read out some text or play some media.<\/div>\n<div>\u00a0<\/div>\n<div>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&#8217;s 1976 track &#8220;<i>Let &#8216;Em In<\/i>&#8221; &#8230;<\/div>\n<div>\u00a0<\/div>\n<div>\u266b Someone&#8217;s knocking at the door &#8230;<\/div>\n<div>Somebody&#8217;s ringing the bell &#8230;<\/div>\n<div>Someone&#8217;s knocking at the door &#8230;<\/div>\n<div>Somebody&#8217;s ringing the bell &#8230;<\/div>\n<div>Do me favour &#8230;<\/div>\n<div>Open the door &#8230;<\/div>\n<div>And Let Em In &#8230; \u266b<\/div>\n<div>\u00a0<\/div>\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"video-container\"><iframe loading=\"lazy\" title=\"LET `EM IN PAUL McCARTNEY\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/5EBhsSReJqU?feature=oembed&#038;wmode=opaque\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>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&#8217;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&#8217;ve set the volume to just enough for the room its in. Still a useful tool nonetheless.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"173\" src=\"https:\/\/blog.shahada.abubakar.net\/wp-content\/uploads\/2021\/12\/images.jpeg\" alt=\"\" class=\"wp-image-8882\"\/><\/figure><\/div>\n\n\n\n<p><em>Originally created with EverNote at 20200223T180439Z<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":8882,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[],"class_list":["post-8310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-automation"],"_links":{"self":[{"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/posts\/8310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8310"}],"version-history":[{"count":4,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/posts\/8310\/revisions"}],"predecessor-version":[{"id":8883,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/posts\/8310\/revisions\/8883"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=\/wp\/v2\/media\/8882"}],"wp:attachment":[{"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.shahada.abubakar.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}