Class BatteryInverterKacoBlueplanetGridsaveImpl
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.BatteryInverterKacoBlueplanetGridsaveImpl
- All Implemented Interfaces:
ManagedSymmetricBatteryInverter
,SymmetricBatteryInverter
,BatteryInverterKacoBlueplanetGridsave
,ModbusComponent
,OpenemsComponent
,StartStoppable
,TimedataProvider
public class BatteryInverterKacoBlueplanetGridsaveImpl
extends AbstractSunSpecBatteryInverter
implements BatteryInverterKacoBlueplanetGridsave, 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<ELEMENT extends ModbusElement>
Nested classes/interfaces inherited from interface io.openems.edge.batteryinverter.kaco.blueplanetgridsave.BatteryInverterKacoBlueplanetGridsave
BatteryInverterKacoBlueplanetGridsave.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.BatteryInverterKacoBlueplanetGridsave
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBlock
(int startAddress, SunSpecModel model, Priority priority) Adds the block starting from startAddress.protected void
Make sure to call this method from the inheriting OSGi Component.debugLog()
Gets some output that is suitable for a continuous Debug log.Gets the Current State.int
Calculate the Power-Precision from the Max Apparent Power using the SetPoint scale-factor.Gets the target Start/Stop mode from config or StartStop-Channel.Gets static Constraints for this Battery-Inverter.<T extends Channel<?>>
TGet 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.Gets theTimedata
service.protected void
Mark SunSpec initialization completed; this takes some time at startup.void
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, generateElementToChannelConverter, getSunSpecChannel, isSunSpecInitializationCompleted, mapFirstPointToChannel, preprocessModbusElements
Methods inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
activate, activate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, m, m, modified, modified, retryModbusCommunication, 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.BatteryInverterKacoBlueplanetGridsave
_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, retryModbusCommunication
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 Details
-
BatteryInverterKacoBlueplanetGridsaveImpl
- Throws:
OpenemsException
-
-
Method Details
-
setModbus
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
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
Description copied from interface:BatteryInverterKacoBlueplanetGridsave
Gets the Current State.- Specified by:
getCurrentState
in interfaceBatteryInverterKacoBlueplanetGridsave
- Returns:
- the
KacoSunSpecModel.S64201.S64201CurrentState
-
getSunSpecModel
Description copied from class:AbstractOpenemsSunSpecComponent
Overwrite to provide custom SunSpecModel.- Overrides:
getSunSpecModel
in classAbstractOpenemsSunSpecComponent
- Parameters:
blockId
- the Block-Id- Returns:
- the
SunSpecModel
- Throws:
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
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
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
Description copied from interface:BatteryInverterKacoBlueplanetGridsave
Gets the target Start/Stop mode from config or StartStop-Channel.- Specified by:
getStartStopTarget
in interfaceBatteryInverterKacoBlueplanetGridsave
- 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 interfaceBatteryInverterKacoBlueplanetGridsave
- 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
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
-