From da06e87276f425ef6516b7756ecaa0e6b56f1c6f Mon Sep 17 00:00:00 2001 From: Koenkk Date: Sun, 23 Sep 2018 00:07:31 +0200 Subject: [PATCH] Always call zigbee shepherd permit join (in both true and false). --- lib/controller.js | 3 ++- lib/util/settings.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/controller.js b/lib/controller.js index 74ff3012..4a024754 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -60,9 +60,10 @@ class Controller { logger.warn('`permit_join` set to `true` in configuration.yaml.'); logger.warn('Allowing new devices to join.'); logger.warn('Set `permit_join` to `false` once you joined all devices.'); - this.zigbee.permitJoin(true); } + this.zigbee.permitJoin(settings.get().permit_join); + // Start timers. this.pollTimer(true); this.softResetTimeout(true); diff --git a/lib/util/settings.js b/lib/util/settings.js index 9858292e..15bac765 100644 --- a/lib/util/settings.js +++ b/lib/util/settings.js @@ -6,6 +6,7 @@ const objectAssignDeep = require(`object-assign-deep`); const path = require('path'); const defaults = { + permit_join: false, advanced: { log_directory: path.join(data.getPath(), 'log', '%TIMESTAMP%'), log_level: process.env.DEBUG ? 'debug' : 'info',