From 95d8e495516d6eabdaa5906f21d4d62ee40f9305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Mon, 17 Apr 2017 18:43:21 +0200 Subject: [PATCH] Read activeLow config and initialise the Gpio button with this option --- node_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node_helper.js b/node_helper.js index 8babf76..058e067 100644 --- a/node_helper.js +++ b/node_helper.js @@ -58,7 +58,7 @@ module.exports = NodeHelper.create({ intializeButton: function(index) { const self = this; - var options = { persistentWatch: true }; + var options = { persistentWatch: true , activeLow: !!self.buttons[index].activeLow}; var pir = new Gpio(self.buttons[index].pin, 'in', 'both', options); pir.watch(this.watchHandler(index));