Files
dispatcher_ng/src/RelayBox.js
Wolfgang Hottgenroth e16a8f77a4 new
2018-01-07 21:00:26 +01:00

29 lines
444 B
JavaScript

let mqtt = require('./mqttHandler');
let logger = require('./log');
class Switch {
}
class RelayBox {
constructor(switches) {
this.switches = switches;
}
start() {
mqtt.register(this.subscribeTopics, (topic, payload) => {
logger.info(`item ${this.itemId}: ${topic}, ${payload}`)
this.processMessage(topic, payload);
});
}
}
module.exports = {
RelayBox,
Switch
};