using a map in the lights
This commit is contained in:
parent
d6ce365f25
commit
90b5829e1e
@ -10,10 +10,13 @@ const Hs100Controller = function() {
|
||||
const _this = this;
|
||||
|
||||
client.startDiscovery().on('device-new', (device) => {
|
||||
device.getSysInfo().then((deviceInfo) => {
|
||||
logger.debug(deviceInfo);
|
||||
_this.emit('found', deviceInfo);
|
||||
});
|
||||
device.getSysInfo().
|
||||
catch((err) => {
|
||||
logger.error(err);
|
||||
}).then((deviceInfo) => {
|
||||
logger.debug(deviceInfo);
|
||||
_this.emit('found', deviceInfo);
|
||||
});
|
||||
device.setPowerState(true);
|
||||
device.startPolling(10000);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user