Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max limit for max charge and discharge current #167

Open
trackmafia opened this issue Aug 14, 2023 · 10 comments
Open

max limit for max charge and discharge current #167

trackmafia opened this issue Aug 14, 2023 · 10 comments

Comments

@trackmafia
Copy link

Existing sensor definitions can be found here

You Inverter

Sunsynk 16kw

Describe the issue/bug and what you expect

using this addon and it is working perfectly with 16kw inverter using your instructions, well done, much appreciated.

For sensor battery max charge current and max discharge current, max is set to 185. However on 16k inverter max can go up to 275 for both. this is for modbus register 210 and 211. I created a custom sensor to get around this. However, it shows up as a number and not a slider and i'm not sure how to change this in home assistant? Can you advise if the max can be changed or how to make the custom sensor show up with a slider as in the original?

Also, please note that 16kw has 3 MPPTs, i got around this easily by creating custom sensors for pv3_power, pv3_current and pv3_volts . Just posting here for anybody in the future.

Logs (if applicable)


@kellerza
Copy link
Owner

Thanks @trackmafia - try NUMBER_ENTITY_MODE for the slider - see here. The default auto mode might have decided that 285 is too much for a slider.

Do you mind doing a PR to add the 3rd MPPT?
It should be ok to change Max current as well.

@trackmafia
Copy link
Author

Kellerza,

This worked perferctly. Thanks very much. I'm new to github but i'll learn how to do pull request and submit within a week.

Thanks again for this awesome software.

@deondti
Copy link

deondti commented Jan 14, 2025

I'm running into the same issue with my 16KW so my max discharge keeps defaulting to 185 which trips the inverter when I exceed about 9Kw
Current version: 0.8.2
NUMBER_ENTITY_MODE: box

Manually entering a value above 185 it tells me it is out of range ( 0-185)

Can you please advise how to modify the range?

@deondti
Copy link

deondti commented Jan 16, 2025

@kellerza

src/sunsynk/definitions/single_phase.py

line 314
SENSORS += NumberRWSensor(230, "Grid Charge Battery current", AMPS, min=0, max=290)
SENSORS += NumberRWSensor(210, "Battery Max Charge current", AMPS, min=0, max=290)
SENSORS += NumberRWSensor(211, "Battery Max Discharge current", AMPS, min=0, max=290)

I CANNOT FIGURE OUT HOW TO DO A PR

@kellerza
Copy link
Owner

What are your values for the following sensors?

    Sensor(314, "Battery Charge Limit current", AMPS, -1),
    Sensor(315, "Battery Discharge Limit current", AMPS, -1),

@deondti
Copy link

deondti commented Jan 17, 2025

314 = 665.0 A
315 = 665.0 A

@kellerza
Copy link
Owner

314 = 665.0 A 315 = 665.0 A

Maybe these sensors should indicate the max?

Mine shows 200, which is safer than the fixed 290 you propose

@deondti
Copy link

deondti commented Jan 17, 2025

btw @kellerza
I have managed to solve the problem @ mysensors.py and then adding them to Configuration definitions( I forgot that part)

#configuration part
""SENSOR_DEFINITIONS: single-phase
SENSORS:

  • energy_management
  • power_flow_card
  • pv2_power
  • pv3_power
  • battery_soc
  • pv3_voltage
  • radiator_temperature
  • pv3_current
  • inverter_current
  • grid_ct_power_10
  • grid_power_10
  • Battery_Charge_Limit_current
  • Battery_Discharge_Limit_current""

#mysensors.py
""from sunsynk import AMPS, CELSIUS, KWH, VOLT, WATT
from sunsynk.rwsensors import NumberRWSensor, SelectRWSensor, TimeRWSensor
from sunsynk.sensors import (
MathSensor,
Sensor,
SensorDefinitions,
TempSensor,
)

SENSORS = SensorDefinitions()
#############

#############
SENSORS += (
Sensor(188, "PV3 power", WATT, -1),
Sensor(113, "PV3 voltage", VOLT, 0.1),
Sensor(114, "PV3 current", AMPS, 0.1),
Sensor(175, "L1_load_current", AMPS, 0.1),
Sensor(314, "Battery Charge Limit current", AMPS, -1),
Sensor(315, "Battery Discharge Limit current", AMPS, -1),
Sensor(172, "Grid_Ct_Power_10", WATT, -10),
Sensor(169, "Grid_power_10", WATT, -10),

)

SENSORS += NumberRWSensor(230, "Grid Charge Battery current", AMPS, min=0, max=290)
SENSORS += NumberRWSensor(210, "Battery Max Charge current", AMPS, min=0, max=290)
SENSORS += NumberRWSensor(211, "Battery Max Discharge current", AMPS, min=0, max=290)
""

I was hoping to include this in future updates with the PR

@deondti
Copy link

deondti commented Jan 17, 2025

314 = 665.0 A 315 = 665.0 A

Maybe these sensors should indicate the max?

Mine shows 200, which is safer than the fixed 290 you propose

Max=290 is what's possibly needed and is the maximum allowed under the DEYE android APP
200 will only allow for +/-10KW, if I would be drawing 12Kw and eskom fails it would try and draw 235A from the batterys and you get a DC over current fault while the inverter shuts down.

@deondti
Copy link

deondti commented Jan 17, 2025

@kellerza
Perhaps it's time for inverter rating selections, or maybe inverter rating sensor could determine a different sensor_options.py

Sensor Definitions
Single Phase 5KW
Single Phase 8KW
Single Phase 16KW
Three phase.....
Etc.....
having different sensor options.py

See my custom sensors for 169 and 172 else it only reads eg. 500W instead of 5000W
It seems to be a issue with the 16KW and I can only assume maybe the 12KW
I'm sure the 5Kw works perfectly without the custom sensors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants