Closed Supermanenvysme closed 2 months ago
Hi You need to check your sensor data as some of these numbers look incorrect etc. Is this an 8kW sunsynk inverter?
Please post your full card config and some output from your sensors. e.g.
day_battery_charge_70: sensor.sunsynk_day_battery_charge day_battery_discharge_71: sensor.sunsynk_day_battery_discharge day_pv_energy_108: sensor.sunsynk_day_pv_energy day_grid_import_76: sensor.sunsynk_day_grid_import
Thanks for the prompt response.
Yes its an 8kw inverter. The problem appears to only happen when the solar is close to or exceeds 5kw, with load.
Below is the yaml, I have only used what I needed and not your entire yaml. I have also tweaked the naming conventions for my own references. When compared directly on the inverter panel, the values appear to be correct, however on this integration it throws excessively high values, however when the solar is below 5kw the values match with the inverter.
uart: id: mod_bus tx_pin: 17 rx_pin: 16 baud_rate: 9600 stop_bits: 1
modbus: id: sunsynk_modbus flow_control_pin: 4
modbus_controller:
sensor:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Battery Charge (kWh)" id: total_battery_charge_kwh register_type: holding address: 72 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Daily Solar (kWh)" id: total_daily_solar_kwh register_type: holding address: 108 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Setting Use Timer Enabled"
id: sunsynk_esphome_setting_use_timer_enabled
register_type: holding
skip_updates: 10
address: 248
bitmask: 1
platform: modbus_controller
modbus_controller_id: sunsynk
name: "SS Load Frequency"
id: sunsynk_esphome_load_frequency
register_type: holding
address: 192
unit_of_measurement: "Hz"
accuracy_decimals: 2
device_class: frequency
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Inverter Output Power"
id: sunsynk_esphome_inverter_output_power
register_type: holding
address: 175
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
value_type: S_WORD
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Battery Discharge (kWh)" id: total_battery_discharge_kwh register_type: holding address: 74 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Grid Export (kWh)" id: total_grid_export_kwh register_type: holding address: 81 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_WORD filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Grid Import (kWh)" id: total_grid_import_kwh register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_WORD filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total Load Power (kWh)" id: total_load_power_kwh register_type: holding address: 85 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Total PV Power (kWh)" id: total_pv_power_kwh register_type: holding address: 96 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Inverter Output Current"
id: sunsynk_inverter_output_current
register_type: holding
address: 164
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: S_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Inverter Output Voltage"
id: sunsynk_inverter_output_voltage
register_type: holding
address: 154
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Daily Load Power"
id: sunsynk_daily_load_power
register_type: holding
address: 84
unit_of_measurement: "kWh"
accuracy_decimals: 2
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "PV1 Output Voltage"
id: sunsynk_pv1_output_voltage
register_type: holding
address: 109
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "PV1 Output Current"
id: sunsynk_pv1_output_current
register_type: holding
address: 110
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "PV2 Output Voltage"
id: sunsynk_pv2_output_voltage
register_type: holding
address: 111
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "PV2 Output Current"
id: sunsynk_pv2_output_current
register_type: holding
address: 112
unit_of_measurement: "A"
accuracy_decimals: 1
device_class: current
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Grid Inverter Load"
id: sunsynk_grid_inverter_load
register_type: holding
address: 167
unit_of_measurement: "W"
accuracy_decimals: 0
value_type: S_WORD
device_class: power
state_class: measurement
platform: modbus_controller modbus_controller_id: sunsynk name: "Grid Power" id: grid_power register_type: holding address: 169 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD
platform: modbus_controller modbus_controller_id: sunsynk name: "Load Power" id: load_power register_type: holding address: 178 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD
platform: modbus_controller modbus_controller_id: sunsynk name: "PV1 Power" id: sse_pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: U_WORD
platform: modbus_controller modbus_controller_id: sunsynk name: "PV2 Power" id: sse_pv2_power register_type: holding address: 187 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: U_WORD
platform: template
name: "Total PV"
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
lambda: |-
return (id(sse_pv1_power).state + id(sse_pv2_power).state);
update_interval: 5s
platform: modbus_controller modbus_controller_id: sunsynk name: "Battery SOC" id: battery_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery value_type: U_WORD
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Aux Output Power"
id: sunsynk_esphome_aux_output_power
register_type: holding
address: 166
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Battery Voltage"
id: sunsynk_battery_voltage
register_type: holding
address: 183
unit_of_measurement: "V"
accuracy_decimals: 1
device_class: voltage
state_class: measurement
value_type: U_WORD
filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Battery Charging Efficiency" id: battery_charging_efficiency register_type: holding address: 216 unit_of_measurement: "%" accuracy_decimals: 1 device_class: battery filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Battery Power"
id: battery_power
register_type: holding
address: 190
unit_of_measurement: "W"
accuracy_decimals: 0
device_class: power
state_class: measurement
value_type: S_WORD
platform: modbus_controller modbus_controller_id: sunsynk name: "Battery Current" id: battery_current register_type: holding address: 191 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement value_type: S_WORD filters:
platform: modbus_controller modbus_controller_id: sunsynk name: "Grid Connected Status" id: grid_connected_status register_type: holding address: 194 accuracy_decimals: 0
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Grid Import Day (Buy)"
id: sunsynk_esphome_grid_import_day
register_type: holding
address: 76
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Battery Charge Day"
id: sunsynkbattery_charge_day
register_type: holding
address: 70
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Battery Discharge Day"
id: sunsynk_esphome_battery_discharge_day
register_type: holding
address: 71
unit_of_measurement: "kWh"
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_type: U_WORD
filters:
platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB name: "WiFi Signal dB" id: wifi_signal_db update_interval: 60s entity_category: "diagnostic"
platform: copy # Reports the WiFi signal strength in % source_id: wifi_signal_db name: "WiFi Signal Percent" filters:
text_sensor:
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Setting Energy Management Model"
id: sunsynk_esphome_setting_energy_management_model
register_type: holding
skip_updates: 10
raw_encode: HEXBYTES
address: 243
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("battery priority mode");
case 1: return std::string("load first mode");
default: return std::string("unknown");
}
platform: modbus_controller
modbus_controller_id: sunsynk
name: "Overall State"
id: sunsynk_esphome_overall_state
register_type: holding
skip_updates: 10
raw_encode: HEXBYTES
address: 59
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");
}
I've never seen that before. Have you looked at the ESPHome log when it crosses this threshold for any errors? What firmware are you running on the inverter? What do your history graphs show?
I have enabled the logger on the esp as debugger. Will review the logs when the issue arises again.
The history graphs does indeed reflect the large spikes.
software version M6.0.1.4/S 1.7.2.4/C E 4.2.4
Found the issue causing the problem.
I had connected the RSD to a buck converter (LM317T) to reduce the voltage to 5v. The power appeared to be sufficient, however when the solar exceeded 4.8kw, something happened to the buck converter.
I have temporarily replaced with a 5v power supply and it appears to be fine. Will look at alternative ways to power it.
Now I just need to fix all the incorrect entries into the Energy Dashboard.
Thanks for the assistance, I think its resolved now
I have recently started using the modbus (RS485 with esphome) integration (Sunsynk 1p from your code). When the solar exceeds 5kwh, numerous entities go excessively high, as per below. I have rechecked my yaml a number of times and the problem still presents. It is an 8kwh inverter with 6kwh combined solar panels.