hyperbutter-nest
Version:
A plugin to monitor and control your Nest thermostat in the Hyper Butter server
31 lines (27 loc) • 704 B
JavaScript
;
const Nest = require('./index');
const plugin = new Nest({
username: '', // your nest.com username/password
password: '',
skipLogging: true, // don't try and write to the log directory
});
plugin
.on('status', (...args) => {
args.unshift('STATUS:');
console.log.apply(this, args);
})
.on('debug', (...args) => {
args.unshift(' DEBUG:');
console.log.apply(this, args);
})
.on('error', (...args) => {
args.unshift(' ERROR:');
console.error.apply(this, args);
})
.on('update', (data) => {
console.log('UPDATE:', data);
console.log('\n\nTest passed!');
process.exit();
});
// call init if we have one
if (plugin.init) plugin.init();