1.0.2 • Published 5 years ago
@haydenhigg/gohome v1.0.2
GoogleHome
This is a small low-level library for interfacing with Google Homes' (hardly-functional) public API.
Usage
const GoHome = require('@haydenhigg/gohome');
var myhome = new GoHome('192.168.86.249'); // or whatever IP there is
myhome.getEurekaInfo(console.log);
Methods
Static:
nightModeParams(options)
(returns an object; is useful so that you don't have to remember the properties)
Instance:
constructor(ip)
reboot([cb = () => {}])
welcome([cb = () => {}])
getAlarms([cb = res => {})
setEurekaInfo(data[, cb = () => {}])
getEurekaInfo([cb = res => {}])
setNightModeParams(data[, cb = () => {}])
getNightModeParams([cb = res => {}])
Note:
The options for nightModeParams
and their defaults are shown below:
{
doNotDisturb = false,
enabled = true,
volume = 0.5,
ledBrightness = 0.5,
startHour = 22,
length = 8, // in hours
days = [0, 1, 2, 3, 4, 5, 6]
}