Class KacoBlueplanetGridsaveImpl
- java.lang.Object
-
- io.openems.edge.common.component.AbstractOpenemsComponent
-
- io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
-
- io.openems.edge.bridge.modbus.sunspec.AbstractOpenemsSunSpecComponent
-
- io.openems.edge.batteryinverter.sunspec.AbstractSunSpecBatteryInverter
-
- io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoBlueplanetGridsaveImpl
-
- All Implemented Interfaces:
ManagedSymmetricBatteryInverter
,SymmetricBatteryInverter
,KacoBlueplanetGridsave
,ModbusComponent
,OpenemsComponent
,StartStoppable
,TimedataProvider
public class KacoBlueplanetGridsaveImpl extends AbstractSunSpecBatteryInverter implements KacoBlueplanetGridsave, ManagedSymmetricBatteryInverter, SymmetricBatteryInverter, ModbusComponent, OpenemsComponent, TimedataProvider, StartStoppable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<T extends AbstractModbusElement<?>>
-
Nested classes/interfaces inherited from interface io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoBlueplanetGridsave
KacoBlueplanetGridsave.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.batteryinverter.api.ManagedSymmetricBatteryInverter
ManagedSymmetricBatteryInverter.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
ModbusComponent.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.startstop.StartStoppable
StartStoppable.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.batteryinverter.api.SymmetricBatteryInverter
SymmetricBatteryInverter.ChannelId
-
-
Field Summary
-
Fields inherited from interface io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoBlueplanetGridsave
RETRY_COMMAND_MAX_ATTEMPTS, RETRY_COMMAND_SECONDS, WATCHDOG_TIMEOUT_SECONDS, WATCHDOG_TRIGGER_SECONDS
-
Fields inherited from interface io.openems.edge.batteryinverter.api.SymmetricBatteryInverter
POWER_DOC_TEXT
-
-
Constructor Summary
Constructors Constructor Description KacoBlueplanetGridsaveImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addBlock(int startAddress, SunSpecModel model, Priority priority)
Adds the block starting from startAddress.protected void
deactivate()
Make sure to call this method from the inheriting OSGi Component.java.lang.String
debugLog()
Gets some output that is suitable for a continuous Debug log.KacoSunSpecModel.S64201.S64201CurrentState
getCurrentState()
Gets the Current State.int
getPowerPrecision()
Calculate the Power-Precision from the Max Apparent Power using the SetPoint scale-factor.StartStop
getStartStopTarget()
Gets the target Start/Stop mode from config or StartStop-Channel.BatteryInverterConstraint[]
getStaticConstraints()
Gets static Constraints for this Battery-Inverter.<T extends Channel<?>>
TgetSunSpecChannelOrError(SunSpecPoint point)
Get the Channel for the given Point or throw an error if it is not available.protected SunSpecModel
getSunSpecModel(int blockId)
Overwrite to provide custom SunSpecModel.Timedata
getTimedata()
Gets theTimedata
service.protected void
onSunSpecInitializationCompleted()
Mark SunSpec initialization completed; this takes some time at startup.void
run(Battery battery, int setActivePower, int setReactivePower)
Run the Battery-Inverter.protected void
setModbus(BridgeModbus modbus)
Set the Modbus bridge.void
setStartStop(StartStop value)
Starts or stops the device or service represented by this OpenEMS Component.-
Methods inherited from class io.openems.edge.batteryinverter.sunspec.AbstractSunSpecBatteryInverter
activate
-
Methods inherited from class io.openems.edge.bridge.modbus.sunspec.AbstractOpenemsSunSpecComponent
activate, defineModbusProtocol, getSunSpecChannel, isSunSpecInitializationCompleted, mapFirstPointToChannel
-
Methods inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
activate, activate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, m, m, modified, modified, unsetModbus
-
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, removeChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.openems.edge.batteryinverter.kaco.blueplanetgridsave.KacoBlueplanetGridsave
_setMaxStartAttempts, _setMaxStopAttempts, getMaxStartAttempts, getMaxStartAttemptsChannel, getMaxStopAttempts, getMaxStopAttemptsChannel, getRequestedStateChannel, setRequestedState
-
Methods inherited from interface io.openems.edge.batteryinverter.api.ManagedSymmetricBatteryInverter
isManaged, isOffGridPossible
-
Methods inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
_setModbusCommunicationFailed, getModbusCommunicationFailed, getModbusCommunicationFailedChannel
-
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Methods inherited from interface io.openems.edge.common.startstop.StartStoppable
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, start, stop
-
Methods inherited from interface io.openems.edge.batteryinverter.api.SymmetricBatteryInverter
_setActiveChargeEnergy, _setActiveChargeEnergy, _setActiveDischargeEnergy, _setActiveDischargeEnergy, _setActivePower, _setActivePower, _setGridMode, _setMaxApparentPower, _setMaxApparentPower, _setReactivePower, _setReactivePower, getActiveChargeEnergy, getActiveChargeEnergyChannel, getActiveDischargeEnergy, getActiveDischargeEnergyChannel, getActivePower, getActivePowerChannel, getGridMode, getGridModeChannel, getMaxApparentPower, getMaxApparentPowerChannel, getReactivePower, getReactivePowerChannel
-
-
-
-
Constructor Detail
-
KacoBlueplanetGridsaveImpl
public KacoBlueplanetGridsaveImpl() throws OpenemsException
- Throws:
OpenemsException
-
-
Method Detail
-
setModbus
protected void setModbus(BridgeModbus modbus)
Description copied from class:AbstractOpenemsModbusComponent
Set the Modbus bridge. Should be called by @Reference- Overrides:
setModbus
in classAbstractOpenemsModbusComponent
- Parameters:
modbus
- the BridgeModbus Reference
-
deactivate
protected void deactivate()
Description copied from class:AbstractSunSpecBatteryInverter
Make sure to call this method from the inheriting OSGi Component.- Overrides:
deactivate
in classAbstractSunSpecBatteryInverter
-
run
public void run(Battery battery, int setActivePower, int setReactivePower) throws OpenemsError.OpenemsNamedException
Description copied from interface:ManagedSymmetricBatteryInverter
Run the Battery-Inverter.- bring the Battery-Inverter in the desired state
- apply information from
Battery
as required - set the target Active and Reactive Power.
This is called on ManagedSymmetricEss::applyPower()
- Specified by:
run
in interfaceManagedSymmetricBatteryInverter
- Parameters:
battery
- theBattery
setActivePower
- the active power setpointsetReactivePower
- the reactive power setpoint- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getStaticConstraints
public BatteryInverterConstraint[] getStaticConstraints() throws OpenemsException
Description copied from interface:ManagedSymmetricBatteryInverter
Gets static Constraints for this Battery-Inverter. Override this method to provide specific Constraints for this Battery-Inverter on every Cycle.- Specified by:
getStaticConstraints
in interfaceManagedSymmetricBatteryInverter
- Returns:
- the Constraints
- Throws:
OpenemsException
- on error
-
onSunSpecInitializationCompleted
protected void onSunSpecInitializationCompleted()
Mark SunSpec initialization completed; this takes some time at startup.- Overrides:
onSunSpecInitializationCompleted
in classAbstractSunSpecBatteryInverter
-
getCurrentState
public KacoSunSpecModel.S64201.S64201CurrentState getCurrentState()
Description copied from interface:KacoBlueplanetGridsave
Gets the Current State.- Specified by:
getCurrentState
in interfaceKacoBlueplanetGridsave
- Returns:
- the
KacoSunSpecModel.S64201.S64201CurrentState
-
getSunSpecModel
protected SunSpecModel getSunSpecModel(int blockId) throws java.lang.IllegalArgumentException
Description copied from class:AbstractOpenemsSunSpecComponent
Overwrite to provide custom SunSpecModel.- Overrides:
getSunSpecModel
in classAbstractOpenemsSunSpecComponent
- Parameters:
blockId
- the Block-Id- Returns:
- the
SunSpecModel
- Throws:
java.lang.IllegalArgumentException
- on error
-
getPowerPrecision
public int getPowerPrecision()
Calculate the Power-Precision from the Max Apparent Power using the SetPoint scale-factor.- Specified by:
getPowerPrecision
in interfaceManagedSymmetricBatteryInverter
- Returns:
- the power precision
-
debugLog
public java.lang.String debugLog()
Description copied from interface:OpenemsComponent
Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.- Specified by:
debugLog
in interfaceOpenemsComponent
- Returns:
- the debug log output
-
setStartStop
public void setStartStop(StartStop value)
Description copied from interface:StartStoppable
Starts or stops the device or service represented by this OpenEMS Component.- Specified by:
setStartStop
in interfaceStartStoppable
- Parameters:
value
- targetStartStop
state
-
getStartStopTarget
public StartStop getStartStopTarget()
Description copied from interface:KacoBlueplanetGridsave
Gets the target Start/Stop mode from config or StartStop-Channel.- Specified by:
getStartStopTarget
in interfaceKacoBlueplanetGridsave
- Returns:
StartStop
-
getSunSpecChannelOrError
public <T extends Channel<?>> T getSunSpecChannelOrError(SunSpecPoint point) throws OpenemsException
Description copied from class:AbstractOpenemsSunSpecComponent
Get the Channel for the given Point or throw an error if it is not available.- Specified by:
getSunSpecChannelOrError
in interfaceKacoBlueplanetGridsave
- Overrides:
getSunSpecChannelOrError
in classAbstractOpenemsSunSpecComponent
- Type Parameters:
T
- the Channel type- Parameters:
point
- the SunSpec Point- Returns:
- the optional Channel
- Throws:
OpenemsException
- if Channel is not available
-
getTimedata
public Timedata getTimedata()
Description copied from interface:TimedataProvider
Gets theTimedata
service.- Specified by:
getTimedata
in interfaceTimedataProvider
- Returns:
- the service or null if it is not (yet) available.
-
addBlock
protected void addBlock(int startAddress, SunSpecModel model, Priority priority) throws OpenemsException
Description copied from class:AbstractOpenemsSunSpecComponent
Adds the block starting from startAddress.- Overrides:
addBlock
in classAbstractOpenemsSunSpecComponent
- Parameters:
startAddress
- the address to start reading frommodel
- the SunSpecModelpriority
- the reading priority- Throws:
OpenemsException
- on error
-
-