diff --git a/nodes/core/io/10-mqtt.js b/nodes/core/io/10-mqtt.js index 507ddaf04..c1a8318a6 100644 --- a/nodes/core/io/10-mqtt.js +++ b/nodes/core/io/10-mqtt.js @@ -184,7 +184,6 @@ module.exports = function(RED) { this.connect = function () { if (!node.connected && !node.connecting) { node.connecting = true; - console.log("going for connect"); try { node.client = mqtt.connect(node.brokerurl ,node.options); node.client.setMaxListeners(0); diff --git a/nodes/core/io/22-websocket.html b/nodes/core/io/22-websocket.html index 703aa7bf6..99eeea2e4 100644 --- a/nodes/core/io/22-websocket.html +++ b/nodes/core/io/22-websocket.html @@ -180,12 +180,24 @@ category: 'config', defaults: { path: {value:"",required:true,validate:RED.validators.regex(/^((?!\/debug\/ws).)*$/)}, + tls: {type:"tls-config",required: false}, wholemsg: {value:"false"} }, inputs:0, outputs:0, label: function() { return this.path; + }, + oneditprepare: function() { + $("#node-config-input-path").on("change keyup paste",function() { + $(".node-config-row-tls").toggle(/^wss:/i.test($(this).val())) + }); + $("#node-config-input-path").change(); + }, + oneditsave: function() { + if (!/^wss:/i.test($("#node-config-input-path").val())) { + $("#node-config-input-tls").val("_ADD_"); + } } }); @@ -235,7 +247,7 @@
- +
+
+ + +
+
- +