07-11-2023, 11:54 AM
would this be a correct config with 4 A16 boards?
uart:
id: mbus
tx_pin: GPIO13
rx_pin: GPIO16
baud_rate: 9600
modbus:
id: modbus1
uart_id: mbus
send_wait_time: 200ms
modbus_controller_board2:
- id: a16-Board2
address: 1
modbus_id: modbus1
update_interval: 1s
modbus_controller_board3:
- id: a16-Board3
address: 2
modbus_id: modbus1
update_interval: 1s
modbus_controller_board4:
- id: a16-Board4
address: 3
modbus_id: modbus1
update_interval: 1s
switch:
- platform: modbus_controller_board2
name: 'modbus_board2-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board2
name: 'modbus_board2-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1
#Board 3
switch:
- platform: modbus_controller_board3
name: 'modbus_board3-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board3
name: 'modbus_board3-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1
#Board 4
switch:
- platform: modbus_controller_board4
name: 'modbus_board4-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board4
name: 'modbus_board4-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1
uart:
id: mbus
tx_pin: GPIO13
rx_pin: GPIO16
baud_rate: 9600
modbus:
id: modbus1
uart_id: mbus
send_wait_time: 200ms
modbus_controller_board2:
- id: a16-Board2
address: 1
modbus_id: modbus1
update_interval: 1s
modbus_controller_board3:
- id: a16-Board3
address: 2
modbus_id: modbus1
update_interval: 1s
modbus_controller_board4:
- id: a16-Board4
address: 3
modbus_id: modbus1
update_interval: 1s
switch:
- platform: modbus_controller_board2
name: 'modbus_board2-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board2
name: 'modbus_board2-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1
#Board 3
switch:
- platform: modbus_controller_board3
name: 'modbus_board3-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board3
name: 'modbus_board3-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1
#Board 4
switch:
- platform: modbus_controller_board4
name: 'modbus_board4-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1c
....
switch:
- platform: modbus_controller_board4
name: 'modbus_board4-switch16'
address: 15 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1