public class KacoBlueplanetGridsaveImpl extends AbstractSunSpecBatteryInverter implements KacoBlueplanetGridsave, ManagedSymmetricBatteryInverter, SymmetricBatteryInverter, OpenemsComponent, TimedataProvider, StartStoppable
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<T extends AbstractModbusElement<?>>
KacoBlueplanetGridsave.ChannelId
RETRY_COMMAND_MAX_ATTEMPTS, RETRY_COMMAND_SECONDS, WATCHDOG_TIMEOUT_SECONDS, WATCHDOG_TRIGGER_SECONDS
POWER_DOC_TEXT
Constructor and Description |
---|
KacoBlueplanetGridsaveImpl() |
Modifier and Type | Method and 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<?>> |
getSunSpecChannelOrError(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 the
Timedata 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.
|
activate
activate, defineModbusProtocol, getSunSpecChannel, isSunSpecInitializationCompleted, mapFirstPointToChannel
activate, activate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, unsetModbus
_channel, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_setMaxStartAttempts, _setMaxStopAttempts, getMaxStartAttempts, getMaxStartAttemptsChannel, getMaxStopAttempts, getMaxStopAttemptsChannel, getRequestedStateChannel, setRequestedState
getModbusSlaveNatureTable
_setActiveChargeEnergy, _setActiveChargeEnergy, _setActiveDischargeEnergy, _setActiveDischargeEnergy, _setActivePower, _setActivePower, _setGridMode, _setMaxApparentPower, _setMaxApparentPower, _setReactivePower, _setReactivePower, getActiveChargeEnergy, getActiveChargeEnergyChannel, getActiveDischargeEnergy, getActiveDischargeEnergyChannel, getActivePower, getActivePowerChannel, getGridMode, getGridModeChannel, getMaxApparentPower, getMaxApparentPowerChannel, getReactivePower, getReactivePowerChannel
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, start, stop
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, logDebug, logError, logInfo, logWarn, serviceFactoryPid, servicePid, updateConfigurationProperty, updateReferenceFilter
public KacoBlueplanetGridsaveImpl() throws OpenemsException
OpenemsException
protected void setModbus(BridgeModbus modbus)
AbstractOpenemsModbusComponent
setModbus
in class AbstractOpenemsModbusComponent
modbus
- the BridgeModbus Referenceprotected void deactivate()
AbstractSunSpecBatteryInverter
deactivate
in class AbstractSunSpecBatteryInverter
public void run(Battery battery, int setActivePower, int setReactivePower) throws OpenemsError.OpenemsNamedException
ManagedSymmetricBatteryInverter
Battery
as required
This is called on ManagedSymmetricEss::applyPower()
run
in interface ManagedSymmetricBatteryInverter
battery
- the Battery
setActivePower
- the active power setpointsetReactivePower
- the reactive power setpointOpenemsError.OpenemsNamedException
- on errorpublic BatteryInverterConstraint[] getStaticConstraints() throws OpenemsException
ManagedSymmetricBatteryInverter
getStaticConstraints
in interface ManagedSymmetricBatteryInverter
OpenemsException
- on errorprotected void onSunSpecInitializationCompleted()
onSunSpecInitializationCompleted
in class AbstractSunSpecBatteryInverter
public KacoSunSpecModel.S64201.S64201CurrentState getCurrentState()
KacoBlueplanetGridsave
getCurrentState
in interface KacoBlueplanetGridsave
KacoSunSpecModel.S64201.S64201CurrentState
protected SunSpecModel getSunSpecModel(int blockId) throws java.lang.IllegalArgumentException
AbstractOpenemsSunSpecComponent
getSunSpecModel
in class AbstractOpenemsSunSpecComponent
blockId
- the Block-IdSunSpecModel
java.lang.IllegalArgumentException
- on errorpublic int getPowerPrecision()
getPowerPrecision
in interface ManagedSymmetricBatteryInverter
public java.lang.String debugLog()
OpenemsComponent
debugLog
in interface OpenemsComponent
public void setStartStop(StartStop value)
StartStoppable
setStartStop
in interface StartStoppable
value
- target StartStop
statepublic StartStop getStartStopTarget()
KacoBlueplanetGridsave
getStartStopTarget
in interface KacoBlueplanetGridsave
StartStop
public <T extends Channel<?>> T getSunSpecChannelOrError(SunSpecPoint point) throws OpenemsException
AbstractOpenemsSunSpecComponent
getSunSpecChannelOrError
in interface KacoBlueplanetGridsave
getSunSpecChannelOrError
in class AbstractOpenemsSunSpecComponent
T
- the Channel typepoint
- the SunSpec PointOpenemsException
- if Channel is not availablepublic Timedata getTimedata()
TimedataProvider
Timedata
service.getTimedata
in interface TimedataProvider
protected void addBlock(int startAddress, SunSpecModel model, Priority priority) throws OpenemsException
AbstractOpenemsSunSpecComponent
addBlock
in class AbstractOpenemsSunSpecComponent
startAddress
- the address to start reading frommodel
- the SunSpecModelpriority
- the reading priorityOpenemsException
- on error