Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@shooontan/google-home-notifier

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shooontan/google-home-notifier

Pure JavaScript Google-Home notifier

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
24
300%
Maintainers
1
Weekly downloads
 
Created
Source

@shooontan/google-home-notifier

npm version Build Status

Send notifications to Google Home.

This module is rewritten in TypeScript based on google-home-notifier. We are freed of the need to build with node-gyp when run npm install.

Install

# npm
$ npm install @shooontan/google-home-notifier

# or yarn
$ yarn add @shooontan/google-home-notifier

Usage

const GoogleHomeNotifier = require('@shooontan/google-home-notifier');

(async () => {
  const notifier = GoogleHomeNotifier();
  await notifier.create();

  const message = 'Hi!';
  await notifier.say(message);
})();

Document

GoogleHomeNotifier([options])

  const notifier = GoogleHomeNotifier(options);

options arguments is optional.

  • options.device: string device name. example Google-Home.
  • options.ip: string Google Home device ip address.
  • options.lang: string language code. Google Document

notifier.create()

await notifier.create();

notifier.create() find out Google Home device ip address and auto set ip address to notifier instance.

If setting options.ip, notifier.create() does not need.

notifier.say(message, [options])

await notifier.say(message, options);

Send notification to Google Home.

  • message: string notification text.
  • options: object
    • lang: string same as GoogleHomeNotifier options.lang.
    • speed: number notification text speed. default 1.

notifier.play(mp3Url)

await notifier.play(mp3Url)

Play mp3 with Google Home.

  • mp3Url: string | Array<string>

Keywords

Google-Home

FAQs

Package last updated on 23 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts