06-09-2025, 04:50 PM
Hello,
i would like to have two A16s communicate with uart via the RS485 in the ESPHome.
The two RS485 are cross-connected A=>B and B=>A.
One A16 is the transmitter and the other is the receiver.
When the binary sensor is triggered, a message should be sent to the receiver, which should then trigger an action.
So far the log says that the transmitter is transmitting, but according to the log nothing arrives at the receiver.
Transmitter, i have shortened the yaml to the essential parts:
Receiver, also shortened:
Where can i search the problem?
Best regards Mario
i would like to have two A16s communicate with uart via the RS485 in the ESPHome.
The two RS485 are cross-connected A=>B and B=>A.
One A16 is the transmitter and the other is the receiver.
When the binary sensor is triggered, a message should be sent to the receiver, which should then trigger an action.
So far the log says that the transmitter is transmitting, but according to the log nothing arrives at the receiver.
Transmitter, i have shortened the yaml to the essential parts:
Code:
substitutions:
mydelay_on: 50ms
mydelay_off: 300ms
uartcommand_allup: 0xAC, 0xAB, 0x01, 0x99
uartcommand_alldown: 0xAC, 0xAB, 0x02, 0x99
esphome:
name: roller-shutter-2
friendly_name: Roller_Shutter_2
on_boot:
priority: -100
then:
- lambda: |-
id(rollershutter_2).MySetup();
id(rollershutter_2).InitialRun();
esp32:
board: esp32dev
framework:
type: esp-idf
debug:
# Logger must be at least debug (default)
logger:
level: DEBUG
baud_rate: 9600
uart:
- id: rs485
tx_pin: GPIO13
rx_pin: GPIO16
baud_rate: 9600
stop_bits: 1
parity: NONE
data_bits: 8
debug:
direction: BOTH
dummy_receiver: false
sequence:
- lambda: |-
UARTDebug::log_binary(direction, bytes, ';');
button:
- platform: uart
id: uart_master_all_up
uart_id: rs485
data: $uartcommand_allup
- platform: uart
uart_id: rs485
id: uart_master_all_down
data: $uartcommand_alldown
pcf8574:
- id: inputs_1_8
address: 0x22
pcf8575: false
- id: inputs_9_16
address: 0x21
pcf8575: false
- id: outputs_1_8
address: 0x24
pcf8575: false
- id: outputs_9_16
address: 0x25
pcf8575: false
binary_sensor:
- platform: gpio
name: "ZEN_I_U"
pin:
pcf8574: inputs_9_16
number: 2
mode: INPUT
inverted: true
filters:
- delayed_on: $mydelay_on
- delayed_off: $mydelay_off
on_press:
then:
- uart.write: [0xAC, 0xAB, 0x01, 0x99]
- platform: gpio
name: "ZEN_I_D"
pin:
pcf8574: inputs_9_16
number: 3
mode: INPUT
inverted: true
filters:
- delayed_on: $mydelay_on
- delayed_off: $mydelay_off
on_press:
then:
- uart.write: [0xAC, 0xAB, 0x02, 0x99]
- platform: gpio
name: "URL_I_UD"
pin:
pcf8574: inputs_9_16
number: 4
mode: INPUT
inverted: true
filters:
- delayed_on: $mydelay_on
- delayed_off: $mydelay_off
on_press:
then:
- switch.turn_on: uart_master_holiday
on_release:
then:
- switch.turn_off: uart_master_holiday
switch:
- platform: template
id: uart_master_holiday
optimistic: True
on_turn_on:
then:
- uart.write: [0xAC, 0xAB, 0x03, 0x99]
on_turn_off:
then:
- uart.write: [0xAC, 0xAB, 0x04, 0x99]Receiver, also shortened:
Code:
esphome:
name: roller-shutter-1
friendly_name: Roller_Shutter_1
esp32:
board: esp32dev
framework:
type: esp-idf
debug:
# Logger must be at least debug (default)
logger:
level: DEBUG
baud_rate: 9600
uart:
- id: rs485
tx_pin: GPIO13
rx_pin: GPIO16
baud_rate: 9600
stop_bits: 1
parity: NONE
data_bits: 8
debug:
direction: RX
dummy_receiver: true
sequence:
- lambda: |-
UARTDebug::log_binary(direction, bytes, ';');Where can i search the problem?
Best regards Mario

