Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My Sunsynk 8Kw & data collection setup

Featured Replies

  • Replies 657
  • Views 178.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • If you want to try this card in home assistant follow these steps. 1. Create a new directory under www/community/ and name it sunsynk-card. If you don't have HACS installed you can create directo

  • Hi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant: Required Hardware: ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-

  • Thought I would also contribute with something small. Not as impressive as what some of the others here but a contribution nonetheless. The GUI for Sunsynk System Mode, or lack thereof, has reall

Posted Images

On 2024/03/26 at 1:17 PM, Gambit said:

Did Sunsynk support provide any register documentation for their batteries?

No they didn't but to be fair I didn't ask for it as I don't have their batteries.

  • 3 weeks later...

Hello @kellerza,

Not sure if this helps. I have tried a few things. This is on the EDGE branch with 50kw HV Sunsynk. The addon would crash after around 5 to 10 minutes of running, changing the sheduling to the solarman example appears to have helped stabilise the addon.

What I do notice now that I understand the inverter setup better is that the battery data is not reading correctly. There are actually two battery inputs and so the battery_power and battery_current are meant to be the summed values from battery_1_power + battery_2_power and  battery_1_current + battery_2_current respectively. The battery_voltage and battery_power are both reporting a value 10x below what would be expected.

Here is some of the debug log showing some errors.

