Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-red-contrib-modbus

biancoroyal11.9kBSD-3-Clause5.43.0

The all in one Modbus TCP, UDP and Serial contribution long term supported package for Node-RED.

node-red, plusfornodered, modbus, automation, biancoroyal

readme

Platform Node-RED Contribution Modbus Financial Contributors on Open Collective NPM version ES_Sourdce_Version ES_Deploy_Version NodeJS_Version Standard - JavaScript Style Guide NPM download Build and publish Codacy Badge Gitpod Ready-to-Code

node-red-contrib-modbus

The all-in-one Modbus TCP and Serial contribution package for Node-RED

nodemodbus64

If you like that contributor's package for Modbus, then please give us your star at GitHub !

P4NR B2B Community

The P4NR B2B Community driven by Iniationware takes now care about the development and improvements for Modbus. Books, Tutorials and much more will be provided over time and if you need some support the P4NR team can help you. Bianco Royal is in partnership with the P4NR B2B Community.

Leanpub Live-Book

We're excited to announce our Online Leanpub Book that covers each v5.x version in detail. This comprehensive guide is aimed to help you learn more about our nodes and the various options inside them. What's unique about this book is its "buy once, update forever" approach. We continuously update the content to bring the latest v5.x changes or new options with each v5.x release version.

Moreover, we're dedicated to responding to your queries. If you have a question, not only will we answer it, but we can also incorporate the insightful answers into the book's future editions. This ensures that all readers stay informed and engaged. Thanks to the P4NR B2B Community

Purchasing our book will greatly support us in our mission to incrementally improve Modbus for Node-RED and beyond with every release in the upcoming decade. Your support will undoubtedly contribute to building a robust Modbus for Node-RED ecosystem.

Contribution Information

Node-RED contribution package for Modbus version overview:

Based on modbus-serial with TCP, C701, Telnet, Serial, RTU buffered, and ASCII

  • stress tested with Node-RED v1.0.4 and Node.js LTS
  • works with queueing per unit and round-robin scheduling

Version History

If you like that contributor's package for Modbus, then please give us your star at GitHub !

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-contrib-modbus

Run the following command for global install

npm install -g node-red-contrib-modbus

try these options on npm install to build if you have problems to install

--unsafe-perm --build-from-source

modbus-serial, serialport and jsmodbus

The serialport optional dependency is just to list all ports on your system in the client configuration. It is not the serialport version to work with Modbus at runtime. For that check the modbus-serial or jsmodbus package.json, please! The modbus-serial supports and works for TCP connections in that package, too. The jsmodbus package is just to provide a simple Modbus Server node. All Modbus commands running on modbus-serial.

TCP or Serial testing

If you get in trouble with TCP connections, then check and test with just modbus-serial first, please!

If you get in trouble with Serial connections, then check with just serialport first, please!

Update/Upgrade/Downgrade

To update the dependencies or the whole package, you have just to install again.

npm show node-red-contrib-modbus@* version

To get a special version, please set the version with @M.M.F:

npm install node-red-contrib-modbus@3.6.1

or global by

npm install -g node-red-contrib-modbus@3.6.1

Modbus Flex Server

The Modbus-Flex-Server now got its own package. The P4NR team started to work on fixing the vm2 issue, but first, we think as the community here it has to get out of this package to close the issue on vm2 now. The P4NR team will split this package more in the next time into client and server packages to get a better development flow and to react faster on CVE or other issues. This is a first step to v6 of the package.

How to use

Flow Example

Errors

Since v5.22+ the package will catch network and other errors of the client and server node. That means, you have to handle the error status of the node and Node-RED should not crash in the handled cases.

Debug

Debug will be activated by starting Node-RED with debug mode:

DEBUG=contribModbus*,modbus-serial node-red -v

or

DEBUG=contribModbus:{option},contribModbus:{option},...

see Wiki pages to get more options in detail

Contributing

Let's work together! Contributors are welcome. Please, fork the repo and send your pull requests from your repo to our develop branch or open issues while you're testing!

For Developers

