Closed RussNelson closed 10 years ago
Well, at least in theory my lifx driver compiles and is running but .... I see no indication that my code has ever executed. Maybe the template needs more logging code, to give n00bs more confidence that things are working as planned?
go to core/utility.js and you'll see a line like this:
, lighting : { console: { level: 'notice' } }
change it to
, lighting : { console: { level: 'info' } }
and you'll see more information. in particular, when the module loads you'll see something like:
info: [lighting] loading lifx driver
i will make "info" the default setting after 1.3 is released.
I'm not seeing something. Maybe it's already written down, and I just don't know where to look. I can see where the blink1 and blinkstick drivers periodically scan, and when they find something, they call devices.discover(), which presumably calls exports.Device() . I don't see how Insteon discovers new devices, though. It looks like the lower-level Insteon code is calling devices.discover() itself.
I'm guessing that I can initialize the lifx driver in the exports.start code, and it will generate a 'bulb' event to which I can listen and create the data structure and call devices.discover().