node-googlehome
It uses Node.js to communicate with Google Home.
Install
npm
$ npm install node-googlehome --save
yarn
$ yarn add node-googlehome
Usage
const GoogleHome = /** * search google home. * @param {waitTime: number(default: 1000)} */GoogleHome /** * connect google home with IP. * @param {ip_address: string} */let device = '192.168.11.13' /** * setting language * @param {{lang: string(default: 'en')}} */device /** * Start speaker. * If you do this, google home will immediately sound when you call speak() or playMedia() */device /** * play media. pass media url. * @param {url: string} */device /** * google home speak! * @param {message: string, speed: number(default:1), timeout: number(default: 3000)} */device
Requirements
・Node.js >= v7