-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi,
I'm trying to connect my ESP32 to All in ONe ESS Low voltage hybrid inverter (AI-W5.1-12P3-EU-B).
I'm not getting connected and have tried the following:
- switch rx/tx
- Enable / diasable flow control
- Trying different modbus_controller_id
- Different power-supplys, cat6 cables, etc.
I have connected it to the modbus port in the inverter and checked all from baud to adress, etc.
I'm just getting these kind of errors:

The board i use is a Lilygo - and my code looks like this:
substitutions:
modbus_controller_id: sg04lp3
update_interval: 10sec
esphome:
name: deye
comment: "Deye Inverter Modbus/RS485"
on_boot:
- priority: 600
then:
- output.turn_on: pin16_high
- output.turn_on: pin17_high
- output.turn_on: pin19_high
esp32:
board: esp32dev
output:
- platform: gpio
pin: 16
id: pin16_high
- platform: gpio
pin: 17
id: pin17_high
- platform: gpio
pin: 19
id: pin19_high
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
ota:
- platform: esphome
password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Deye Fallback Hotspot"
password: "12345678"
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
uart:
id: mod_bus
baud_rate: 9600
tx_pin: 22
rx_pin: 21
stop_bits: 1
modbus:
id: modbus1
# flow_control_pin: 4
modbus_controller:
- id: ${modbus_controller_id}
address: 0x1
modbus_id: modbus1
setup_priority: -10
update_interval: ${update_interval}
switch:
### test start ###
- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
name: "Battery - Lithium Mode"
id: lithium_mode
register_type: holding
address: 98
bitmask: 1
icon: "mdi:toggle-switch"
skip_updates: 50
on_turn_on:
lambda: |-
auto call = id(batt_control).make_call();
call.set_option("SoC mode");
call.perform() ;
### test end ###
Before fighting anymore it woul be of great help to know if the inveter might not be compatible with this esphome-for-deye project?
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels