This commit is contained in:
Wolfgang Hottgenroth
2018-01-07 21:00:26 +01:00
parent 878f825d80
commit e16a8f77a4

28
src/RelayBox.js Normal file
View File

@ -0,0 +1,28 @@
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
};