简体   繁体   中英

How to programmatically trigger google home broadcast

What I'd like to do is write some code like:

var googleHome = new GoogleHomeSdk();
var devices = ['kitchen', 'lounge', 'bedroom'];

googleHome.broadcast({
   devices : devices,
   message : 'The front door has been open for 30 seconds'
});

Which would then do something similar to the native broadcast feature, ie where you type 'broadcast ' into the google assistant app on phones/tablets.

I can't seem to find any google documentation for an API like this but it seems like such a basic/obvious requirement that surely something like this must exist?

Note: I've seen a workaround where people have casted an audio file (obtained via text-to-speech service) but this isn't really what I'm after.

The platform does not provide a mechanism to programmaticlly broadcast messages to different devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM