6/29/2021 8:08 PM | |
Joined: 4/11/2013 Last visit: 8/12/2024 Posts: 56 Rating: (3) |
Hi All, Anyone tried the IOT as Modbus-client with the new image v3.1.1 and Modbus version node-red-contrib-modbus v5.13.3? 1. Node Modbus Read used. See attachment: 1_Modbus Read.txt 29 Jun 17:55:21 - [red] Uncaught Exception: 29 Jun 17:55:21 - TypeError: u.pushToQueueByUnitId(...).then(...).catch(...).finally is not a function at Object.<anonymous> (/home/root/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/modbus-client.js:436:7) at emitThree (events.js:136:13) at Object.emit (events.js:217:7) at Object.showStatusActivities [as emit] (/usr/lib/node/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:181:20) at Timeout.a.modbusPollingRead [as _onTimeout] (/home/root/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/modbus-read.js:165:16) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) 2. Node Modbus Read used, except that the 'Queue commands' are not checked/used. There is communication but every second the message appears: (node:450) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:450) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Regards, Rene Attachment1_Modbus Read.txt (924 Downloads) |
6/30/2021 9:42 PM | |
Joined: 4/11/2013 Last visit: 8/12/2024 Posts: 56 Rating: (3) |
Hi Fe_lipe, Thanks for your response. You're right about the versions you mentioned. I had a flashback... I encountered more or less the same issues at the image v2.6.0 See link: modbus issue image v2.6.0 I indeed downgrade to an earlier version of Modbus. I gave it a try: 1. Installing node-gyp --target=v8.17.0 root@iot2000:~# npm -g install node-gyp --target=v8.17.0 node: WARN: Check failed in ../deps/v8/src/deoptimizer.cc:1981 - ignoring /usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js npm WARN notsup Unsupported engine for node-gyp@8.1.0: wanted: {"node":">= 10.12.0"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: node-gyp@8.1.0 npm WARN notsup Unsupported engine for semver@7.3.5: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: semver@7.3.5 npm WARN notsup Unsupported engine for make-fetch-happen@8.0.14: wanted: {"node":">= 10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: make-fetch-happen@8.0.14 npm WARN notsup Unsupported engine for tar@6.1.0: wanted: {"node":">= 10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: tar@6.1.0 npm WARN notsup Unsupported engine for lru-cache@6.0.0: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: lru-cache@6.0.0 npm WARN notsup Unsupported engine for cacache@15.2.0: wanted: {"node":">= 10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: cacache@15.2.0 npm WARN notsup Unsupported engine for promise-retry@2.0.1: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: promise-retry@2.0.1 npm WARN notsup Unsupported engine for @npmcli/move-file@1.1.2: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: @npmcli/move-file@1.1.2 npm WARN notsup Unsupported engine for chownr@2.0.0: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: chownr@2.0.0 npm WARN notsup Unsupported engine for mkdirp@1.0.4: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: mkdirp@1.0.4 npm WARN notsup Unsupported engine for p-map@4.0.0: wanted: {"node":">=10"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: p-map@4.0.0 npm WARN notsup Unsupported engine for socks@2.6.1: wanted: {"node":">= 10.13.0","npm":">= 3.0.0"} (current: {"node":"8.17.0","npm":"6.13.4"}) npm WARN notsup Not compatible with your version of node/npm: socks@2.6.1 + node-gyp@8.1.0 updated 1 package in 155.174s 2 Installing modbus: root@iot2000:~# npm install -g node-red-contrib-modbus@3.1.6 npm ERR! code ETARGET npm ERR! notarget No matching version found for node-red-contrib-modbus@3.1.6. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! A complete log of this run can be found in: npm ERR! /home/root/.npm/_logs/2021-06-30T18_29_33_220Z-debug.log root@iot2000:~# npm install -g node-red-contrib-modbus@3.6.1 npm WARN deprecated node-modbus@4.3.0: please, use modbus-serial (has tcp and serial) or jsmodbus - contact me to get the package access npm WARN deprecated bson@1.0.4: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details node: WARN: Check failed in ../deps/v8/src/deoptimizer.cc:1981 - ignoring insta > serialport@6.1.1 install /usr/lib/node_modules/node-red-contrib-modbus/node_modules/serialport > prebuild-install || node-gyp rebuild prebuild-install WARN install EACCES: permission denied, access '/home/root/.npm' gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/root/.cache/node-gyp/8.17.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-red-contrib-modbus/node_modules/serialport/.node-gyp" gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/node-red-contrib-modbus/node_modules/serialport/.node-gyp' gyp ERR! System Linux 4.4.238-cip50 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/lib/node_modules/node-red-contrib-modbus/node_modules/serialport gyp ERR! node -v v8.17.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! serialport@6.1.1 install: `prebuild-install || node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@6.1.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/root/.npm/_logs/2021-06-30T18_48_55_195Z-debug.log Next try: Several message, see attachment for log output. But version v3.6.1 is installed 3. Delete installed version Modbus v5.13.3, e.g. delete the directory... 4. Start node-red Rene Remark: There are several issues with Modbus, node-red and node versions. See: Attachmentlogfile_ModbusBuild.txt (828 Downloads) |
4/28/2022 10:03 AM | |
Joined: 4/28/2015 Last visit: 11/12/2024 Posts: 3345 Rating: (379)
|
Hi, last week that command did the job for me (see here). Did not encounter a freeze... Either it worked or ended with errors. Best regards! |
Not working for IOT2050 support anymore from March 1st, 2024. |
|
Follow us on