iobroker.modbus 6.4.0 → 7.0.0

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 (68) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +26 -8
  3. package/admin/assets/index-B6TQg3IZ.js +1719 -0
  4. package/admin/assets/{index-Bd3GtHgn.css → index-Bk6U_LJW.css} +1 -1
  5. package/admin/index_m.html +28 -19
  6. package/build/lib/Master.js +811 -0
  7. package/build/lib/Master.js.map +1 -0
  8. package/build/lib/Put.js +113 -0
  9. package/build/lib/Put.js.map +1 -0
  10. package/build/lib/Slave.js +545 -0
  11. package/build/lib/Slave.js.map +1 -0
  12. package/{lib → build/lib}/common.js +11 -26
  13. package/build/lib/common.js.map +1 -0
  14. package/build/lib/crc16modbus.js +33 -0
  15. package/build/lib/crc16modbus.js.map +1 -0
  16. package/build/lib/jsmodbus/modbus-client-core.js +528 -0
  17. package/build/lib/jsmodbus/modbus-client-core.js.map +1 -0
  18. package/build/lib/jsmodbus/modbus-server-core.js +363 -0
  19. package/build/lib/jsmodbus/modbus-server-core.js.map +1 -0
  20. package/{lib → build/lib}/jsmodbus/transports/errors.js +4 -2
  21. package/build/lib/jsmodbus/transports/errors.js.map +1 -0
  22. package/build/lib/jsmodbus/transports/modbus-client-serial.js +154 -0
  23. package/build/lib/jsmodbus/transports/modbus-client-serial.js.map +1 -0
  24. package/build/lib/jsmodbus/transports/modbus-client-tcp-rtu.js +166 -0
  25. package/build/lib/jsmodbus/transports/modbus-client-tcp-rtu.js.map +1 -0
  26. package/build/lib/jsmodbus/transports/modbus-client-tcp-ssl.js +138 -0
  27. package/build/lib/jsmodbus/transports/modbus-client-tcp-ssl.js.map +1 -0
  28. package/build/lib/jsmodbus/transports/modbus-client-tcp.js +123 -0
  29. package/build/lib/jsmodbus/transports/modbus-client-tcp.js.map +1 -0
  30. package/build/lib/jsmodbus/transports/modbus-server-serial.js +206 -0
  31. package/build/lib/jsmodbus/transports/modbus-server-serial.js.map +1 -0
  32. package/build/lib/jsmodbus/transports/modbus-server-tcp.js +112 -0
  33. package/build/lib/jsmodbus/transports/modbus-server-tcp.js.map +1 -0
  34. package/build/lib/loggingUtils.js +37 -0
  35. package/build/lib/loggingUtils.js.map +1 -0
  36. package/build/main.js +962 -0
  37. package/build/main.js.map +1 -0
  38. package/io-package.json +21 -15
  39. package/package.json +19 -22
  40. package/admin/assets/index-IjDYuufQ.js +0 -1678
  41. package/lib/jsmodbus/README.md +0 -206
  42. package/lib/jsmodbus/handler/client/ReadCoils.js +0 -56
  43. package/lib/jsmodbus/handler/client/ReadDiscreteInputs.js +0 -60
  44. package/lib/jsmodbus/handler/client/ReadHoldingRegisters.js +0 -50
  45. package/lib/jsmodbus/handler/client/ReadInputRegisters.js +0 -57
  46. package/lib/jsmodbus/handler/client/WriteMultipleCoils.js +0 -71
  47. package/lib/jsmodbus/handler/client/WriteMultipleRegisters.js +0 -70
  48. package/lib/jsmodbus/handler/client/WriteSingleCoil.js +0 -49
  49. package/lib/jsmodbus/handler/client/WriteSingleRegister.js +0 -48
  50. package/lib/jsmodbus/handler/server/ReadCoils.js +0 -71
  51. package/lib/jsmodbus/handler/server/ReadDiscreteInputs.js +0 -71
  52. package/lib/jsmodbus/handler/server/ReadHoldingRegisters.js +0 -57
  53. package/lib/jsmodbus/handler/server/ReadInputRegisters.js +0 -56
  54. package/lib/jsmodbus/handler/server/WriteMultipleCoils.js +0 -81
  55. package/lib/jsmodbus/handler/server/WriteMultipleRegisters.js +0 -64
  56. package/lib/jsmodbus/handler/server/WriteSingleCoil.js +0 -69
  57. package/lib/jsmodbus/handler/server/WriteSingleRegister.js +0 -54
  58. package/lib/jsmodbus/index.js +0 -18
  59. package/lib/jsmodbus/modbus-client-core.js +0 -152
  60. package/lib/jsmodbus/modbus-server-core.js +0 -96
  61. package/lib/jsmodbus/package.json +0 -50
  62. package/lib/jsmodbus/transports/modbus-client-serial.js +0 -172
  63. package/lib/jsmodbus/transports/modbus-client-tcp-rtu.js +0 -193
  64. package/lib/jsmodbus/transports/modbus-client-tcp.js +0 -154
  65. package/lib/jsmodbus/transports/modbus-server-tcp.js +0 -146
  66. package/lib/master.js +0 -1037
  67. package/lib/slave.js +0 -532
  68. 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.
