Added Content
This commit is contained in:
16
mqtt-domo-in/miTempConv.js
Normal file
16
mqtt-domo-in/miTempConv.js
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = function(RED) {
|
||||
function mqttdomointemp(config) {
|
||||
RED.nodes.createNode(this,config);
|
||||
this.sname = config.sname;
|
||||
var node = this;
|
||||
node.on('input', function(msg) {
|
||||
msg.payload = msg.payload.svalue1;
|
||||
if (node.sname === 'undefined' || node.sname === null || node.sname === "" ) {
|
||||
} else{
|
||||
msg.topic = node.sname
|
||||
}
|
||||
node.send(msg);
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("mqtt-domo-in-temp",mqttdomointemp);
|
||||
}
|
||||
Reference in New Issue
Block a user