diff --git a/signalk-send-put.html b/signalk-send-put.html index a11ba00..e336ec0 100644 --- a/signalk-send-put.html +++ b/signalk-send-put.html @@ -8,7 +8,8 @@ source: {value:""} }, inputs:1, - outputs:0, + outputs:2, + outputLabels: [ 'success', 'error' ], icon: "bridge.png", align: 'right', label: function() { diff --git a/signalk-send-put.js b/signalk-send-put.js index 711790f..a988354 100644 --- a/signalk-send-put.js +++ b/signalk-send-put.js @@ -33,12 +33,14 @@ module.exports = function(RED) { if ( !app.queryRequest || (reply.state === 'COMPLETED' && reply.statusCode === 200) ) { fill = 'green' text = `value: ${msg.payload}` + node.send([msg, null]) } else if ( reply.state === 'PENDING' ) { fill = 'yellow' text = 'pending...' } else { fill = 'red' text = `error : ${reply.statusCode} ${reply.message || ''}` + node.send([null, msg]) } node.status({fill:fill,shape:"dot",text:text}) })