Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
38c20bc
P183 initial state
flashmark Aug 24, 2025
46f2a50
P183 2nd attempt
flashmark Aug 24, 2025
7d0e802
P183 Add initial documentation
flashmark Aug 27, 2025
cc31b10
P183 Add documentation (preliminary)
flashmark Aug 28, 2025
53ec930
P183 Minor rework
flashmark Aug 31, 2025
a715544
Baseline before refacoring
flashmark Sep 6, 2025
5f8868a
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Sep 15, 2025
aa34ac3
P183 Uncrustify
flashmark Sep 15, 2025
02f46b3
Merge branch 'P183_Modbus_registers' of https://github.com/flashmark/…
flashmark Sep 15, 2025
11cf754
Starting complete make over
flashmark Sep 30, 2025
e7aabda
P183 Rework phase 1
flashmark Oct 6, 2025
1ee2b35
Merge branch 'mega' into P183_Modbus_registers
flashmark Oct 6, 2025
18e8b86
P183 Small refactoring
flashmark Oct 6, 2025
bd7661e
P183 Snapshot refactoring
flashmark Oct 12, 2025
8c66411
P183 Start cleaning up
flashmark Oct 15, 2025
fc27c88
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Oct 15, 2025
8f5e5f9
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Oct 17, 2025
a4dfca1
P183 Pending rework, not final
flashmark Oct 17, 2025
7795cc1
P183 Several fixes
flashmark Oct 18, 2025
6e201fb
P183 Update logging
flashmark Oct 23, 2025
280e8bf
P183: Init link fix & minor updates
flashmark Oct 23, 2025
4515c8c
P183: initial UML design documentation
flashmark Oct 23, 2025
21b427e
P183: Minor fixes and start of design documentation
flashmark Oct 26, 2025
8d5ce4d
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Oct 27, 2025
5ba2f9f
Merge branch 'mega' into P183_Modbus_registers
flashmark Dec 11, 2025
b432092
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Dec 13, 2025
c182cea
P183 Added documentation
flashmark Dec 13, 2025
67134da
Merge branch 'mega' into P183_Modbus_registers
TD-er Feb 10, 2026
3495afe
Merge branch 'mega' into P183_Modbus_registers
TD-er Feb 10, 2026
abe1a67
Merge branch 'mega' into P183_Modbus_registers
TD-er Feb 12, 2026
e93b4c3
Merge branch 'mega' into P183_Modbus_registers
TD-er Feb 13, 2026
ef31d27
[P183] Make new generic Modbus RTU PR build again
TD-er Feb 13, 2026
c322798
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Feb 16, 2026
da1e31d
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Mar 5, 2026
0098e3c
Secure work in progress, don't merge to master
flashmark Mar 20, 2026
7e01a41
Merge branch 'mega' into P183_Modbus_registers
flashmark Mar 20, 2026
934b595
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Apr 7, 2026
610c3e9
P183 snapshot
flashmark Apr 7, 2026
33e4439
Merge branch 'P183_Modbus_registers' of https://github.com/flashmark/…
flashmark Apr 7, 2026
6b774aa
P183 modbus interfaces support
flashmark Apr 16, 2026
7efc42d
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Apr 16, 2026
68bba7f
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark Apr 23, 2026
2e2ab34
Save state some init problems left
flashmark Apr 23, 2026
bb28e71
Merge branch 'P183_Modbus_registers' of https://github.com/flashmark/…
flashmark Apr 23, 2026
470d3c2
securing state, not ready yet
flashmark Apr 27, 2026
884deb3
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark May 1, 2026
c66aee9
Functionality ready, to be debugged and cleaned up
flashmark May 2, 2026
79ffeb4
Merge branch 'P183_Modbus_registers' of https://github.com/flashmark/…
flashmark May 2, 2026
afa1b6a
Small review comment updates
flashmark May 3, 2026
0f9c1dd
Rework & fixed initialization
flashmark May 3, 2026
d254ae4
P183 documentation update
flashmark May 5, 2026
9111e0d
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark May 9, 2026
30d2b12
P183 Modbus cleanup, not ready yet
flashmark May 9, 2026
115cb39
Merge branch 'letscontrolit:mega' into P183_Modbus_registers
flashmark May 16, 2026
6f2cb43
P183 Modbus add cache region
flashmark May 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions docs/source/Plugin/P183.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
.. include:: ../Plugin/_plugin_substitutions_p18x.repl
.. _P183_page:

