Hi to all!
I have remote solar controller with modbus (RS-485) interface.
I am currently collecting data using a 4G wireless router (Teltonika RUT955) using its embedded RS-485 interface.
I need to use one of the several RUT240 model I don’t use instead buying new RUT955 (in this case RS-485 interface not available), so I thought to create my own wireless RS-485 bridge using ESP32.
I ordered ESP32 board and RS-485 adapter, meanwhile I am taking a look to the code… Modbus Controller
I am confused about client (so my ESP32) code: I already set on my HA code for reading register at 0x9001 when using RUT955:
What!?!?!?
I need “modbus” in HA to collect data through modbus protocol, I am currently using this for several RUT955 and it works, why do you say I don’t need it if I want swap RUT955 with ESP?
Hi @rosenrot00, thanks for creating this modbus bridge for ESPhome. I was was originally using ESPhome but then had to move to tasmota because there wasn’t a modbus bridge previously available.
I am using HA modbus component to control an air conditioner with the modbus bridge acting as the tcp to serial interface. In tasmota I was able to configure the serial baud rate, parity bit and bit size using the command here (Modbus Bridge - Tasmota) , but I cant see anywhere in the yaml to do this apart from configuring the serial communication between the ESP32 and the UART RTU adapter but not the RTU to the Modbus devices. Please correct me if im wrong.
Hi @vijaykbhatia the UART parameters are directly mapped to the Modbus RTU configuration. When a Modbus transceiver is connected, communication is forwarded according to the configured UART settings. Just set your baud, parity,… in UART and it will work.
I started out with Tasmota as well but I felt it as a loss to have a ESP32 which I can’t use for other tasks in parallel. With ESPHome it can now act as a bluetooth relay and much more. At least if you work with Homeassistant for me using ESPHome over Tasmota is much more versatile.
Reporting back it is all working well with an Actron BMS board. Fairly smooth swap over once I remembered it had an even parity. Thanks for your work, its great t have this working in ESPhome and can have all the other benefits like Bluetooth proxy etc