2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Getting Frame - 0x3 0x2 0xfe 0x4a
2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Factory Response[ReadHoldingRegistersResponse': 3]
2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Frame advanced, resetting header!!
2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Getting transaction 1
2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Unrequested message: ReadHoldingRegistersResponse (1)
2024-04-16 10:12:22,286 DEBUG   pymodbus.logging Frame - not ready
2024-04-16 10:12:22,287 DEBUG   sunsynk.sunsynk Time taken to fetch 4 registers starting at 616 : 6.07s
2024-04-16 10:12:22,287 WARNING sunsynk.sunsynk Did not complete read, only read 8/4
2024-04-16 10:12:22,287 DEBUG   sunsynk.sunsynk Request registers: [616, 617, 618, 619] glen=4. Response [100, 500, 900, 1500, 1700, 2100, 4000, 4000] len=8. regs={616: 100, 617: 500, 618: 900, 619: 1500, 620: 1700, 621: 2100, 622: 4000, 623: 4000}
2024-04-16 10:12:22,288 DEBUG   pymodbus.logging Adding transaction 1
2024-04-16 10:12:22,288 DEBUG   pymodbus.logging send: 0x1 0x3 0x2 0x6e 0x0 0x4 0x24 0x6c
2024-04-16 10:12:22,323 DEBUG   pymodbus.logging recv: 0x1 0x3 0x8 old_data:  addr=None
2024-04-16 10:12:22,323 DEBUG   pymodbus.logging Processing: 0x1 0x3 0x8
2024-04-16 10:12:22,323 DEBUG   pymodbus.logging Frame - not ready
2024-04-16 10:12:22,339 DEBUG   pymodbus.logging recv: 0xff 0xe4 0xff 0xe2 0x0 0x4d 0x0 0x13 0x43 0x1e old_data:  addr=None
2024-04-16 10:12:22,339 DEBUG   pymodbus.logging Processing: 0xff 0xe4 0xff 0xe2 0x0 0x4d 0x0 0x13 0x43 0x1e
2024-04-16 10:12:22,339 DEBUG   pymodbus.logging Frame - not ready
2024-04-16 10:12:25,291 DEBUG   pymodbus.logging Adding transaction 1
2024-04-16 10:12:25,291 DEBUG   pymodbus.logging send: 0x1 0x3 0x2 0x6e 0x0 0x4 0x24 0x6c
2024-04-16 10:12:25,330 DEBUG   pymodbus.logging recv: 0x1 0x3 0x8 0xff old_data:  addr=None
2024-04-16 10:12:25,330 DEBUG   pymodbus.logging Processing: 0x1 0x3 0x8 0xff
2024-04-16 10:12:25,330 DEBUG   pymodbus.logging Frame - not ready
2024-04-16 10:12:28,294 DEBUG   pymodbus.logging Adding transaction 1
2024-04-16 10:12:28,294 DEBUG   pymodbus.logging send: 0x1 0x3 0x2 0x6e 0x0 0x4 0x24 0x6c
2024-04-16 10:12:28,337 DEBUG   pymodbus.logging recv: 0x1 0x3 0x8 0xff 0xe2 0xff old_data:  addr=None
2024-04-16 10:12:28,337 DEBUG   pymodbus.logging Processing: 0x1 0x3 0x8 0xff 0xe2 0xff
2024-04-16 10:12:28,337 DEBUG   pymodbus.logging Frame - not ready
2024-04-16 10:12:28,353 DEBUG   pymodbus.logging recv: 0xe1 0x0 0x4c 0x0 0xf 0x31 0x17 old_data:  addr=None
2024-04-16 10:12:28,353 DEBUG   pymodbus.logging Processing: 0xe1 0x0 0x4c 0x0 0xf 0x31 0x17
2024-04-16 10:12:28,353 DEBUG   pymodbus.logging Frame - not ready

Please let me know if there is something I can do to try and get the addon improved.

  • 1 month later...

Hi everybody! So I've been running my ESPHome + Sunsynk 12kva for many months now without issue. Then a few days ago it started showing weird stats like 40,000% battery charge and 60k kw solar. It would record these readings intermittently, so if I looked at my history graphs there'd be insane spikes that would last minutes to hours.

I figured it was loose connections as I never soldered the wires and that's caused issues before, no dice.

Now, after fiddling with the wires, its not even reporting data.

I reinstalled ESPHome with my .yaml onto the ESP32, no dice.

Ran the log and found this (see screenshots)

Has sunsynk changed some modbus addresses or is my EPS32 just cooked? I checked my .yaml and there are no duplicates.

 

 

Screenshot_20240603_235237_Brave.jpg

Screenshot_20240603_235254_Brave.jpg

Screenshot_20240603_235305_Brave.jpg

BEWARE OF GENERIC ESP32 BOARDS  VOLTAGE SUPPLY SUPPLY ON VS

 

Good day all.

I have discovered that the power of ESP dev board is problematic.

If you test the power on the bottom Left of the board you only get 1.8-2,4 Volt.

This causes a brownout as soon as you connect the TTL-Rs485 Converter. 

 

What I have done to get it right is to take the GND on the right hand side and the VIN on the Left side.

 

Just a not if someone comes across this.

 

Thanks al for all the great info and code !!!!!!!

 

Happy Tinkering

 

Edited by JAndy

 

Hello everyone. I wonder if there is a chance to control the "Smart Load" output from Home Assistant. I would like to automate it so that when the water in the hot water tank is heated to a set temperature, the "smart load" output is turned off.

 

Edited by sarzyk

  • Author

Hi @sarzyk

 

There are Modbus addresses for Smart Loads, have no experience with them though and I don't think that they are in the  default Slipx's code. 

image.png.cc2bfba25454bcc5d0c257eb3bcade75.png

I think that it might be easier to just put in a smart switch with power monitoring (ewelink) preferably as they are easier to link to HA. 

  • Author
On 2024/06/04 at 12:33 AM, BobTheDinosaur said:

Hi everybody! So I've been running my ESPHome + Sunsynk 12kva for many months now without issue. Then a few days ago it started showing weird stats like 40,000% battery charge and 60k kw solar. It would record these readings intermittently, so if I looked at my history graphs there'd be insane spikes that would last minutes to hours.

I figured it was loose connections as I never soldered the wires and that's caused issues before, no dice.

Now, after fiddling with the wires, its not even reporting data.

I reinstalled ESPHome with my .yaml onto the ESP32, no dice.

Ran the log and found this (see screenshots)

Has sunsynk changed some modbus addresses or is my EPS32 just cooked? I checked my .yaml and there are no duplicates.

 

 

Screenshot_20240603_235237_Brave.jpg

Screenshot_20240603_235254_Brave.jpg

Screenshot_20240603_235305_Brave.jpg

Lets see the code, looks like you might have multiple modbus controllers as it talks about Modbuscontroller:136 & 043?

Maybe something with one of the ESPHome updates 

  • Author
On 2024/06/04 at 1:22 PM, JAndy said:

BEWARE OF GENERIC ESP32 BOARDS  VOLTAGE SUPPLY SUPPLY ON VS

 

Good day all.

I have discovered that the power of ESP dev board is problematic.

If you test the power on the bottom Left of the board you only get 1.8-2,4 Volt.

This causes a brownout as soon as you connect the TTL-Rs485 Converter. 

 

What I have done to get it right is to take the GND on the right hand side and the VIN on the Left side.

 

Just a not if someone comes across this.

 

Thanks al for all the great info and code !!!!!!!

 

Happy Tinkering

 

Best RS485 controller is the one from @iiznh at smarthomeintegrations.co.za as it includes the power supply and a 3.3v RS485 interface, most of the separate boards have 5V RS485 and seem to be rather problematic. 

On 2024/06/07 at 7:44 AM, Sc00bs said:

Best RS485 controller is the one from @iiznh at smarthomeintegrations.co.za as it includes the power supply and a 3.3v RS485 interface, most of the separate boards have 5V RS485 and seem to be rather problematic. 

I agree. 

Smarthomeintegrations.co.za is the best, this observation was before I had a board.

Just putting it out there for reference if someone used the "old" method.

On 2024/06/07 at 7:41 AM, Sc00bs said:

Lets see the code, looks like you might have multiple modbus controllers as it talks about Modbuscontroller:136 & 043?

Maybe something with one of the ESPHome updates 

So I've found that the read error is only when my batteries are at minimum, which is 15% (then it reports 44,474% almost constantly), or when SunSynk Day PV is at zero then it reports 6,483.1 kWh every hour or so, and SunSynk Day Grid Import just randomly reports 1,333kWh

 

Here comes the code:

##########################WARNING HAS NOT BEEN TESTED USE AT YOUR OWN RISK ########################################
#
substitutions:
settings_skipped_updates: "10"
devicename: sunsynk
device_description: "Sunsynk RS485 Logger"
friendly_name: "SunSynk"
 
esphome:
name: $devicename
comment: '${device_description}'
 
esp32:
board: nodemcu-32s
framework:
type: arduino
 
# Enable logging
logger:
baud_rate: 0
 
# Enable Home Assistant API
api:
encryption:
key: ""
 
ota:
password: ""
 
wifi:
ssid:
password
 
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${devicename}'
password: fallback_password
 
fast_connect: true
power_save_mode: none
 
captive_portal:
 
# Enable time component to reset energy at midnight
time:
- platform: homeassistant
id: homeassistant_time
 
uart:
id: mod_bus
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 9600
stop_bits: 1
 
modbus:
id: sunsynk_modbus
flow_control_pin: GPIO4
 
modbus_controller:
- id: sunsynk
address: 0x01
modbus_id: sunsynk_modbus
setup_priority: -10
update_interval: "15s"
command_throttle: "50ms"
 
############################################### BINARY SENSORS ########################################
binary_sensor:
- platform: modbus_controller # 552 Grid Connected Status
modbus_controller_id: sunsynk
name: "${friendly_name} Grid Connected Status"
id: sunsynk_esphome_grid_connected_status
register_type: holding
address: 552
 
# SENSORS #
#######################################################################################################
 
############################################### BATTERY ###############################################
sensor:
- platform: modbus_controller
modbus_controller_id: sunsynk
name: '${friendly_name} Battery Temperature'
id: sunsynk_esphome_battery_temperature
register_type: holding
address: 586
unit_of_measurement: °C
accuracy_decimals: 1
device_class: temperature
state_class: measurement
value_type: U_WORD
filters:
- offset: -1000
- multiply: 0.1
 
- platform: modbus_controller # 587 Battery Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} Battery Voltage"
id: sunsynk_esphome_battery_voltage
register_type: holding
address: 587
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.01
value_type: U_WORD
 
- platform: modbus_controller # 588 Battery SOC
modbus_controller_id: sunsynk
name: "${friendly_name} Battery SOC"
id: sunsynk_esphome_battery_soc
register_type: holding
address: 588
unit_of_measurement: "%"
accuracy_decimals: 0
device_class: battery
value_type: U_WORD
 
- platform: modbus_controller # 590 Battery Power
modbus_controller_id: sunsynk
name: "${friendly_name} Battery Power"
id: sunsynk_esphome_battery_power
register_type: holding
address: 590
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
 
- platform: modbus_controller # 591 Battery Current
modbus_controller_id: sunsynk
name: "${friendly_name} Battery Current"
id: sunsynk_esphome_battery_current
register_type: holding
address: 591
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: S_WORD
filters:
- multiply: 0.01
 
- platform: modbus_controller # 115 Battery Capacity Shutdown
modbus_controller_id: sunsynk
name: "${friendly_name} Battery Capacity Shutdown"
id: sunsynk_esphome_battery_capacity_shutdown
register_type: holding
address: 115
unit_of_measurement: "%"
accuracy_decimals: 0
device_class: battery
 
############################################### INVERTER ##############################################
 
- platform: modbus_controller # 636 Inverter Power
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter Power"
id: sunsynk_esphome_inverter_power
register_type: holding
address: 636
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
 
- platform: modbus_controller # 633 Inverter L1 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter L1 Power"
id: sunsynk_esphome_inverter_L1_power
register_type: holding
address: 633
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
 
- platform: modbus_controller # 634 Inverter L2 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter L2 Power"
id: sunsynk_esphome_inverter_L2_power
register_type: holding
address: 634
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
 
- platform: modbus_controller # 635 Inverter L3 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter L3 Power"
id: sunsynk_esphome_inverter_L3_power
register_type: holding
address: 635
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
 
- platform: modbus_controller # 627 Inverter Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter Voltage"
id: sunsynk_esphome_inverter_voltage
register_type: holding
address: 627
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
- platform: modbus_controller # 638 Inverter Frequency
modbus_controller_id: sunsynk
name: "${friendly_name} Inverter Frequency"
id: sunsynk_esphome_inverter_frequency
register_type: holding
address: 638
unit_of_measurement: "Hz"
accuracy_decimals: 2
filters:
- multiply: 0.01
value_type: U_WORD
state_class: measurement
 
############################################### GRID ##################################################
 
- platform: modbus_controller # 609 Grid Frequency
modbus_controller_id: sunsynk
name: "${friendly_name} Grid Frequency"
id: sunsynk_esphome_grid_frequency
register_type: holding
address: 609
unit_of_measurement: "Hz"
accuracy_decimals: 2
filters:
- multiply: 0.01
value_type: U_WORD
state_class: measurement
 
- platform: modbus_controller # 625 Grid Power
modbus_controller_id: sunsynk
name: "${friendly_name} Grid Power"
id: sunsynk_esphome_grid_power
register_type: holding
address: 625
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 622 Grid L1 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L1 Power"
id: sunsynk_esphome_grid_power_L1
register_type: holding
address: 622
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 623 Grid L2 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L2 Power"
id: sunsynk_esphome_grid_power_L2
register_type: holding
address: 623
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 624 Grid L3 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L3 Power"
id: sunsynk_esphome_grid_power_L3
register_type: holding
address: 624
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 600 Grid Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} Grid Voltage"
id: sunsynk_esphome_grid_voltage
register_type: holding
address: 600
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
- platform: modbus_controller # 610 Grid L1 Current
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L1 Current"
id: sunsynk_esphome_grid_current_L1
register_type: holding
address: 610
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: S_WORD
filters:
- multiply: 0.01
 
