diff --git a/config.schema.json b/config.schema.json index bd4ab27..0057dbb 100644 --- a/config.schema.json +++ b/config.schema.json @@ -28,11 +28,11 @@ }, "refresh": { "title": "Refresh Token", - "default": 900, + "default": 60, "type": "integer", - "minimum": 60, - "maximum": 3000, - "description": "Data polling interval in seconds, defaults to 15 minutes." + "minimum": 30, + "maximum": 3600, + "description": "Data polling interval in seconds, defaults to 1 minute." }, "storage": { "title": "Storage", diff --git a/index.js b/index.js index 9debfcc..a69f788 100644 --- a/index.js +++ b/index.js @@ -36,18 +36,7 @@ function tccPlatform(log, config, api) { // Enable config based DEBUG logging enable this.debug = config['debug'] || false; if (this.debug) { - debug.enable = true; - // let debugEnable = require('debug'); - let namespaces = debug.disable(); - - // this.log("DEBUG-1", namespaces); - if (namespaces) { - namespaces = namespaces + ',alexa*'; - } else { - namespaces = 'alexa*'; - } - // this.log("DEBUG-2", namespaces); - debug.enable(namespaces); + debug.enabled = true; } if (api) { diff --git a/lib/tcc.js b/lib/tcc.js index 9ec0445..edb65fd 100644 --- a/lib/tcc.js +++ b/lib/tcc.js @@ -21,6 +21,9 @@ module.exports = { }; function tcc(options, callback) { + if (options.debug) { + debug.enabled = true; + } debug("Setting up TCC component"); this._username = options.username; this._password = options.password;