I’m can’t find how to start use MAX-485 TTL to RS-485 converter module
with Raspberry and HA use python script or exist other way?
p.s. find one link about this
If you are trying to interface with an arduino, the usual way to do that with home assistant is https://www.home-assistant.io/integrations/arduino/
Otherwise, it is just a serial port and https://www.home-assistant.io/integrations/serial/
I’m want connect interface to Raspberry GPIO and question is how to setup this serial port, because see some solutions with USB ir TCP/IP Modbus
Well perhaps you missed this
Instructions for setting the device as a serial port, you already posted.
I’m think see this bus any information howto connect serial port to RASBI GPIO and how to setup PINS
Perhaps https://elinux.org/RPi_Serial_Connection#Connections_and_signal_levels (although it is very hard to understand what you are actually seeking)
I’m think hard understand when not have expirance
how to do this in Home Assistant
I am looking for the same solution and as per my finding the issue is that Modbus integration in HA is focused on serial communication. RS485 uses RE (Receive enable) and DE (Data enable) pins which are not covered in serial implementation in HA.
So the solution would be to implement a Full duplex communication like was suggested above.
In this way you would need 4 TTL-RS485 adapters. Two of them in the master (HA) with Raspberry TX pin connected to DI (data input) for the first converter, and RX pin to RO (Receive output) of th second converter. Also the same in every slave.
I am testing it right now so I cannot confirm it works.
What I know is that ArduinoModbus library covers this scenario and enable/disable the pins RE/DE while sending/receving because it is designed for RS485.
HA Modbus integration is designed for serial TTL not for RS485.
See here: https://proyectoarduino.com/comunicaciones-con-rs485/
By the way, I believe that if you use the USB-RS485 adapter it will work with HA Modbus integration because you don’t need to enable/disable the RE/DE bits.