@@ -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,13 +303,13 @@ 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).
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).
302
313
 
303
314
  ## Todo
304
315
  - [ ] Parse files on https://github.com/ioBroker/modbus-templates and allow to import them directly from adapter
@@ -307,6 +318,13 @@ There are some programs in folder `test` to test the TCP communication:
307
318
  ### **WORK IN PROGRESS**
308
319
  -->
309
320
  ## Changelog
321
+ ### 7.0.0 (2025-10-06)
322
+ * (copilot) Improved Modbus error handling and fault tolerance - continue polling working devices even when others fail
323
+ * (copilot) Fixes memory leak
324
+ * (copilot) Added option to disable connection error logging to avoid log spam when devices are unavailable
325
+ * (bluefox) Show values directly in configuration
326
+ * (bluefox) Implemented TLS connection (master)
327
+
310
328
  ### 6.4.0 (2024-11-22)
311
329
  * (bluefox) Moved GUI compilation to vite
312
330
  * (bluefox) Added error message if the response length is invalid
@@ -422,7 +440,7 @@ There are some programs in folder `test` to test the TCP communication:
422
440
  * (bluefox) fixed the configuration dialog for "input registers" in slave mode
423
441
 
424
442
  ### 3.3.0 (2021-04-16)
425
- * (Apollon77) Allow usage of write-only (no poll) states
443
+ * (Apollon77) Allowed usage of write-only (no poll) states
426
444
  * (Apollon77/TmShaz) F Write multiple registers
427
445
  * (prog42) create states of type string with default value of type string
428
446
 
@@ -500,7 +518,7 @@ There are some programs in folder `test` to test the TCP communication:
500
518
  * (bluefox) Refactoring
501
519
 
502
520
  ### 3.0.0 (2019-05-15)
503
- * (Apollon77) Support for nodejs 12 added, nodejs 4 is no longer supported!
521
+ * (Apollon77) Support for Node.js 12 added, Node.js 4 is no longer supported!
504
522
 
505
523
  ### 2.0.9 (2018-10-11)
506
524
  * (Bjoern3003) Write registers was corrected
@@ -621,7 +639,7 @@ There are some programs in folder `test` to test the TCP communication:
621
639
  ## License
622
640
  The MIT License (MIT)
623
641
 
624
- Copyright (c) 2015-2024 Bluefox <dogafox@gmail.com>
642
+ Copyright (c) 2015-2025 Bluefox <dogafox@gmail.com>
625
643
 
626
644
  Permission is hereby granted, free of charge, to any person obtaining a copy
627
645
  of this software and associated documentation files (the "Software"), to deal