mirror of
https://github.com/lehanspb/tuya-mqtt.git
synced 2025-12-16 17:54:36 +00:00
move mqtt config to seperate file
This commit is contained in:
10
tuya-mqtt.js
10
tuya-mqtt.js
@@ -8,17 +8,9 @@ function bmap(istate) {
|
||||
return istate ? 'ON' : "OFF";
|
||||
}
|
||||
|
||||
function bmap(istate) {
|
||||
return istate ? 'ON' : "OFF";
|
||||
}
|
||||
|
||||
var connected = undefined;
|
||||
|
||||
const CONFIG = {
|
||||
host: 'localhost',
|
||||
port: 1883,
|
||||
topic: "tuya/"
|
||||
}
|
||||
const CONFIG = require("./config");
|
||||
|
||||
const mqtt_client = mqtt.connect({
|
||||
host: CONFIG.host,
|
||||
|
||||
Reference in New Issue
Block a user