|P183_typename|
==================================================

|P183_shortinfo|

Plugin details
--------------

Type: |P183_type|

Port Type: |P183_porttype|

Name: |P183_name|

Status: |P183_status|

GitHub: |P183_github|_

Maintainer: |P183_maintainer|

Used libraries: |P183_usedlibraries|

Introduction
------------

Modbus is a serial communication protocol commonly used for connecting industrial electronic devices.
It is a master/slave (or client/server) protocol, which means that one device (the master) initiates communication and the other devices (the slaves) respond.
Modbus RTU (Remote Terminal Unit) is a variant of the Modbus protocol that uses binary representation of data and is typically used over serial communication lines such as RS-485 or RS-232.
This plugin supports Modbus RTU communication over a serial interface. To support RS-485 communication, an external RS-485 to TTL converter is required.

Modbus RTU uses a register-based addressing scheme, where each device has a unique address and data is stored in registers.
Registers can be of different types, such as holding registers, input registers, coils, and discrete inputs.
This plugin supports reading holding registers (function code 03) and writing to holding registers (function code 06).

The plugin can be configured to read up to 4 holding registers from a Modbus slave device and store the values in user variables.
It can also write values to a specified holding register on the Modbus slave device.

The plugin does not support any hardware specific features. Instead it is a generic plugin that can be used with any Modbus RTU compatible device. You have to lookup the correct register addresses and data formats in the documentation of the Modbus device you want to communicate with.

Supported hardware
------------------

|P183_usedby|

Configuration
-------------

* **Name**: Required by ESPEasy, must be unique among the list of available devices/tasks.

* **Enabled**: The device can be disabled or enabled. When not enabled the device should not use any resources.

Sensor
^^^^^^

.. image:: P183_sensor_config.png

The available Serial protocol settings here depend on the build used.

* **Serial Port**: The serial port to use for Modbus communication.

* **Baudrate**: The baudrate for the serial communication. Common values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.

* **Modbus Device Address**: The Modbus slave device ID to communicate with (1..247).

* **Enable Collision Detection**: Enable collision detection to avoid data corruption when multiple devices are connected to the same serial bus. This requires a GPIO pin to be configured as input and connected to the bus transceiver's DE/RE pin.

* **ESP RX GPIO ← TX (RO)**: The GPIO pin to use as RX input for the serial communication. This pin should be connected to the TX output of the RS-485 to TTL converter.

* **ESP TX GPIO → RX (DI)**: The GPIO pin to use as TX output for the serial communication. This pin should be connected to the RX input of the RS-485 to TTL converter.

* **GPIO → RE/DE(optional)**: The GPIO pin to use for collision detection. This pin should be connected to the DE/RE pin of the RS-485 to TTL converter.

Output Configuration
^^^^^^^^^^^^^^^^^^^^

.. image:: P183_output_config.png

* **Number of registers to read**: The number of holding registers the plugin will read (1..4).

* **Holding register for valueX**: The Modbus holding register address to read for valueX (X=1..4).

The holding register address is a 16-bit value (0..65535). This is the register address as specified with the Modbus device and is used directly in the Modbus read holding registers (function code 03). The plugin will read the number of values specified, starting with value1

Commands available
^^^^^^^^^^^^^^^^^^

.. include:: P183_commands.repl

.. Events
.. ~~~~~~

.. .. include:: P183_events.repl

Change log
----------

.. versionchanged:: 2.0
...

