Hi all,
I've been using @kellerza's excellent code to read data from my SunSynk inverters into Home Assistant via a USB Rs-485 dongle.
However, with the increase in sunlight here in the UK and the reduction in daily load, I'm in a position I can use excess solar to charge my car. I'm looking to implement this via an automation in Home Assistant, but I'm seeking a way to stop the inverters draining the battery when the combined house and car charger load exceeds available excess PV.
I can't do this by writing to the battery BMS' as I have four banks of cells each with an independent BMS and only one of them communicates with the Inverter. I could add an HA interface to all of them via ESP32 but it would be quicker/easier for me just to ask the inverters to stop pulling from the batteries.
I can't see any way to do this in the default sensor list, but digging through Kellerza's code I can see there seems to be a ModBus protocol sensor that might enable me to do it:
##########
# Battery
##########
SENSORS += (
TempSensor(182, "Battery temperature", CELSIUS, 0.1),
Sensor(183, "Battery voltage", VOLT, 0.01),
Sensor(184, "Battery SOC", "%"),
Sensor(190, "Battery power", WATT, -1),
Sensor(191, "Battery current", AMPS, -0.01),
# Charge and Discharge limit vary based on temperature and SoC
Sensor(314, "Battery Charge Limit current", AMPS, -0.01),
Sensor(315, "Battery Discharge Limit current", AMPS, -0.01),
)
I found it here:
src/sunsynk/definitions.py
Documentation says the is read/write, can anyone advise me on how I can access/expose it via HA?
Thanks!!!