diff --git a/io/serialport/25-serial.js b/io/serialport/25-serial.js index fde04163..7218e8b7 100644 --- a/io/serialport/25-serial.js +++ b/io/serialport/25-serial.js @@ -328,7 +328,10 @@ module.exports = function(RED) { }); obj.serial.on('close', function() { if (!obj._closing) { - RED.log.error(RED._("serial.errors.unexpected-close",{port:port})); + if (olderr !== "unexpected") { + olderr = "unexpected"; + RED.log.error(RED._("serial.errors.unexpected-close",{port:port})); + } obj._emitter.emit('closed'); if (obj.tout) { clearTimeout(obj.tout); } obj.tout = setTimeout(function() { diff --git a/io/serialport/README.md b/io/serialport/README.md index 19d95100..a5965222 100644 --- a/io/serialport/README.md +++ b/io/serialport/README.md @@ -6,7 +6,7 @@ hardware serial ports. ## Install -To install the stable version use the `Menu - Manage palette` option and search for node-red-node-serialport, or run the following command in your Node-RED user directory, typically `~/.node-red` +To install the stable version use the `Menu - Manage palette - Install` option and search for node-red-node-serialport, or run the following command in your Node-RED user directory, typically `~/.node-red` npm i node-red-node-serialport diff --git a/io/serialport/package.json b/io/serialport/package.json index 8e17f563..4fc7d98a 100644 --- a/io/serialport/package.json +++ b/io/serialport/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-serialport", - "version" : "0.8.6", + "version" : "0.8.7", "description" : "Node-RED nodes to talk to serial ports", "dependencies" : { "serialport" : "^7.1.5"