- platform: modbus_controller # 611 Grid L2 Current
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L2 Current"
id: sunsynk_esphome_grid_current_L2
register_type: holding
address: 160
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: S_WORD
filters:
- multiply: 0.01
 
- platform: modbus_controller # 612 Grid L3 Current
modbus_controller_id: sunsynk
name: "${friendly_name} Grid L3 Current"
id: sunsynk_esphome_grid_current_L3
register_type: holding
address: 160
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: S_WORD
filters:
- multiply: 0.01
 
- platform: modbus_controller # 619 Grid CT Power
modbus_controller_id: sunsynk
name: "${friendly_name} Grid CT Power"
id: sunsynk_esphome_grid_ct_power
register_type: holding
address: 619
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
############################################### LOAD ################################################
 
- platform: modbus_controller # 653 Load Power
modbus_controller_id: sunsynk
name: "${friendly_name} Load Power"
id: sunsynk_esphome_load_power
register_type: holding
address: 653
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 650 Load L1 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Load L1 Power"
id: sunsynk_esphome_load_l1_power
register_type: holding
address: 650
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 651 Load L2 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Load L2 Power"
id: sunsynk_esphome_load_l2_power
register_type: holding
address: 651
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 651 Load L3 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Load L3 Power"
id: sunsynk_esphome_load_l3_power
register_type: holding
address: 652
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
############################################### SOLAR PV1 #############################################
 