|added|
Major overhaul for 2.0 release.

.. versionadded:: 1.0
...

|added|
Initial release version.





28 changes: 28 additions & 0 deletions docs/source/Plugin/P183_commands.repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. csv-table::
:header: "Command", "Extra information"
:widths: 20, 30

"
``modbus,write,<address>,<value>``

","
Write a value into the specified holding register.
"
"
``modbus,read,<value>``

","
Read the value from the specified holding register.
"
"
``modbus,scan``

","
Scans the modbus address range for responding units. It will do a read function for holding register 1. Note this will take some time. Ouput is in the logging.
"
"
``modbus,dump,<start>,<end>``

","
Dumps the holding registers in the given address range.
"
Binary file added docs/source/Plugin/P183_output_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/Plugin/P183_sensor_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/Plugin/_Plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ There are different released versions of ESP Easy:
":ref:`P176_page`","|P176_status|","P176"
":ref:`P177_page`","|P177_status|","P177"
":ref:`P178_page`","|P178_status|","P178"

":ref:`P183_page`","|P183_status|","P183"

.. include:: _plugin_sets_overview.repl

Expand Down
2 changes: 1 addition & 1 deletion docs/source/Plugin/_plugin_categories.repl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. |Plugin_Analog_input| replace:: :ref:`P002_page`, :ref:`P007_page`, :ref:`P025_page`, :ref:`P060_page`, :ref:`P097_page`
.. |Plugin_Acceleration| replace:: :ref:`P120_page`, :ref:`P125_page`
.. |Plugin_Color| replace:: :ref:`P112_page`
.. |Plugin_Communication| replace:: :ref:`P016_page`, :ref:`P020_page`, :ref:`P035_page`, :ref:`P044_page`, :ref:`P054_page`, :ref:`P071_page`, :ref:`P087_page`, :ref:`P089_page`, :ref:`P094_page`, :ref:`P101_page`, :ref:`P118_page`, :ref:`P176_page`
.. |Plugin_Communication| replace:: :ref:`P016_page`, :ref:`P020_page`, :ref:`P035_page`, :ref:`P044_page`, :ref:`P054_page`, :ref:`P071_page`, :ref:`P087_page`, :ref:`P089_page`, :ref:`P094_page`, :ref:`P101_page`, :ref:`P118_page`, :ref:`P176_page`, :ref:`P183_page`
.. |Plugin_Display| replace:: :ref:`P012_page`, :ref:`P023_page`, :ref:`P036_page`, :ref:`P057_page`, :ref:`P073_page`, :ref:`P075_page`, :ref:`P095_page`, :ref:`P104_page`, :ref:`P116_page`, :ref:`P131_page`, :ref:`P148_page`
.. |Plugin_Distance| replace:: :ref:`P013_page`, :ref:`P110_page`, :ref:`P113_page`, :ref:`P134_page`
.. |Plugin_Dust| replace:: :ref:`P018_page`, :ref:`P053_page`, :ref:`P056_page`, :ref:`P144_page`, :ref:`P175_page`
Expand Down
38 changes: 29 additions & 9 deletions docs/source/Plugin/_plugin_sets_overview.repl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Build set: :yellow:`COLLECTION A`
":ref:`P037_page`","P037"
":ref:`P038_page`","P038"
":ref:`P039_page`","P039"
":ref:`P040_page`","P040"
":ref:`P043_page`","P043"
":ref:`P044_page`","P044"
":ref:`P045_page`","P045"
Expand Down Expand Up @@ -161,6 +160,7 @@ Build set: :yellow:`COLLECTION A`
":ref:`P134_page`","P134"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
":ref:`C001_page`","C001"
Expand Down Expand Up @@ -262,6 +262,7 @@ Build set: :yellow:`COLLECTION B`
":ref:`P115_page`","P115"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
":ref:`C001_page`","C001"
Expand Down Expand Up @@ -359,6 +360,7 @@ Build set: :yellow:`COLLECTION C`
":ref:`P111_page`","P111"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P143_page`","P143"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
Expand Down Expand Up @@ -395,20 +397,26 @@ Build set: :yellow:`COLLECTION D`
":ref:`P004_page`","P004"
":ref:`P005_page`","P005"
":ref:`P006_page`","P006"
":ref:`P007_page`","P007"
":ref:`P008_page`","P008"
":ref:`P009_page`","P009"
":ref:`P010_page`","P010"
":ref:`P011_page`","P011"
":ref:`P012_page`","P012"
":ref:`P013_page`","P013"
":ref:`P014_page`","P014"
":ref:`P015_page`","P015"
":ref:`P017_page`","P017"
":ref:`P018_page`","P018"
":ref:`P019_page`","P019"
":ref:`P020_page`","P020"
":ref:`P021_page`","P021"
":ref:`P022_page`","P022"
":ref:`P023_page`","P023"
":ref:`P024_page`","P024"
":ref:`P025_page`","P025"
":ref:`P026_page`","P026"
":ref:`P027_page`","P027"
":ref:`P028_page`","P028"
":ref:`P029_page`","P029"
":ref:`P031_page`","P031"
Expand Down Expand Up @@ -459,6 +467,7 @@ Build set: :yellow:`COLLECTION D`
":ref:`P127_page`","P127"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
":ref:`C001_page`","C001"
Expand Down Expand Up @@ -518,7 +527,6 @@ Build set: :yellow:`COLLECTION E`
":ref:`P037_page`","P037"
":ref:`P038_page`","P038"
":ref:`P039_page`","P039"
":ref:`P040_page`","P040"
":ref:`P043_page`","P043"
":ref:`P044_page`","P044"
":ref:`P045_page`","P045"
Expand Down Expand Up @@ -560,6 +568,7 @@ Build set: :yellow:`COLLECTION E`
":ref:`P135_page`","P135"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P144_page`","P144"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
Expand Down Expand Up @@ -656,6 +665,7 @@ Build set: :yellow:`COLLECTION F`
":ref:`P122_page`","P122"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P145_page`","P145"
":ref:`P146_page`","P146"
":ref:`P147_page`","P147"
Expand Down Expand Up @@ -751,8 +761,10 @@ Build set: :yellow:`COLLECTION G`
":ref:`P082_page`","P082"
":ref:`P089_page`","P089"
":ref:`P095_page`","P095"
":ref:`P105_page`","P105"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P142_page`","P142"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
Expand All @@ -766,6 +778,7 @@ Build set: :yellow:`COLLECTION G`
":ref:`P170_page`","P170"
":ref:`P172_page`","P172"
":ref:`P173_page`","P173"
":ref:`P177_page`","P177"
":ref:`P178_page`","P178"
":ref:`C001_page`","C001"
":ref:`C002_page`","C002"
Expand Down Expand Up @@ -866,6 +879,7 @@ Build set: :yellow:`CLIMATE`
":ref:`P172_page`","P172"
":ref:`P173_page`","P173"
":ref:`P175_page`","P175"
":ref:`P177_page`","P177"
":ref:`P178_page`","P178"
":ref:`C001_page`","C001"
":ref:`C002_page`","C002"
Expand Down Expand Up @@ -896,26 +910,20 @@ Build set: :yellow:`DISPLAY`
":ref:`P004_page`","P004"
":ref:`P005_page`","P005"
":ref:`P006_page`","P006"
":ref:`P007_page`","P007"
":ref:`P008_page`","P008"
":ref:`P009_page`","P009"
":ref:`P010_page`","P010"
":ref:`P011_page`","P011"
":ref:`P012_page`","P012"
":ref:`P013_page`","P013"
":ref:`P014_page`","P014"
":ref:`P015_page`","P015"
":ref:`P017_page`","P017"
":ref:`P018_page`","P018"
":ref:`P019_page`","P019"
":ref:`P020_page`","P020"
":ref:`P021_page`","P021"
":ref:`P022_page`","P022"
":ref:`P023_page`","P023"
":ref:`P024_page`","P024"
":ref:`P025_page`","P025"
":ref:`P026_page`","P026"
":ref:`P027_page`","P027"
":ref:`P028_page`","P028"
":ref:`P029_page`","P029"
":ref:`P031_page`","P031"
Expand All @@ -926,7 +934,6 @@ Build set: :yellow:`DISPLAY`
":ref:`P037_page`","P037"
":ref:`P038_page`","P038"
":ref:`P039_page`","P039"
":ref:`P040_page`","P040"
":ref:`P043_page`","P043"
":ref:`P044_page`","P044"
":ref:`P049_page`","P049"
Expand All @@ -947,6 +954,7 @@ Build set: :yellow:`DISPLAY`
":ref:`P123_page`","P123"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P141_page`","P141"
":ref:`P143_page`","P143"
":ref:`P146_page`","P146"
Expand Down Expand Up @@ -1027,6 +1035,7 @@ Build set: :yellow:`ENERGY`
":ref:`P132_page`","P132"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P146_page`","P146"
":ref:`P148_page`","P148"
":ref:`P152_page`","P152"
Expand Down Expand Up @@ -1059,21 +1068,27 @@ Build set: :yellow:`IR`
":ref:`P004_page`","P004"
":ref:`P005_page`","P005"
":ref:`P006_page`","P006"
":ref:`P007_page`","P007"
":ref:`P008_page`","P008"
":ref:`P009_page`","P009"
":ref:`P010_page`","P010"
":ref:`P011_page`","P011"
":ref:`P012_page`","P012"
":ref:`P013_page`","P013"
":ref:`P014_page`","P014"
":ref:`P015_page`","P015"
":ref:`P016_page`","P016"
":ref:`P017_page`","P017"
":ref:`P018_page`","P018"
":ref:`P019_page`","P019"
":ref:`P020_page`","P020"
":ref:`P021_page`","P021"
":ref:`P022_page`","P022"
":ref:`P023_page`","P023"
":ref:`P024_page`","P024"
":ref:`P025_page`","P025"
":ref:`P026_page`","P026"
":ref:`P027_page`","P027"
":ref:`P028_page`","P028"
":ref:`P029_page`","P029"
":ref:`P031_page`","P031"
Expand Down Expand Up @@ -1232,6 +1247,7 @@ Build set: :yellow:`NEOPIXEL`
":ref:`P131_page`","P131"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P146_page`","P146"
":ref:`P152_page`","P152"
":ref:`P165_page`","P165"
Expand Down Expand Up @@ -1391,6 +1407,8 @@ Build set: :yellow:`MAX`
":ref:`P135_page`","P135"
":ref:`P137_page`","P137"
":ref:`P138_page`","P138"
":ref:`P139_page`","P139"
":ref:`P140_page`","P140"
":ref:`P141_page`","P141"
":ref:`P142_page`","P142"
":ref:`P143_page`","P143"
Expand Down Expand Up @@ -1418,7 +1436,9 @@ Build set: :yellow:`MAX`
":ref:`P173_page`","P173"
":ref:`P175_page`","P175"
":ref:`P176_page`","P176"
":ref:`P177_page`","P177"
":ref:`P178_page`","P178"
":ref:`P183_page`","P183"
":ref:`C001_page`","C001"
":ref:`C002_page`","C002"
":ref:`C003_page`","C003"
Expand Down
1 change: 1 addition & 0 deletions docs/source/Plugin/_plugin_substitutions.repl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
.. include:: ../Plugin/_plugin_substitutions_p15x.repl
.. include:: ../Plugin/_plugin_substitutions_p16x.repl
.. include:: ../Plugin/_plugin_substitutions_p17x.repl
.. include:: ../Plugin/_plugin_substitutions_p18x.repl
Loading