Plugin that acts as a gateway between Modbus TCP/IP and MQTT.
| Component | Version |
|---|---|
| Debian | Bullseye(11) & Bookworm(12) |
| Jeedom | >= 4.4 |
To use the plugin, you must download, install, and activate it just like any other Jeedom plugin. This plugin requires the MQTT Manager (MQTT2) plugin to work.
Before you begin, make sure you have installed and configured the MQTT Manager (MQTT2) plugin; see the documentation for this plugin.
On the plugin’s configuration page, you can change the following options:
The plugin can be found in the Plugins → Home Automation Protocol menu.
After creating a new device, the usual options are available.
Each device corresponds to a gateway consisting of a Modbus client and an MQTT client. The device will therefore connect to the Modbus device configured to read and write the defined registers and will connect to your MQTT broker to publish and receive the corresponding messages.
In addition to the general settings, you will need to configure the specific settings for the Modbus connection as well as the MQTT topic for this device.
There’s only one thing to configure: this device’s topic.
This will be a subtopic of the general plugin topic (see plugin configuration), and each Modbus register will be posted in a subtopic of this topic.
Example: If you have a Modbus device—which we’ll call solar—that provides the power output—which we’ll call power—the information will be published in the topic modbus2mqtt/solar/power
In the second tab, Registers, you’ll need to configure the Modbus registers you’re interested in and their corresponding MQTT values.
Example:
You must therefore specify:
power\set or power_set, for example.You can now save your device; the plugin will create the commands corresponding to your configuration, allowing you to retrieve the values directly from those commands. These values will be updated with each new publication and are therefore immediately available throughout Jeedom.
Therefore, you don’t need to configure any other MQTT device to retrieve the values; however, you are free to do so or to consume the MQTT topics from another device or platform…
The commands are displayed on the third tab, where you’ll find the usual configuration options. You should check and, if necessary, modify the subtype of the info commands (numeric or binary) so that it matches the registry definition.
If you have configured a topic to write a value to a register, a corresponding action/message command will also be created; this command can be used directly anywhere in Jeedom as well.
If you’re having a problem, start by reading the latest threads related to the plugin on community.
If you still can’t find an answer to your question, feel free to create a new thread—and don’t forget to include the plugin tag (plugin-modbus2mqtt).
At a minimum, you must provide:
Preformatted Text (use the </> button on the community), no files!