See the scripts of the package and the additional Shell scripts to clean, update, or upgrade this NPM package.

  • dev-link (local testing with Node-RED)
  • testing (unit, integration)
  • coverage
  • docs generation
  • standard-version alpha, beta, release
  • git-flow

For Testers

Report issues, share your experiences, record tutorials, write Wiki articles and Blogs to share more about this package, please!

Authors

since April 2016 by Klaus Landsdorf and Community Driven

History

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

changelog

5.43.0 (2024-11-02)

Bug Fixes

  • buffer: nodejs Buffer alloc update (9a6350c)
  • codeql: version codeql (163101f)
  • config: #442 fixing optional to save correct (de88e25)
  • issue#472: Implemented message queue to handle incoming messages asynchronously (65ea2a7), closes issue#472
  • modbus-client-core: fixed test cases (0697df3)
  • modbus-client-flow: fixed modbus client flow example (8613c89)
  • modbus-fc-flex: fixed test case for modbus flex fc file (93b22f8)
  • modbus-flex-getter: fixed port server and tcp port (b48d92f)
  • modbus-flex-write: fixed flow for modbus flex write (a31b4c4)
  • modbus-getter: fixed test cases of modbus getter file (693087b)
  • modbus-io-core: fixed error RangeError [ERR_OUT_OF_RANGE]: (ab932f3)
  • modbus-read: fixed test cases of modbus read file (5c5879e)
  • modbus-write: fix example flow for modbus write node (04fd17c)
  • modbus: added a new example flow and fixed test cases (8181fd4)
  • modbus: commented the test cases that are failed (5998a5d)
  • test_cases: fixed test flow of modbus queue info (732fa9c)
  • test_cases: improved test cases (bdafa18)
  • test_flows: fixed old test flows of read node, queue info node (37b73ee)
  • testcase: fixed test case assertion (803e7e0)
  • test: fixed test case for modbus read node (8fb71e9)
  • test: fixed port issue (28115fe)
  • test: fixed test case (c16da3c)
  • tests: some test fixes (45c3c86)

Features

  • flex-fc: add load button (04fb46e)
  • flex-fc: add load button for an improved ui experience (895f446)
  • flex-fc: map file needs to be json (28f6010)
  • modbus-client-core: Improve code in modbus-client-core.js file (f0691e2)
  • modbus: new option for the flex-fc to get input msg (5ff8167)
  • test-flow: added tets flow for github issue 473 (6130171)

5.27.2 (2023-08-29)

Bug Fixes

  • added missing verbose warn (4082952)
  • adjusted failing tests to tcp ports (5db0e99)
  • deps: can now successfully install deps (f8e0a64)
  • deps: updated scope names for requires (9c643f6)
  • fixed failing tests using same ports (06080d4)
  • flex-getter: corrected isReadyForInput (806ee4c)
  • flex-getter: fixed failing tests (1ab96b3)
  • flex-getter: revise DelayOnStart (c9d246a)
  • flex-server: changed var to const (d638d53)
  • flex-write: deleted unused flow (2f0baee)
  • flexFC: fixed routes for codes map (e2e2cc5)
  • flexGetter-verboseWarn: node.serverInfo is left from client - removed (94c58db)
  • isReadyForInput: now checks ONLY for readyforinput. Rest in onInput (99f60a8)
  • Node-RED PLUS changed to PLUS for Node-RED (f726949)
  • not-ready-for-input-warning: removed unnecessary variable/option (d435b9b)
  • npmrc: added npmrc file to packed files (40ebf4d)
  • require: now requires correct fork of lib (2f936f8)
  • server: #333 Cannot read property 'disableMsgOutput' of undefined (5c28e02)
  • server: #333 new check of msg object (4631795)
  • test: same port on test (b6f531f)
  • verboseWarn: verboseWarn accidentally used func left from client (c0d88cd)
  • web: get routes for FlowForge (21102c6)

