mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-19 21:03:24 +00:00
31 lines
747 B
JavaScript
31 lines
747 B
JavaScript
import request from 'request';
|
|
|
|
// Create a logger for our provider
|
|
let log = homebridge.logger('homebridge-lockitron');
|
|
|
|
// Demonstrate that we were loaded - run homebridge with the "-D" option to see this message
|
|
log.debug("Lockitron provider loaded!");
|
|
|
|
module.exports = {
|
|
|
|
config: {
|
|
accessToken: {
|
|
type: 'string',
|
|
description: "You can find your personal Access Token at: https://api.lockitron.com",
|
|
required: true
|
|
}
|
|
},
|
|
|
|
validateConfig: function(callback) {
|
|
|
|
// validate the accessToken
|
|
let accessToken = homebridge.config.get('homebridge-lockitron.accessToken');
|
|
|
|
// prove that we got a value
|
|
log.info(`Access Token: ${accessToken}`);
|
|
|
|
// all is well.
|
|
callback();
|
|
}
|
|
}
|