Hi folks,
I'm currently attempting to read modbus from a solis S5 inverter. I'm using a Lilygo ESP32 CAN RS485. I have sanity checked the modbus parameters on the inverter. Baud rate, parity, stop bits, slave address and believe I have them right. I have tried numerous yaml configurations and always with A/B swapped as well. But I haven't had any luck. Does anything jump out in the yaml as incorrect?
esphome:
name: inverter-modbus
friendly_name: Inverter Modbus
on_boot:
priority: 800
then:
- output.turn_on: rs485_se
output:
- platform: gpio
pin: GPIO19
id: rs485_se
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
level: DEBUG
logs:
modbus: DEBUG
modbus_controller: DEBUG
# Enable Home Assistant API
api:
encryption:
key: ****
ota:
- platform: esphome
password: ***
wifi:
ssid: ***
password: ***
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Inverter-Modbus Fallback Hotspot"
password: ***
captive_portal:
uart:
id: mod_uart
tx_pin: GPIO22
rx_pin: GPIO21
baud_rate: 9600
data_bits: 8
parity: NONE
stop_bits: 1
modbus:
id: modbus1
uart_id: mod_uart
flow_control_pin: GPIO17
send_wait_time: 1000ms
modbus_controller:
- id: solis
address: 0x01
modbus_id: modbus1
setup_priority: -10
update_interval: 30s
sensor:
- platform: modbus_controller
modbus_controller_id: solis
name: "Solis Temperature"
register_type: read
address: 3041
value_type: U_WORD`