Features

  • add custom function code client functionality (505329f)
  • add flex-fc node (2766989)
  • add modbus-flex-fc to package.json (2bbea1e)
  • add path for customModbusMessage event (8a56fed)
  • add reset template button for request map (859c563)
  • add tests (94a3870)
  • added "inactive"-test (03c744a)
  • added isActive function (6005960)
  • added isInactive check on input (92f49da)
  • added more point to Todo (84f39ad)
  • added more Todo notes (30c5e80)
  • added planned updates for release (765a549)
  • added test coverage to Todo (6148dd5)
  • added test-helper-extension (c4b493d)
  • added tests for Client check (55c235e)
  • added Todo content (94d46e8)
  • added Todo content, excecuted clean.sh (8f1977c)
  • adjusted TODO and package.json (c481b6f)
  • clex-connector-test: organized code (92c9e37)
  • client-flows: extracted and updated flows (7c40530)
  • client-test: added "ready to send"-tests (368e6cd)
  • client-tests: organized code (830b0ce)
  • client: more options and tabs for the client node (1048021)
  • delay-flex-getter: added delay after start (f68d666)
  • flex fc debug test (2785c7e)
  • flex-connector-flows: extracted and updated flows (6f4330c)
  • flex-connector: added "ready to send" tests (11d5b1e)
  • flex-getter-flows: extracted and updated flows (db2471b)
  • flex-getter-test: organized code (981a15e)
  • flex-getter: added html information for node (c74dc2d)
  • flex-getter: finished implementing delay + (9656e8f)
  • flex-getter: finished implementing delay + warnings (9782a0d)
  • flex-getter: further implementing "delayOnStart" (7666d95)
  • flex-getter: implemented readyForInput (70bff72)
  • flex-getter: started implementing "showWarnings" + "DelayOnStart" (d9db52a)
  • flex-getter: startted implementing showReadyForInput (55b107c)
  • flex-sequencer-test: changed var to const (ffbf9ff)
  • flex-sequencer: added "Ready-To-Read" tests (43e34d6)
  • flex-sequencer: extracted and updated flows (b8c12b9)
  • flex-sequencer: input delay on start (758a3a5)
  • flex-server: extracted and updated flows (64d69ea)
  • flex-write: added "ready to send"-tests (9d35d13)
  • flex-write: delay on input and check client is active (e1bce6c)
  • flex-write: extracted and updated flows (38e4b18)
  • getter-flows: updated flows to be organized (5c6239a)
  • getter: input delay on start (b7acd97)
  • getter: organized Code (19da2dc)
  • io-config: extracted and updated flows (e037a59)
  • optimized and extracted server flows (7456528)
  • option show warning and tabs for optionals (12fa45e)
  • queue-info: extracted and updated flows (1b668fa)
  • ran clean script, updated Todo (f6f142f)
  • read-flows: updated flows to be organized (ccfece8)
  • ReadyToSend: added test to test-classes (ee1f924)
  • response-filter: added Client check test (9db71b6)
  • response-filter: extracted and updated flows (93e10f8)
  • response-filter: prepared flow-extraction (39092de)
  • response: extracted and updated flows (6930e37)
  • simplified code with new function (15c06e2)
  • ui issues fixed and rudimentary working (5fb77f8)
  • working flex fc node (b75f826)
  • write-flows: updated flows to be organized (b32cd54)
  • write: input delay on start (7d3567e)
  • wrote test for messageAllowedStates (e2c92ec)

5.23.0 (2022-08-01)

Bug Fixes

Features

  • IO Modbus examples and node-red version spec in package (707d572)
  • less logging switch (716d17c)
  • npm stats (1ff2b80)
  • unitid 0 allowed and tested (a5ee552)
  • upgrade serialport to v10 for ARM (5e93d11)

5.14.1 (2021-08-07)

5.14.0 (2021-04-10)

Bug Fixes

5.13.1 (2020-05-24)

Bug Fixes

Features

  • broadcast: #195 extracting from payload.unitid, msg.queeuid or node UnitId (11afe1c)

5.12.0 (2020-05-17)

Bug Fixes

Features

  • reader: empty msg on error (15a8e01)

5.11.0 (2020-05-12)

Bug Fixes

Features

  • msg: keep msg properties (3c4738e)
  • msg: keep msg properties with testing it (46cb858)

