currently, I am working on an open source software named modbus2mqtt.
It will be available as docker image and as integration to HA.
It works as follows: Known modbus device
The user selects a modbus controller (USB RS485 stick) from a list
He/she selects a slave.
If there is a “known” device configured for this slave, it will be detected and can be used in Homeassistant without any further configuration (MQTT discovery).
The device is unknown to modbus2mqtt
The user configures an own specification for the device. This configuration will contain the mapping from modbus data to mqtt topics. It will contain the conversion rules and the mqtt discovery information.
Then, the user saves the specification can can immediately use the new device in HA.
Contribution of Specifications
If a user created a specification, it can be published to the community. In this case, it can be used by everyone in the Known modbus device scenario above. The contribution is an integrated process. It happens on github. However, all interactions except authentication is integrated into modbus2mqtt
I assume, the application will be available by end of june '24.
In the beginning, it will support the following devices:
Just wait for the software. It’s very easy to configure it on your own.
The point is:
Modbus2mqtt works best if you have the converter connected to your own RS485 connector.
It will immediately show the generated mqtt values. That way, it is very easy to configure the device correctly. It doesn’t make sense to configure a device, which you don’t have in your own modbus.
However, once it’s available, I can help you configuring it.
Looks promissing. Does it work in both directions, so one can also send commands to the modbus device? I want to control individual hvac fan units in every (guest)room via Sauter Control NRFC4 thermostats from HA.
Great project! Can it also be used with modbus TCP devices? I have several of this kind, but the modbus implementation in HA is very complicated to use and laggy for writing to modbus registers.Modbus to mqtt would be the perfect solution.
I’ve just seen this. I can’t connect our PCO5 directly to Home Assistant, as the server is somewhere else. However, I plan to use a simple ESPHome/RS485 bridge to connect to the PCO5. Do you have a regiuster map of the PCO5?
The Marstek Venus Venus Energycube – MARSTEK NL-venus-energycube publishes its information with the Modbus.
I have all the documentation and i would like to publish an interface.
But there is a problem: The Mastek publishes its CRC with swapped bytes.
Does Modbus<>MQTT use normal TCP or can it also use RTUoverTCP?
I can only use RTUoverTCP on my Elfin EW11 because the EW11 blocks modbus communication with swapped CRC.
Can Modbus<>MQTT" implement RTUoverTCP and have a “Normal CRC” and a “Reverse CRC” option?
The problem is the response of the Marstek, checked with: Online Modbus RTU Parser & Modbus TCP Parser
Marstek Modbus RTU Reply cannot be passed because of the swapped CRC: 01030208ccd1bf
Nice so you can have an Aac battery with real time values in HA? Like charge/discharge, state of chsrge? Kann you program it, so it only charges when the PV would otherwise send it to the grid?
I’d like to let you know about an alternative Modbus integration via MQTT. It is generic, i.e. open for any Modbus device, and targeted at experienced users willing to edit files without a UI. Modbus device information is managed in a CSV file, and the Modbus to MQTT adapter is running in a separate container, independent of Home Assistant.