mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Remove most of the console.logs
This commit is contained in:
parent
d7df13bc2b
commit
a84fddc8f0
@ -229,12 +229,21 @@ module.exports = function(RED) {
|
||||
node.status({fill: 'green',shape: 'dot',text: 'found'});
|
||||
}
|
||||
|
||||
node.on('input', function(msg) {
|
||||
node.on('input', function(msg, send, done){
|
||||
var dev = wemo.get(node.dev);
|
||||
|
||||
send = send || function() { node.send.apply(node,arguments) }
|
||||
|
||||
if (!dev) {
|
||||
//need to show that dev not currently found
|
||||
console.log('no device found');
|
||||
// console.log('no device found');
|
||||
|
||||
if (done) {
|
||||
done("Device not discovered yet")
|
||||
} else {
|
||||
node.error("Device not discovered yet", msg)
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ WeMoNG.prototype.start = function start() {
|
||||
|
||||
post_request.on('error', function(err){
|
||||
// should log err
|
||||
console.log(err);
|
||||
//console.log(err);
|
||||
})
|
||||
|
||||
post_request.write(util.format(getenddevs.body, udn));
|
||||
@ -363,12 +363,12 @@ WeMoNG.prototype.toggleSocket = function toggleSocket(socket, on) {
|
||||
});
|
||||
|
||||
post_request.on('error', function (e) {
|
||||
console.log(e);
|
||||
console.log("%j", postoptions);
|
||||
// console.log(e);
|
||||
// console.log("%j", postoptions);
|
||||
});
|
||||
|
||||
post_request.on('timeout', function () {
|
||||
console.log("Timeout");
|
||||
// console.log("Timeout");
|
||||
post_request.abort();
|
||||
});
|
||||
|
||||
@ -420,8 +420,8 @@ WeMoNG.prototype.getSocketStatus = function getSocketStatus(socket) {
|
||||
});
|
||||
|
||||
post_request.on('error', function (e) {
|
||||
console.log(e);
|
||||
console.log("%j", postoptions);
|
||||
// console.log(e);
|
||||
// console.log("%j", postoptions);
|
||||
def.reject(e);
|
||||
});
|
||||
|
||||
@ -471,8 +471,8 @@ WeMoNG.prototype.getInsightParams = function getInsightParams(socket) {
|
||||
});
|
||||
|
||||
post_request.on('error', function (e) {
|
||||
console.log(e);
|
||||
console.log("%j", postoptions);
|
||||
// console.log(e);
|
||||
// console.log("%j", postoptions);
|
||||
def.reject(e);
|
||||
});
|
||||
|
||||
@ -527,12 +527,12 @@ WeMoNG.prototype.getLightStatus = function getLightStatus(light) {
|
||||
def.resolve(obj);
|
||||
} else {
|
||||
def.reject(err);
|
||||
console.log("err");
|
||||
// console.log("err");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("err");
|
||||
// console.log("err");
|
||||
def.reject(err);
|
||||
}
|
||||
});
|
||||
@ -540,13 +540,13 @@ WeMoNG.prototype.getLightStatus = function getLightStatus(light) {
|
||||
});
|
||||
|
||||
post_request.on('error', function (e) {
|
||||
console.log(e);
|
||||
console.log("%j", postoptions);
|
||||
// console.log(e);
|
||||
// console.log("%j", postoptions);
|
||||
def.reject(e);
|
||||
});
|
||||
|
||||
post_request.on('timeout', function () {
|
||||
console.log("Timeout");
|
||||
// console.log("Timeout");
|
||||
post_request.abort("timeout");
|
||||
def.reject();
|
||||
});
|
||||
@ -583,12 +583,12 @@ WeMoNG.prototype.setStatus = function setStatus(light, capability, value) {
|
||||
});
|
||||
|
||||
post_request.on('error', function (e) {
|
||||
console.log(e);
|
||||
console.log("%j", postoptions);
|
||||
// console.log(e);
|
||||
// console.log("%j", postoptions);
|
||||
});
|
||||
|
||||
post_request.on('timeout', function () {
|
||||
console.log("Timeout");
|
||||
// console.log("Timeout");
|
||||
post_request.abort();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user