5.10.1 (2020-04-10)

Bug Fixes

  • FSM double take on running in the same states with multiple consumer (5072e40)
  • HTTP messaging did not work (8e87053)
  • improve register and de-register for issue #165 (c68d59b)
  • issue #187 - listener remove for partial deploy (5220d27)
  • nodejs 13 fsm problem dynamic reconnect (919db9b)
  • read node should not use basic status handling cause of the own interval (dea606f)
  • remove all listeners was lost in code (92ada63)
  • test timeout passing (0dcf966)
  • timer problem on partial deploy issue #187 (66066c0)

Features

  • getter: empty msg on catch error (c8ac4a6)
  • new status update concept for nodes with less traffic (eb2afba)
  • queue info can handle all queues from one node issue #175 (1a094b2)
  • write: empty msg on fail as the other node (d6fd30b)

5.8.0 (2020-04-02)

Bug Fixes

  • #178 debug per node to see where it is not correct or fallback core log (ff69134)
  • #178 too get no crash on internal debug log (a0389e7), closes #180
  • activate sending with promise (fcb816e)
  • client: FSM message FSM Reset while failure handling and on unplanned state changes, now it raises only on failures (944786c)
  • GUI problems and performance while verbose mode is active (9453fcc)
  • issue #182 to get better information from the FSM (78be12b)
  • issue #175 less update queue info node on queue-changes (45eae4e)
  • issue #179 (1824032)
  • issue #180 msg as expected from other msg structures (f1e9a43)
  • less EMPTY switches to the FSM (29d79bc)
  • needs new on re-register nodes (464662b)
  • queue problems with issue #175 (154c8a0)
  • read: show active again with new state (ed2eb88)
  • reconnect could just go to init or stopped (d9e13b9)
  • response delay in server in not available for now (4542763)
  • serial config via flex connector missing parameter (45e41ee)
  • serial lock toggle for issue #175 (45e4be8)
  • serial multiple UnitIds issue #175 (2f6fedf)
  • similar empty msg structure (cfbd834)
  • testing works with new flaqs and clean code (65dba5e)
  • the server does not support that feature since jsmodbus is used instead of node-modbus (abd88d8)
  • travis build (7a7294e)

Features

  • #180 msg on fail pre-release alpha (282a7c4)
  • faster client with clean timeouts and less states (cdf4735)
  • keep the whole msg and add data for tcp request answers (74271d3)
  • msg or error on flex connector (16a947b)
  • new output for flex config (f78e775)
  • new sending state to improve sequential sending (7802dea)
  • new server write concept via input msg and Uint8 list (ad485ea)
  • set default on serial for queue by the type checkbox switch (65edb52)

5.2.0 (2019-12-08)

Bug Fixes

Features

5.1.0-0 (2019-11-24)

Features

  • new state machine from xstate (57aef99)

4.1.1 (2018-11-13)

Bug Fixes

4.0.1 (2018-11-08)

Features

4.0.0 (2018-08-19)

Bug Fixes

  • test: counter has to add some (f183135)
  • test: faster travis CI (3857c29)

Features

  • clients: register and deregister for all client nodes issue #105 (c7a00a3)
  • read: log IO option (61d22ea)
  • server: discrete input for the flex server (54d7028)
  • server: upgrade to jsmodbus 3.0.0 (12a045e), closes #105

3.6.1 (2018-06-08)

3.6.0 (2018-05-28)

3.5.0 (2018-05-21)

Features

3.4.0 (2018-03-05)

3.3.4 (2018-03-05)

3.3.2 (2018-02-21)

3.3.1 (2018-02-20)

3.0.2 (2018-01-10)

3.0.1 (2018-01-09)

2.5.0 (2017-12-19)

2.3.2 (2017-11-21)

2.2.3 (2017-11-08)

2.2.2 (2017-11-08)

2.1.1 (2017-10-22)

1.0.16 (2017-05-10)

1.0.12 (2017-05-06)

1.0.8 (2017-03-05)

1.0.0 (2017-01-18)