Package dev.digiried.wattpilot
Class WattpilotStatus
java.lang.Object
dev.digiried.wattpilot.WattpilotStatus
Class providing the current configuration and status of the Wattpilot.
- Author:
- Florian Hotze - Initial contribution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the configured battery SoC to discharge the battery to when boost is enabled.intGet the configured charging current.Get the current charging metrics.Get the configured charging mode.Get the current charging state.Get the energy counter in watt-hours (Wh) since the start of the current charging session.Get the total energy counter in watt-hours (Wh).Get the enforced charging state of the wallbox, i.e. whether charging forcefully enabled, disabled, or the nothing is enforced.floatGet the configured PV surplus power threshold in watts (W), i.e. the solar power surplus at which solar surplus charging starts inChargingMode.ECOandChargingMode.NEXT_TRIP.intGet the configured PV surplus battery SoC threshold in percent (%), i.e. the battery SoC at which surplus charging starts inChargingMode.ECOandChargingMode.NEXT_TRIP.booleanWhether charging boost is enabled, i.e. provide additional power from battery or grid inChargingMode.ECOandChargingMode.NEXT_TRIP.booleanWhether charging is currently allowed.booleanWhether single phase charging is currently used.
-
Constructor Details
-
WattpilotStatus
protected WattpilotStatus()Create a new Wattpilot status.
-
-
Method Details
-
isBoostEnabled
public boolean isBoostEnabled()Whether charging boost is enabled, i.e. provide additional power from battery or grid inChargingMode.ECOandChargingMode.NEXT_TRIP.- Returns:
- whether boost is enabled
-
getBoostSoCLimit
public int getBoostSoCLimit()Get the configured battery SoC to discharge the battery to when boost is enabled.- Returns:
- the configured boost battery SoC limit
-
isChargingAllowed
public boolean isChargingAllowed()Whether charging is currently allowed.- Returns:
- whether charging is allowed
-
getChargingCurrent
public int getChargingCurrent()Get the configured charging current.- Returns:
- the configured charging current in amperes
-
getChargingState
Get the current charging state.- Returns:
- the current charging state
-
getSurplusPowerThreshold
public float getSurplusPowerThreshold()Get the configured PV surplus power threshold in watts (W), i.e. the solar power surplus at which solar surplus charging starts inChargingMode.ECOandChargingMode.NEXT_TRIP.- Returns:
- the configured PV surplus power threshold
-
getSurplusSoCThreshold
public int getSurplusSoCThreshold()Get the configured PV surplus battery SoC threshold in percent (%), i.e. the battery SoC at which surplus charging starts inChargingMode.ECOandChargingMode.NEXT_TRIP.- Returns:
- the configured PV surplus battery SoC threshold
-
getEnforcedChargingState
Get the enforced charging state of the wallbox, i.e. whether charging forcefully enabled, disabled, or the nothing is enforced.- Returns:
- the enforced state
-
isChargingSinglePhase
public boolean isChargingSinglePhase()Whether single phase charging is currently used.- Returns:
- whether single phase charging is used
-
getChargingMode
Get the configured charging mode.- Returns:
- the configured charge mode
-
getChargingMetrics
Get the current charging metrics.- Returns:
- the current charging metrics
-
getEnergyCounterSinceStart
Get the energy counter in watt-hours (Wh) since the start of the current charging session. If no session is active, the counter since the start of the last session is returned.- Returns:
- the energy counter of the current or the last charging session
-
getEnergyCounterTotal
Get the total energy counter in watt-hours (Wh).- Returns:
- the total energy counter
-