- platform: modbus_controller # 672 PV1 Power
modbus_controller_id: sunsynk
name: "${friendly_name} PV1 Power"
id: sunsynk_esphome_pv1_power
register_type: holding
address: 672
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 676 PV1 Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} PV1 Voltage"
id: sunsynk_esphome_pv1_voltage
register_type: holding
address: 676
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
value_type: U_WORD
 
- platform: modbus_controller # 677 PV1 Current
modbus_controller_id: sunsynk
name: "${friendly_name} PV1 Current"
id: sunsynk_esphome_pv1_current
register_type: holding
address: 677
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
############################################### SOLAR PV2 #############################################
 
- platform: modbus_controller # 673 PV2 Power
modbus_controller_id: sunsynk
name: "${friendly_name} PV2 Power"
id: sunsynk_esphome_pv2_power
register_type: holding
address: 673
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 678 PV2 Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} PV2 Voltage"
id: sunsynk_esphome_pv2_voltage
register_type: holding
address: 678
unit_of_measurement: "V"
accuracy_decimals: 1
filters:
- multiply: 0.1
device_class: voltage
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 679 PV2 Current
modbus_controller_id: sunsynk
name: "${friendly_name} PV2 Current"
id: sunsynk_esphome_pv2_current
register_type: holding
address: 679
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
############################################### SOLAR PV3 #############################################
 
- platform: modbus_controller # 674 PV3 Power
modbus_controller_id: sunsynk
name: "${friendly_name} PV3 Power"
id: sunsynk_esphome_pv3_power
register_type: holding
address: 674
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 680 PV3 Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} PV3 Voltage"
id: sunsynk_esphome_pv3_voltage
register_type: holding
address: 680
unit_of_measurement: "V"
accuracy_decimals: 1
filters:
- multiply: 0.1
device_class: voltage
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 681 PV3 Current
modbus_controller_id: sunsynk
name: "${friendly_name} PV3 Current"
id: sunsynk_esphome_pv3_current
register_type: holding
address: 681
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
############################################### SOLAR PV4 #############################################
 
- platform: modbus_controller # 675 PV4 Power
modbus_controller_id: sunsynk
name: "${friendly_name} PV4 Power"
id: sunsynk_esphome_pv4_power
register_type: holding
address: 675
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 682 PV4 Voltage
modbus_controller_id: sunsynk
name: "${friendly_name} PV4 Voltage"
id: sunsynk_esphome_pv4_voltage
register_type: holding
address: 682
unit_of_measurement: "V"
accuracy_decimals: 1
filters:
- multiply: 0.1
device_class: voltage
state_class: measurement
value_type: U_WORD
 
