From bd15c5d6dd4cb361a876f0013a1656ceea9db960 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 15 Mar 2023 10:21:31 +0000 Subject: [PATCH 1/6] fix pi gpio to catch close timing error --- hardware/PiGpio/36-rpi-gpio.js | 23 ++++++++++++++----- hardware/PiGpio/locales/de/36-rpi-gpio.json | 4 ++-- .../PiGpio/locales/en-US/36-rpi-gpio.json | 4 ++-- hardware/PiGpio/locales/ja/36-rpi-gpio.json | 4 ++-- hardware/PiGpio/locales/ko/36-rpi-gpio.json | 4 ++-- hardware/PiGpio/package.json | 2 +- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/hardware/PiGpio/36-rpi-gpio.js b/hardware/PiGpio/36-rpi-gpio.js index ab7a690a..ae234c49 100644 --- a/hardware/PiGpio/36-rpi-gpio.js +++ b/hardware/PiGpio/36-rpi-gpio.js @@ -83,9 +83,15 @@ module.exports = function(RED) { }); node.child.on('error', function (err) { - if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); } - else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); } - else { node.error(RED._("rpi-gpio.errors.error",{error:err.errno})) } + if (err.code === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")+err.path,err); } + else if (err.code === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")+err.path,err); } + else { node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err) } + }); + + node.child.stdin.on('error', function (err) { + if (!node.finished) { + node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err); + } }); } @@ -198,11 +204,16 @@ module.exports = function(RED) { }); node.child.on('error', function (err) { - if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); } - else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); } - else { node.error(RED._("rpi-gpio.errors.error")+': ' + err.errno); } + if (err.code === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")+err.path,err); } + else if (err.code === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")+err.path,err); } + else { node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err) } }); + node.child.stdin.on('error', function (err) { + if (!node.finished) { + node.error(RED._("rpi-gpio.errors.error",{error:err.code}),err); + } + }); } else { node.warn(RED._("rpi-gpio.errors.invalidpin")+": "+node.pin); diff --git a/hardware/PiGpio/locales/de/36-rpi-gpio.json b/hardware/PiGpio/locales/de/36-rpi-gpio.json index 9024f880..8f8c621e 100644 --- a/hardware/PiGpio/locales/de/36-rpi-gpio.json +++ b/hardware/PiGpio/locales/de/36-rpi-gpio.json @@ -66,8 +66,8 @@ "invalidinput": "Ungültige Eingabe", "needtobeexecutable": "__command__ muss ausführbar sein", "mustbeexecutable": "nrgpio muss ausführbar sein", - "commandnotfound": "nrgpio-Befehl nicht gefunden", - "commandnotexecutable": "nrgpio-Befehl nicht ausführbar", + "commandnotfound": "nrgpio-Befehl nicht gefunden ", + "commandnotexecutable": "nrgpio-Befehl nicht ausführbar ", "error": "Fehler: __error__", "pythoncommandnotfound": "nrgpio-Python-Befehl nicht aktiv" } diff --git a/hardware/PiGpio/locales/en-US/36-rpi-gpio.json b/hardware/PiGpio/locales/en-US/36-rpi-gpio.json index 8931f170..fdc1bcec 100644 --- a/hardware/PiGpio/locales/en-US/36-rpi-gpio.json +++ b/hardware/PiGpio/locales/en-US/36-rpi-gpio.json @@ -66,8 +66,8 @@ "invalidinput": "Invalid input", "needtobeexecutable": "__command__ needs to be executable", "mustbeexecutable": "nrgpio must to be executable", - "commandnotfound": "nrgpio command not found", - "commandnotexecutable": "nrgpio command not executable", + "commandnotfound": "nrgpio command not found ", + "commandnotexecutable": "nrgpio command not executable ", "error": "error: __error__", "pythoncommandnotfound": "nrgpio python command not running" } diff --git a/hardware/PiGpio/locales/ja/36-rpi-gpio.json b/hardware/PiGpio/locales/ja/36-rpi-gpio.json index 619eb3ef..644980a8 100644 --- a/hardware/PiGpio/locales/ja/36-rpi-gpio.json +++ b/hardware/PiGpio/locales/ja/36-rpi-gpio.json @@ -66,8 +66,8 @@ "invalidinput": "入力が不正です", "needtobeexecutable": "__command__ は実行可能である必要があります", "mustbeexecutable": "nrgpio は実行可能である必要があります", - "commandnotfound": "nrgpio コマンドが見つかりません", - "commandnotexecutable": "nrgpio コマンドが実行可能ではありません", + "commandnotfound": "nrgpio コマンドが見つかりません ", + "commandnotexecutable": "nrgpio コマンドが実行可能ではありません ", "error": "エラー: __error__", "pythoncommandnotfound": "nrgpio python コマンドが実行されていません" } diff --git a/hardware/PiGpio/locales/ko/36-rpi-gpio.json b/hardware/PiGpio/locales/ko/36-rpi-gpio.json index 323ae882..a5161ac9 100644 --- a/hardware/PiGpio/locales/ko/36-rpi-gpio.json +++ b/hardware/PiGpio/locales/ko/36-rpi-gpio.json @@ -65,8 +65,8 @@ "invalidinput": "입력이 올바르지 않습니다", "needtobeexecutable": "__command__ 은 실행가능상태일 필요가 있습니다 ", "mustbeexecutable": "nrgpio 은 실행가능상태일 필요가 있습니다 ", - "commandnotfound": "nrgpio 커맨드를 찾을수 없습니다", - "commandnotexecutable": "nrgpio 커맨드가 실행가능상태가 아닙니다", + "commandnotfound": "nrgpio 커맨드를 찾을수 없습니다 ", + "commandnotexecutable": "nrgpio 커맨드가 실행가능상태가 아닙니다 ", "error": "에러: __error__", "pythoncommandnotfound": "nrgpio python 커맨드가 실행되지 않았습니다" } diff --git a/hardware/PiGpio/package.json b/hardware/PiGpio/package.json index b9ee921b..7581e563 100644 --- a/hardware/PiGpio/package.json +++ b/hardware/PiGpio/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-pi-gpio", - "version": "2.0.5", + "version": "2.0.6", "description": "The basic Node-RED node for Pi GPIO", "dependencies" : { }, From a55be34bc0900dfbd7e9d85cd0406136cb7c130c Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 15 Mar 2023 10:22:34 +0000 Subject: [PATCH 2/6] major change to snmp node to not stringify octet string type. --- io/snmp/README.md | 3 +++ io/snmp/package.json | 4 ++-- io/snmp/snmp.js | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/io/snmp/README.md b/io/snmp/README.md index 41e26cd7..7dd5062d 100644 --- a/io/snmp/README.md +++ b/io/snmp/README.md @@ -9,6 +9,9 @@ fetch values from SNMP enabled hosts. Supports v1, v2c and v3. * SNMP table - Simple SNMP oid table fetcher * SNMP walker - Simple SNMP oid walker fetcher +## v2 Breaking Change +v2 has a breaking change in that the single snmp node no longer tries to stringify an octet string type (04). This makes it consistent with the other nodes in this bundle. this means the user now has to convert to a string if required but has better control of how they wish to do that. + Install ------- diff --git a/io/snmp/package.json b/io/snmp/package.json index 3df8a7cf..e64f3ec0 100644 --- a/io/snmp/package.json +++ b/io/snmp/package.json @@ -1,9 +1,9 @@ { "name" : "node-red-node-snmp", - "version" : "1.0.6", + "version" : "2.0.0", "description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3", "dependencies" : { - "net-snmp" : "^3.8.2" + "net-snmp" : "^3.9.0" }, "repository" : { "type":"git", diff --git a/io/snmp/snmp.js b/io/snmp/snmp.js index 22549fb5..3853e5fa 100644 --- a/io/snmp/snmp.js +++ b/io/snmp/snmp.js @@ -253,9 +253,9 @@ module.exports = function (RED) { node.error(SNMP.varbindError(vb), msg); vb._error = SNMP.varbindError(vb); //add _error to msg so users can determine the varbind is not valid } - else { - if (vb.type == 4) { vb.value = vb.value.toString(); } - } + // else { + // if (vb.type == 4) { vb.value = vb.value.toString(); } + // } vb.tstr = SNMP.ObjectType[vb.type]; } msg.payload = varbinds; From a14ef95fb3cdfabdba381ef1133c2e05a3baa93c Mon Sep 17 00:00:00 2001 From: dodther <15664548+dodther@users.noreply.github.com> Date: Tue, 21 Mar 2023 20:20:23 +1000 Subject: [PATCH 3/6] russian translate (#962) add support internalization and russian translate. --- time/suncalc/79-suncalc.html | 87 ++++++++++++---------- time/suncalc/79-suncalc.js | 4 +- time/suncalc/locales/en-US/79-suncalc.json | 32 ++++++++ time/suncalc/locales/ru/79-suncalc.html | 11 +++ time/suncalc/locales/ru/79-suncalc.json | 33 ++++++++ 5 files changed, 124 insertions(+), 43 deletions(-) create mode 100644 time/suncalc/locales/en-US/79-suncalc.json create mode 100644 time/suncalc/locales/ru/79-suncalc.html create mode 100644 time/suncalc/locales/ru/79-suncalc.json diff --git a/time/suncalc/79-suncalc.html b/time/suncalc/79-suncalc.html index 65742792..d4cbd8b7 100644 --- a/time/suncalc/79-suncalc.html +++ b/time/suncalc/79-suncalc.html @@ -1,44 +1,44 @@ diff --git a/time/suncalc/locales/ru/79-suncalc.json b/time/suncalc/locales/ru/79-suncalc.json new file mode 100644 index 00000000..55368da6 --- /dev/null +++ b/time/suncalc/locales/ru/79-suncalc.json @@ -0,0 +1,33 @@ +{ + "sunrise": { + "label": { + "latitude": " Широта", + "longitude": " Долгота", + "start": " Начало", + "end": " Окончание", + "offset": " Смещение", + "name": " Имя" + }, + "nightEnd": "Утренние астрономические сумерки", + "nauticalDawn": "Утренние навигационные сумерки", + "dawn": "Рассвет, утренние гражданские сумерки", + "sunrise": "Восход", + "sunriseEnd": "Восход закончился", + "goldenHourEnd": "Окончание утреннего золотого часа", + "goldenHour": "Начало вечернего золотого часа", + "sunsetStart": "Начало заката", + "sunset": "Закат, начинаются вечерние гражданские сумерки", + "dusk": "Смеркается, начинаются вечерние астрономические сумерки", + "nauticalDusk": "Начинаются вечерние морские сумерки", + "night": "Достаточно темно для астрономии", + "start": " начало", + "mins": " мин", + "end": " конец", + "dayState": "день", + "nightState": "ночь", + "onePerMin": "раз в минуту", + "onse": "по событию", + "sunName": "Рассвет/закат" + + } +} From c0496fc067745935e8d1ad8db4952ef9db224a5c Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 26 Mar 2023 13:20:13 +0100 Subject: [PATCH 4/6] tidy up DS_stores --- .gitignore | 1 + hardware/mcp3008/.DS_Store | Bin 6148 -> 0 bytes 2 files changed, 1 insertion(+) delete mode 100644 hardware/mcp3008/.DS_Store diff --git a/.gitignore b/.gitignore index 729dabf3..f989f23a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ setenv.sh package-lock.json social/xmpp/92-xmpp.old *.tgz +*/.DS_Store diff --git a/hardware/mcp3008/.DS_Store b/hardware/mcp3008/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Mon, 27 Mar 2023 20:23:48 +0100 Subject: [PATCH 5/6] bump nodemailer version --- .gitignore | 2 +- social/email/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f989f23a..7d7e9f83 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ setenv.sh package-lock.json social/xmpp/92-xmpp.old *.tgz -*/.DS_Store +.DS_Store diff --git a/social/email/package.json b/social/email/package.json index 2e362d1a..f2f12320 100644 --- a/social/email/package.json +++ b/social/email/package.json @@ -1,11 +1,11 @@ { "name": "node-red-node-email", - "version": "1.18.4", + "version": "1.18.5", "description": "Node-RED nodes to send and receive simple emails.", "dependencies": { "imap": "^0.8.19", "mailparser": "~3.5.0", - "nodemailer": "^6.8.0", + "nodemailer": "^6.9.1", "smtp-server": "^3.11.0" }, "bundledDependencies": [ From 497270ba745b7881b17dd8818c3c2ca3d2f797ce Mon Sep 17 00:00:00 2001 From: Paul Vivier Date: Mon, 27 Mar 2023 15:25:33 -0400 Subject: [PATCH 6/6] Fixed typo (#981) --- hardware/wemo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/wemo/README.md b/hardware/wemo/README.md index d5a6dbd7..03995a84 100644 --- a/hardware/wemo/README.md +++ b/hardware/wemo/README.md @@ -16,7 +16,7 @@ Run the following command in your Node-RED user directory - typically `~/.node-r The output node switches a socket, a light or group of lights on or off -This should be backward compatible with the pervious version of this node but will benefit +This should be backward compatible with the previous version of this node but will benefit from opening the config dialog and selecting the node you want. The node accepts the following `msg.payload` as input