iobroker.modbus 6.4.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +31 -12
  3. package/admin/assets/{index-Bd3GtHgn.css → index-Bk6U_LJW.css} +1 -1
  4. package/admin/assets/index-CXjG6RPN.js +2784 -0
  5. package/admin/assets/index-ClJs-3bs.js +1 -0
  6. package/admin/index_m.html +28 -19
  7. package/build/main.js +23 -0
  8. package/build/main.js.map +1 -0
  9. package/io-package.json +34 -29
  10. package/package.json +19 -23
  11. package/admin/assets/index-IjDYuufQ.js +0 -1678
  12. package/lib/common.js +0 -386
  13. package/lib/jsmodbus/README.md +0 -206
  14. package/lib/jsmodbus/handler/client/ReadCoils.js +0 -56
  15. package/lib/jsmodbus/handler/client/ReadDiscreteInputs.js +0 -60
  16. package/lib/jsmodbus/handler/client/ReadHoldingRegisters.js +0 -50
  17. package/lib/jsmodbus/handler/client/ReadInputRegisters.js +0 -57
  18. package/lib/jsmodbus/handler/client/WriteMultipleCoils.js +0 -71
  19. package/lib/jsmodbus/handler/client/WriteMultipleRegisters.js +0 -70
  20. package/lib/jsmodbus/handler/client/WriteSingleCoil.js +0 -49
  21. package/lib/jsmodbus/handler/client/WriteSingleRegister.js +0 -48
  22. package/lib/jsmodbus/handler/server/ReadCoils.js +0 -71
  23. package/lib/jsmodbus/handler/server/ReadDiscreteInputs.js +0 -71
  24. package/lib/jsmodbus/handler/server/ReadHoldingRegisters.js +0 -57
  25. package/lib/jsmodbus/handler/server/ReadInputRegisters.js +0 -56
  26. package/lib/jsmodbus/handler/server/WriteMultipleCoils.js +0 -81
  27. package/lib/jsmodbus/handler/server/WriteMultipleRegisters.js +0 -64
  28. package/lib/jsmodbus/handler/server/WriteSingleCoil.js +0 -69
  29. package/lib/jsmodbus/handler/server/WriteSingleRegister.js +0 -54
  30. package/lib/jsmodbus/index.js +0 -18
  31. package/lib/jsmodbus/modbus-client-core.js +0 -152
  32. package/lib/jsmodbus/modbus-server-core.js +0 -96
  33. package/lib/jsmodbus/package.json +0 -50
  34. package/lib/jsmodbus/transports/errors.js +0 -38
  35. package/lib/jsmodbus/transports/modbus-client-serial.js +0 -172
  36. package/lib/jsmodbus/transports/modbus-client-tcp-rtu.js +0 -193
  37. package/lib/jsmodbus/transports/modbus-client-tcp.js +0 -154
  38. package/lib/jsmodbus/transports/modbus-server-tcp.js +0 -146
  39. package/lib/master.js +0 -1037
  40. package/lib/slave.js +0 -532
  41. package/main.js +0 -1059
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2024 Bluefox <dogafox@gmail.com>
3
+ Copyright (c) 2015-2025 Bluefox <dogafox@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -9,12 +9,23 @@
9
9
  [![Translation status](https://weblate.iobroker.net/widgets/adapters/-/modbus/svg-badge.svg)](https://weblate.iobroker.net/engage/adapters/?utm_source=widget)
10
10
  [![Downloads](https://img.shields.io/npm/dm/iobroker.modbus.svg)](https://www.npmjs.com/package/iobroker.modbus)
11
11
 
12
- **This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
12
+ **This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting, see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
13
13
 
14
14
  Implementation of ModBus Slave and Master for ioBroker. The following types are supported:
15
15
  - Modbus RTU over serial (master)
16
16
  - Modbus RTU over TCP (master)
17
17
  - Modbus TCP (slave, master)
18
+ - Modbus TCP with SSL/TLS (master)
19
+
20
+ ## SSL/TLS Support
21
+ For secure connections to devices that require SSL/TLS encryption (such as the Kostal KSEM Smart Energy Meter on port 802), you can select "TCP with SSL/TLS" as the connection type. This provides the following configuration options:
22
+
23
+ - **SSL Certificate file path**: Path to your SSL certificate file in PEM format
24
+ - **SSL Private key file path**: Path to your SSL private key file in PEM format
25
+ - **SSL CA Certificate file path**: Path to CA certificate file in PEM format (optional)
26
+ - **Reject unauthorized certificates**: Uncheck to allow self-signed certificates
27
+
28
+ Note: Certificate files must be accessible by the ioBroker process and in PEM format.
18
29
 
19
30
  ## Settings
20
31
  ### Partner IP Address
@@ -49,7 +60,7 @@ Like addresses from 3 to 20 will be aligned to 0 up 32.
49
60
  If this option is active, the addresses will not be aligned.
50
61
 
51
62
  ### Do not use multiple registers
52
- If slave does not support "write multiple registers" command, you can activate it to get warnings, when the multiple registers will be written.
63
+ If slave does not support "write multiple registers" command, you can activate it to get warnings when the multiple registers will be written.
53
64
 
54
65
  ### Use only multiple write registers
55
66
  If slave only supports "write multiple registers" command, you can activate so the registers will be written always with FC15/FC16 command.
@@ -79,7 +90,7 @@ Some systems require first "write request" to deliver the data on "read request"
79
90
  You can force this mode by setting of the "Max read request length" to 1.
80
91
 
81
92
  **Notice:**
82
- Some USB Modbus solutions (e.g. based on socat) can have trouble to work with serialport npm module.
93
+ Some USB Modbus solutions (e.g. based on `socat`) can have trouble to work with `serialport` npm module.
83
94
 
84
95
  There is a software [**Modbus RTU <-> Modbus RTU over TCP**](http://mbus.sourceforge.net/index.html) gateway to enable using of serial RTU over TCP protocol.
85
96
 
@@ -195,7 +206,7 @@ This variable can be then later used in any formula for other parameters. E.g.,
195
206
 
196
207
  The following description was copied from [here](http://www.chipkin.com/how-real-floating-point-and-32-bit-data-is-encoded-in-modbus-rtu-messages/)
197
208
 
198
- The point-to-point Modbus protocol is a popular choice for RTU communications if for no other reason that its basic convenience. The protocol itself controls the interactions of each device on a Modbus network, how device establishes a known address, how each device recognizes its messages and how basic information is extracted from the data. In essence, the protocol is the foundation of the entire Modbus network.
209
+ The point-to-point Modbus protocol is a popular choice for RTU communications if for no other reason that its basic convenience. The protocol itself controls the interactions of each device on a Modbus network, how the device establishes a known address, how each device recognizes its messages and how basic information is extracted from the data. In essence, the protocol is the foundation of the entire Modbus network.
199
210
 
200
211
  Such a convenience does not come without any complications, however, and Modbus RTU Message protocol is no exception.
201
212
  The protocol itself was designed based on devices with a 16-bit register length.
@@ -292,21 +303,29 @@ One can then swap bytes and/or words to analyze what potential endianness issues
292
303
  ## Export / Import of registers
293
304
  With export / import functionality, you can convert all register data (only of one type) to a TSV (Tab separated values) file and back to easily copy data from one device to another or to edit register in Excel.
294
305
 
295
- You can share your schemas with other users in [modbus-templates](https://github.com/ioBroker/modbus-templates) or you can find some register schemas there.
306
+ You can share your schemas with other users in [modbus-templates,](https://github.com/ioBroker/modbus-templates) or you can find some register schemas there.
296
307
 
297
308
  ## Test
298
309
  There are some programs in folder `test` to test the TCP communication:
299
310
  - Ananas32/64 is a slave simulator (only holding registers and inputs, no coils and digital inputs)
300
311
  - RMMS is master simulator
301
- - mod_RSsim.exe is a slave simulator. It can be that you need [Microsoft Visual C++ 2008 SP1 Redistributable Package](https://www.microsoft.com/en-us/download/details.aspx?id=5582) to start it (because of SideBySide error).
302
-
303
- ## Todo
304
- - [ ] Parse files on https://github.com/ioBroker/modbus-templates and allow to import them directly from adapter
312
+ - mod_RSsim.exe is a slave simulator. It can be that you need [Microsoft Visual C++ 2008 SP1 Redistributable Package](https://www.microsoft.com/en-us/download/details.aspx?id=5582) to start it (because of Side-By-Side error).
305
313
 
306
314
  <!--
307
315
  ### **WORK IN PROGRESS**
308
316
  -->
309
317
  ## Changelog
318
+ ### 7.0.1 (2025-10-07)
319
+ * (bluefox) Redesign of the configuration tabs
320
+ * (bluefox) Added option to remove leading underscores in the object names
321
+
322
+ ### 7.0.0 (2025-10-06)
323
+ * (copilot) Improved Modbus error handling and fault tolerance - continue polling working devices even when others fail
324
+ * (copilot) Fixes memory leak
325
+ * (copilot) Added option to disable connection error logging to avoid log spam when devices are unavailable
326
+ * (bluefox) Show values directly in configuration
327
+ * (bluefox) Implemented TLS connection (master)
328
+
310
329
  ### 6.4.0 (2024-11-22)
311
330
  * (bluefox) Moved GUI compilation to vite
312
331
  * (bluefox) Added error message if the response length is invalid
@@ -422,7 +441,7 @@ There are some programs in folder `test` to test the TCP communication:
422
441
  * (bluefox) fixed the configuration dialog for "input registers" in slave mode
423
442
 
424
443
  ### 3.3.0 (2021-04-16)
425
- * (Apollon77) Allow usage of write-only (no poll) states
444
+ * (Apollon77) Allowed usage of write-only (no poll) states
426
445
  * (Apollon77/TmShaz) F Write multiple registers
427
446
  * (prog42) create states of type string with default value of type string
428
447
 
@@ -500,7 +519,7 @@ There are some programs in folder `test` to test the TCP communication:
500
519
  * (bluefox) Refactoring
501
520
 
502
521
  ### 3.0.0 (2019-05-15)
503
- * (Apollon77) Support for nodejs 12 added, nodejs 4 is no longer supported!
522
+ * (Apollon77) Support for Node.js 12 added, Node.js 4 is no longer supported!
504
523
 
505
524
  ### 2.0.9 (2018-10-11)
506
525
  * (Bjoern3003) Write registers was corrected
@@ -621,7 +640,7 @@ There are some programs in folder `test` to test the TCP communication:
621
640
  ## License
622
641
  The MIT License (MIT)
623
642
 
624
- Copyright (c) 2015-2024 Bluefox <dogafox@gmail.com>
643
+ Copyright (c) 2015-2025 Bluefox <dogafox@gmail.com>
625
644
 
626
645
  Permission is hereby granted, free of charge, to any person obtaining a copy
627
646
  of this software and associated documentation files (the "Software"), to deal
@@ -1 +1 @@
1
- html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;height:100%;overflow:hidden}*::-webkit-scrollbar-track{background-color:#ccc}*::-webkit-scrollbar{width:6px;background-color:#ccc}*::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%}
1
+ html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;height:100%;overflow:hidden}*::-webkit-scrollbar-track{background-color:#ccc}*::-webkit-scrollbar{width:6px;background-color:#ccc}*::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%}.value-animate-dark{animation:valueGreenFlashDark 1s}@keyframes valueGreenFlashDark{0%{color:#44fa44}80%{color:#46ff46}to{color:inherit}}.value-animate-light{animation:valueGreenFlashLight 1s}@keyframes valueGreenFlashLight{0%{color:#004e00}80%{color:#005e00}to{color:inherit}}