From d8e93ed5258595e4b0dc4dc74833fc4db8262bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Wed, 12 Oct 2022 08:48:30 +0200 Subject: [PATCH] feat: added environment variables for configuration --- raumstatus.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/raumstatus.js b/raumstatus.js index c9cdb37..a398e35 100644 --- a/raumstatus.js +++ b/raumstatus.js @@ -64,8 +64,9 @@ var simpleanswer = {state: "unknown", lastchange: 0, power: 0}; var ippoll = new IpPoll("rpi3.raum.ctdo.de"); -var flukso = new Flukso("flukso.raum.ctdo.de", "/sensor/cf00e0b22230f4a8870af58f2b8719dd"); -var mqtt = mqttClient.connect('mqtt://raum.ctdo.de'); +var flukso = new Flukso(process.env.FLUKSO_HOST || "flukso.raum.ctdo.de", + process.env.FLUKSO_URL || "/sensor/cf00e0b22230f4a8870af58f2b8719dd"); +var mqtt = mqttClient.connect(process.env.MQTT_SERVER || 'mqtt://mqtt.ctdo.de'); var connected = false; //express js settings