- platform: modbus_controller # 683 PV4 Current
modbus_controller_id: sunsynk
name: "${friendly_name} PV4 Current"
id: sunsynk_esphome_pv4_current
register_type: holding
address: 683
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
filters:
- multiply: 0.1
value_type: U_WORD
 
############################################### SOLAR TOTAL ###########################################
 
- platform: template # Sum of PV1 and PV2 to get total PV Power
name: "${friendly_name} Solar Power"
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
lambda: |-
return (id(sunsynk_esphome_pv1_power).state + id(sunsynk_esphome_pv2_power).state + id(sunsynk_esphome_pv3_power).state + id(sunsynk_esphome_pv4_power).state);
update_interval: 5s
 
############################################### OUTPUTS ###############################################
 
- platform: modbus_controller # 667 Gen Power
modbus_controller_id: sunsynk
name: "${friendly_name} Gen Power"
id: sunsynk_esphome_gen_power
register_type: holding
address: 667
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 664 Gen L1 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Gen L1 Power"
id: sunsynk_esphome_gen_l1_power
register_type: holding
address: 664
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 665 Gen L2 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Gen L2 Power"
id: sunsynk_esphome_gen_l2_power
register_type: holding
address: 665
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
- platform: modbus_controller # 666 Gen L3 Power
modbus_controller_id: sunsynk
name: "${friendly_name} Gen L3 Power"
id: sunsynk_esphome_gen_L3_power
register_type: holding
address: 666
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
 
############################################### ENERGY ################################################
 
- platform: modbus_controller # 514 Day Battery Charge
modbus_controller_id: sunsynk
name: "${friendly_name} Day Battery Charge"
id: sunsynk_esphome_day_battery_charge
register_type: holding
address: 514
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 515 Day Battery Discharge
modbus_controller_id: sunsynk
name: "${friendly_name} Day Battery Discharge"
id: sunsynk_esphome_day_battery_discharge
register_type: holding
address: 515
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 516 Total Battery Charge
modbus_controller_id: sunsynk
name: "${friendly_name} Total Battery Charge"
id: sunsynk_esphome_total_battery_charge
register_type: holding
address: 516
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_DWORD_R
filters:
- multiply: 0.1
 
- platform: modbus_controller # 518 Total Battery Discharge
modbus_controller_id: sunsynk
name: "${friendly_name} Total Battery Discharge"
id: sunsynk_esphome_total_battery_discharge
register_type: holding
address: 518
unit_of_measurement: "kWh"
accuracy_decimals: 0
device_class: energy
state_class: total_increasing
value_type: U_DWORD_R
filters:
- multiply: 0.1
 
- platform: modbus_controller # 520 Day Grid Import
modbus_controller_id: sunsynk
name: "${friendly_name} Day Grid Import"
id: sunsynk_esphome_day_grid_import
register_type: holding
address: 520
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 521 Day Grid Export
modbus_controller_id: sunsynk
name: "${friendly_name} Day Grid Export"
id: sunsynk_esphome_day_grid_export
register_type: holding
address: 521
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 522 Total Grid Import
modbus_controller_id: sunsynk
name: "${friendly_name} Total Grid Import"
id: sunsynk_esphome_total_grid_import
register_type: holding
address: 522
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 524 Total Grid Export
modbus_controller_id: sunsynk
name: "${friendly_name} Total Grid Export"
id: sunsynk_esphome_total_grid_export
register_type: holding
address: 524
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
- multiply: 0.1
 
- platform: modbus_controller # 526 Day Load Energy
modbus_controller_id: sunsynk
name: "${friendly_name} Day Load Energy"
id: sunsynk_esphome_day_load_energy
register_type: holding
address: 526
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.1
value_type: U_WORD
 
- platform: modbus_controller # 527 Total Load Energy
modbus_controller_id: sunsynk
name: "${friendly_name} Total Load Energy"
id: sunsynk_esphome_total_load_energy
register_type: holding
address: 527
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
value_type: U_DWORD_R
filters:
- multiply: 0.1
 
- platform: modbus_controller # 534 Total PV Energy
modbus_controller_id: sunsynk
name: "${friendly_name} Total PV Energy"
id: sunsynk_esphome_total_pv_energy
register_type: holding
address: 534
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.1
value_type: U_DWORD_R
 
- platform: modbus_controller # 529 Day PV Energy
modbus_controller_id: sunsynk
name: "${friendly_name} Day PV Energy"
id: sunsynk_esphome_day_pv_energy
register_type: holding
address: 529
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.1
value_type: U_WORD
 
############################################### TEMPERATURE ################################################
 
- platform: modbus_controller # 540 DC Transformer Temperature
modbus_controller_id: sunsynk
name: "${friendly_name} DC Transformer Temperature"
id: sunsynk_esphome_dc_transformer_temperature
register_type: holding
address: 540
unit_of_measurement: "°C"
accuracy_decimals: 1
device_class: temperature
state_class: measurement
value_type: S_WORD
filters:
- offset: -1000
- multiply: 0.1
 
