Plugin to create a gateway between modbus TCP/IP and MQTT.
Component | Version |
---|---|
Debian | Bullseye(11) & Bookworm(12) |
Jeedom | >= 4.4 |
In order to use the plugin, you must download, install and activate it like any Jeedom plugin. This plugin requires the MQTT Manager (MQTT2) plugin to work.
Before starting, make sure you have installed and configured the MQTT Manager (MQTT2) plugin, see plugin documentation.
In the plugin configuration page, you can change the following options:
The plugin can be found in the Plugins → Home automation protocol menu.
After creating new device, the usual options are available.
Each device corresponds to a gateway composed of a modbus client and a 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.
On top of the general parameters, it will therefore be necessary to configure the specific parameters for the modbus connection as well as the MQTT topic for this device.
Only one element to configure, the topic of this device.
It will be a sub-topic of the general plugin topic (see plugin configuration) and each modbus register will be published in a sub-topic of this topic.
Example: if you have modbus device that we will call solar which allows you to obtain the power produced that we will call power, the information will be published in the topic modbus2mqtt/solar/power
In the second tab, Registers, you will have to configure the modbus registers that interest you and their MQTT correspondence.
Example:
So you need to specify:
power\set
or power_set
for example.You can now save your device; the plugin will create the commands corresponding to your configuration and you will therefore be able to obtain the values directly on these commands, they will be updated with each new publication and are therefore directly usable everywhere under Jeedom.
It is therefore not necessary to configure another MQTT device to obtain the values, however you are free to do so or to consume the MQTT topics from another device, another platform…
The commands are visible in the 3rd tab and you will find the usual configuration options there. You should check and if necessary change the subtype of the info commands (numeric or binary) to match the registry definition.
If you have configured a topic to be able to write a value in a register, a corresponding action/message command will also be created, this command can be used directly everywhere in Jeedom as well.
If you have a problem, start by reading the latest plugin-related topics on community.
If despite this you do not find an answer to your question, do not hesitate to create a new topic, with the tag of the plugin (plugin-modbus2mqtt).
At a minimum, you will need to provide:
Preformatted Text
(button </>
on community), no files!