- platform: modbus_controller # 541 Radiator Temperature
modbus_controller_id: sunsynk
name: "${friendly_name} Radiator Temperature"
id: sunsynk_esphome_radiator_temperature
register_type: holding
address: 541
unit_of_measurement: "°C"
accuracy_decimals: 1
device_class: temperature
state_class: measurement
value_type: S_WORD
filters:
- offset: -1000
- multiply: 0.1
 
################################################ READ SETTINGS #############################################
 
- platform: modbus_controller # 148 System Mode Time 1
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time1"
id: sunsynk_esphome_system_mode_time1
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 148
icon: "mdi:clock"
 
- platform: modbus_controller # 149 System Mode Time 2
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time2"
id: sunsynk_esphome_system_mode_time2
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 149
icon: "mdi:clock"
 
- platform: modbus_controller # 150 System Mode Time 3
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time3"
id: sunsynk_esphome_system_mode_time3
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 150
icon: "mdi:clock"
 
- platform: modbus_controller # 151 System Mode Time 4
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time4"
id: sunsynk_esphome_system_mode_time4
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 151
icon: "mdi:clock"
 
- platform: modbus_controller # 152 System Mode Time 5
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time5"
id: sunsynk_esphome_system_mode_time5
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 152
icon: "mdi:clock"
 
- platform: modbus_controller # 153 System Mode Time 6
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Time6"
id: sunsynk_esphome_system_mode_time6
register_type: holding
skip_updates: ${settings_skipped_updates}
address: 153
icon: "mdi:clock"
 
################################################ WRITE SETTINGS ############################################
 
switch:
- platform: modbus_controller # 145 Toggle Solar Sell
use_write_multiple: true
modbus_controller_id: sunsynk
name: "${friendly_name} Toggle Solar sell"
id: sunsynk_esphome_toggle_solar_sell
register_type: holding
address: 145
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 146 Toggle System Timer
use_write_multiple: true
modbus_controller_id: sunsynk
name: "${friendly_name} Toggle System Timer"
id: sunsynk_esphome_toggle_Time_of_Use
register_type: holding
address: 146
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 141 Priority Load
use_write_multiple: true
modbus_controller_id: sunsynk
name: "${friendly_name} Toggle Priority Load"
id: sunsynk_esphome_toggle_priority_load
register_type: holding
address: 141
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 172 System Mode Grid Charge Time 1
use_write_multiple: true
modbus_controller_id: sunsynk
name: "${friendly_name} System Mode Grid Charge Time1"
id: sunsynk_esphome_toggle_grid_charge_time1
register_type: holding
address: 172
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 173 System Mode Grid Charge Time 2
modbus_controller_id: sunsynk
use_write_multiple: true
name: "${friendly_name} System Mode Grid Charge Time2"
id: sunsynk_esphome_toggle_grid_charge_time2
register_type: holding
address: 173
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 174 System Mode Grid Charge Time 3
modbus_controller_id: sunsynk
use_write_multiple: true
name: "${friendly_name} System Mode Grid Charge Time3"
id: sunsynk_esphome_toggle_grid_charge_time3
register_type: holding
address: 174
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 175 System Mode Grid Charge Time 4
modbus_controller_id: sunsynk
use_write_multiple: true
name: "${friendly_name} System Mode Grid Charge Time4"
id: sunsynk_esphome_toggle_grid_charge_time4
register_type: holding
address: 175
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 176 System Mode Grid Charge Time 5
modbus_controller_id: sunsynk
use_write_multiple: true
name: "${friendly_name} System Mode Grid Charge Time5"
id: sunsynk_esphome_toggle_grid_charge_time5
register_type: holding
address: 176
bitmask: 1
icon: "mdi:toggle-switch"
 
- platform: modbus_controller # 177 System Mode Grid Charge Time 6
modbus_controller_id: sunsynk
use_write_multiple: true
name: "${friendly_name} System Mode Grid Charge Time6"
id: sunsynk_esphome_toggle_grid_charge_time6
register_type: holding
address: 177
bitmask: 1
icon: "mdi:toggle-switch"
 
 
number:
- platform: modbus_controller # 166 System Mode SoC Time 1
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time1
name: "${friendly_name} System Mode SoC Time1"
unit_of_measurement: "%"
address: 166
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 167 System Mode SoC Time 2
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time2
name: "${friendly_name} System Mode SoC Time2"
unit_of_measurement: "%"
address: 167
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 168 System Mode SoC Time 3
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time3
name: "${friendly_name} System Mode SoC Time3"
unit_of_measurement: "%"
address: 168
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 169 System Mode SoC Time 4
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time4
name: "${friendly_name} System Mode SoC Time4"
unit_of_measurement: "%"
address: 169
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 170 System Mode SoC Time 5
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time5
name: "${friendly_name} System Mode SoC Time5"
unit_of_measurement: "%"
address: 170
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 171 System Mode SoC Time 6
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_soc_time6
name: "${friendly_name} System Mode SoC Time6"
unit_of_measurement: "%"
address: 171
min_value: 0
max_value: 100
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 154 System Mode Power Time 1
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time1
name: "${friendly_name} System Mode Power Time1"
unit_of_measurement: "W"
address: 154
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 155 System Mode Power Time 2
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time2
name: "${friendly_name} System Mode Power Time2"
unit_of_measurement: "W"
address: 155
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 156 System Mode Power Time 3
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time3
name: "${friendly_name} System Mode Power Time3"
unit_of_measurement: "W"
address: 156
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 157 System Mode Power Time 4
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time4
name: "${friendly_name} System Mode Power Time4"
unit_of_measurement: "W"
address: 157
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 158 System Mode Power Time 5
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time5
name: "${friendly_name} System Mode Power Time5"
unit_of_measurement: "W"
address: 158
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 159 System Mode Power Time 6
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_set_power_time6
name: "${friendly_name} System Mode Power Time6"
unit_of_measurement: "W"
address: 159
min_value: 0
max_value: 12000
step: 100
value_type: U_WORD
 
- platform: modbus_controller # 128 Grid Charge Battery current
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_grid_charge_bat_current
name: "${friendly_name} Grid Charge Battery current"
unit_of_measurement: "A"
address: 128
min_value: 0
max_value: 185
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 108 Battery Max Charge current
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_bat_max_charge_current
name: "${friendly_name} Battery Max Charge current"
unit_of_measurement: "A"
address: 108
min_value: 0
max_value: 185
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 109 Battery Max Discharge current
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_bat_max_discharge_current
name: "${friendly_name} Battery Max Discharge current"
unit_of_measurement: "A"
address: 109
min_value: 0
max_value: 185
step: 5
value_type: U_WORD
 
- platform: modbus_controller # 143 Max Sell Power
use_write_multiple: true
modbus_controller_id: sunsynk
name: "${friendly_name} Max Sell power"
id: sunsynk_max_sell_power
address: 143
unit_of_measurement: "W"
min_value: 0
max_value: 12000
step: 500
value_type: U_WORD
 
################################################ TEXT SENSORS ##################################################
 
text_sensor:
- platform: modbus_controller # 500 Overall State
modbus_controller_id: sunsynk
name: "${friendly_name} Overall State"
id: sunsynk_esphome_overall_state
register_type: holding
skip_updates: ${settings_skipped_updates}
raw_encode: HEXBYTES
address: 500
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("standby");
case 1: return std::string("selftest");
case 2: return std::string("normal");
case 3: return std::string("alarm");
case 4: return std::string("fault");
default: return std::string("unknown");
}
 
- platform: template
name: "${friendly_name} Time Slot 1"
id: sunsynk_esphome_time_slot_1
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time1).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time1).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time1).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
- platform: template
name: "${friendly_name} Time Slot 2"
id: sunsynk_esphome_time_slot_2
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time2).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time2).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time2).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
- platform: template
name: "${friendly_name} Time Slot 3"
id: sunsynk_esphome_time_slot_3
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time3).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time3).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time3).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
- platform: template
name: "${friendly_name} Time Slot 4"
id: sunsynk_esphome_time_slot_4
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time4).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time4).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time4).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
- platform: template
name: "${friendly_name} Time Slot 5"
id: sunsynk_esphome_time_slot_5
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time5).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time5).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time5).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
- platform: template
name: "${friendly_name} Time Slot 6"
id: sunsynk_esphome_time_slot_6
icon: "mdi:clock"
lambda: |-
int minutes, hours;
if (id(sunsynk_esphome_system_mode_time6).state) {
minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time6).state) % 100;
hours = static_cast<int>(id(sunsynk_esphome_system_mode_time6).state) / 100;
} else {
minutes = 0;
hours = 0;
}
char formatted_time[6];
snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes);
return esphome::optional<std::string>(formatted_time);
 
################################################ SELECT SENSORS ################################################
 
select:
- platform: modbus_controller #141 Select Energy Patern
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_select_energy_pattern
name: "${friendly_name} Energy Pattern"
address: 141
value_type: U_WORD
optionsmap:
"Battery first": 0
"Load first": 1
 
- platform: modbus_controller #142 Select Work Mode
use_write_multiple: true
modbus_controller_id: sunsynk
id: sunsynk_esphome_select_work_mode
name: "${friendly_name} Work Mode"
address: 142
value_type: U_WORD
optionsmap:
"Selling First": 0
"Zero Export + Limit to Load Only": 1
"Limited to Home": 2
  • 4 weeks later...
On 2024/06/12 at 8:17 AM, Sc00bs said:

All looks good @BobTheDinosaur , I suspect that it has something to do with your ESP32/RS485  

So i've replaced both my RS485 and ESP32 (matching voltages now) and got ESPHOME set up and running again, all sensors are working but my problem remains. I have regular, intermittent absurdly high readings on a few sensors.

@slipx have you got any ideas?
I found this post which seems to have the same problem as I do, at least when looking at his debug info for his battery SOC.

https://community.home-assistant.io/t/modbus-errors-on-sunsynk/604063

  • Author
5 hours ago, BobTheDinosaur said:

So i've replaced both my RS485 and ESP32 (matching voltages now) and got ESPHOME set up and running again, all sensors are working but my problem remains. I have regular, intermittent absurdly high readings on a few sensors.

@slipx have you got any ideas?
I found this post which seems to have the same problem as I do, at least when looking at his debug info for his battery SOC.

https://community.home-assistant.io/t/modbus-errors-on-sunsynk/604063

What did you replace the RS485 with @BobTheDinosaur?

The MAX485 boards are often problematic and I think it may have something to do with their RS485 running at 5V and the inverters running at 3.3V 

image.png.e0d6a9dea8e9f48ea71ec95cd1fa46d8.png

 

3 hours ago, Sc00bs said:

What did you replace the RS485 with @BobTheDinosaur?

The MAX485 boards are often problematic and I think it may have something to do with their RS485 running at 5V and the inverters running at 3.3V 

image.png.e0d6a9dea8e9f48ea71ec95cd1fa46d8.png

 

I changed to a 3.3V RS485. I think i found it on this thread, but it's this one. 

https://www.communica.co.za/products/wvs-rs485-3-3v-breakout-module?variant=44563441254700

To me it's looking like a code issued. Something to do with the modbus comms. Which is why I'm hoping Slipx has some ideas.

  • Author
7 hours ago, BobTheDinosaur said:

I changed to a 3.3V RS485. I think i found it on this thread, but it's this one. 

https://www.communica.co.za/products/wvs-rs485-3-3v-breakout-module?variant=44563441254700

To me it's looking like a code issued. Something to do with the modbus comms. Which is why I'm hoping Slipx has some ideas.

Nice board @BobTheDinosaur, I haven't see that one before 

On 2024/06/12 at 12:49 AM, BobTheDinosaur said:

So I've found that the read error is only when my batteries are at minimum, which is 15% (then it reports 44,474% almost constantly), or when SunSynk Day PV is at zero then it reports 6,483.1 kWh every hour or so, and SunSynk Day Grid Import just randomly reports 1,333kWh

Hi. Which are the specific registers that are giving you incorrect readings.

6 hours ago, slipx said:

Hi. Which are the specific registers that are giving you incorrect readings.

588 Battery SOC  

520 Day grid import

529 Day PV energy 

672+673 PV1+PV2 Power

Those are the ones I noticed on my dash. According to a developer friend who's had a look there are a few more but that was just mentioned in passing, will hopefully be able to look at it with him again tomorrow. 

To reiterate - nothing changed on the ESP32, it just started doing this by itself maybe 1-2 months ago.

It also only seems to report these spikes when the values for these registers are at their lowest point. So for battery SOC it only spikes when SOC hits 15% which is the lowest it'll go. 

Day PV energy only spikes when it stops increasing i.e. PV has gone to zero. 

Day grid import spikes randomly from what I can tell. 

 

8 hours ago, BobTheDinosaur said:

588 Battery SOC  

520 Day grid import

529 Day PV energy 

672+673 PV1+PV2 Power

Those are the ones I noticed on my dash. According to a developer friend who's had a look there are a few more but that was just mentioned in passing, will hopefully be able to look at it with him again tomorrow. 

To reiterate - nothing changed on the ESP32, it just started doing this by itself maybe 1-2 months ago.

It also only seems to report these spikes when the values for these registers are at their lowest point. So for battery SOC it only spikes when SOC hits 15% which is the lowest it'll go. 

Day PV energy only spikes when it stops increasing i.e. PV has gone to zero. 

Day grid import spikes randomly from what I can tell. 

 

@BobTheDinosaur have you tried turning off your inverter for a couple of minutes and turning it back on again?

@slipx,@kellerza, @Sc00bs

Update and some progress, hoping Kellerza has some insight into this.

My ESP32 has always been plugged into the inverter's Modbus port ("Modebus") and worked great for months. I read on a thread here that solarassistant advises using the 485 meter port. So I switched today. 

https://powerforum.co.za/topic/8451-sunsynk-inverter-monitoring/page/24/

While on the Modbus port the esphome logs were showing lots of chunks CRC errors, when switching to the 485 meter port those CRC errors reduced drastically in number and frequency. The problem still hasn't gone away with the registers I mentioned in my post above. Though my dev buddy has helped by applying a filter with two options to the Battery SOC register:

    filters:
      - filter_out: 44474
#      - clamp:
#          min_value: 0
#          max_value: 100
#          ignore_out_of_range: true

As the error was a consistently intermittent 44,474 kWh the first filter did the job.

I found some related posts here:

https://github.com/kellerza/sunsynk/issues/63 

Now this begs the question, should I be on the BMS port using a splitter? 

Or should I factory reset my inverter and see what happens?

  • Author
9 hours ago, Gambit said:

@BobTheDinosaur have you tried turning off your inverter for a couple of minutes and turning it back on again?

Turning it off and then on again sorted out my RS485 issues when I was having a problem.

I would definitely try it if you haven't done it already. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.