Class EvcsWebastoNextImpl
- All Implemented Interfaces:
ModbusComponent
,OpenemsComponent
,Evcs
,ManagedEvcs
,EvcsWebastoNext
,org.osgi.service.event.EventHandler
-
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.evcs.api.Evcs
Evcs.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.evcs.webasto.next.EvcsWebastoNext
EvcsWebastoNext.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.evcs.api.ManagedEvcs
ManagedEvcs.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
-
Field Summary
Fields inherited from interface io.openems.edge.evcs.api.Evcs
DEFAULT_MAXIMUM_HARDWARE_CURRENT, DEFAULT_MAXIMUM_HARDWARE_POWER, DEFAULT_MINIMUM_HARDWARE_CURRENT, DEFAULT_MINIMUM_HARDWARE_POWER, DEFAULT_POWER_RECISION, DEFAULT_VOLTAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applyChargePowerLimit
(int power) Command to send the given power, to the EVCS.boolean
applyDisplayText
(String text) Command to send the specified text to the EVCS display, if supportedprotected void
Handles @Deactivate of implementations.debugLog()
Gets some output that is suitable for a continuous Debug log.protected ModbusProtocol
Defines the Modbus protocol.Get charge state handler.boolean
Configuration if the debug mode is active or not.int
Maximum hardware limit in W given by the configuration.int
Minimum hardware limit in W given by the configuration.Get theEvcsPower
.int
Minimum time till a charging limit is taken by the EVCS in seconds.void
handleEvent
(org.osgi.service.event.Event event) void
Log debug usingManagedEvcs
Logger.boolean
Command to pause a charge process of the EVCS.protected void
setModbus
(BridgeModbus modbus) Set the Modbus bridge.Methods inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
activate, 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.evcs.api.Evcs
_setActiveConsumptionEnergy, _setActiveConsumptionEnergy, _setChargePower, _setChargePower, _setChargingstationCommunicationFailed, _setChargingType, _setEnergySession, _setEnergySession, _setFixedMaximumHardwarePower, _setFixedMaximumHardwarePower, _setFixedMinimumHardwarePower, _setFixedMinimumHardwarePower, _setMaximumPower, _setMaximumPower, _setMinimumPower, _setMinimumPower, _setPhases, _setPhases, _setStatus, getActiveConsumptionEnergy, getActiveConsumptionEnergyChannel, getChargePower, getChargePowerChannel, getChargingstationCommunicationFailed, getChargingstationCommunicationFailedChannel, getChargingType, getChargingTypeChannel, getEnergySession, getEnergySessionChannel, getFixedMaximumHardwarePower, getFixedMaximumHardwarePowerChannel, getFixedMinimumHardwarePower, getFixedMinimumHardwarePowerChannel, getMaximumHardwarePower, getMaximumHardwarePowerChannel, getMaximumPower, getMaximumPowerChannel, getMinimumHardwarePower, getMinimumHardwarePowerChannel, getMinimumPower, getMinimumPowerChannel, getPhases, getPhasesAsInt, getPhasesChannel, getStatus, getStatusChannel
Methods inherited from interface io.openems.edge.evcs.webasto.next.EvcsWebastoNext
getEvSetChargePowerLimit, getEvSetChargePowerLimitChannel, getLifeBitChannel, getPowerL1, getPowerL1Channel, getPowerL2, getPowerL2Channel, getPowerL3, getPowerL3Channel, setEvSetChargePowerLimit, setLifeBit
Methods inherited from interface io.openems.edge.evcs.api.ManagedEvcs
_setChargeMode, _setIsClustered, _setPowerPrecision, _setPowerPrecision, _setSetChargePowerLimit, _setSetChargePowerLimit, _setSetChargePowerLimitWithFilter, _setSetChargePowerLimitWithFilter, _setSetChargePowerRequest, _setSetChargePowerRequest, _setSetDisplayText, _setSetEnergyLimit, _setSetEnergyLimit, getChargeMode, getChargeModeChannel, getChargeState, getChargeStateChannel, getIsClustered, getIsClusteredChannel, getPowerPrecision, getPowerPrecisionChannel, getSetChargePowerLimit, getSetChargePowerLimitChannel, getSetChargePowerLimitWithFilter, getSetChargePowerLimitWithFilterChannel, getSetChargePowerRequest, getSetChargePowerRequestChannel, getSetDisplayText, getSetDisplayTextChannel, getSetEnergyLimit, getSetEnergyLimitChannel, getWriteInterval, setChargePowerLimit, setChargePowerLimitWithFilter, setChargePowerRequest, setDisplayText, setEnergyLimit
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
-
Constructor Details
-
EvcsWebastoNextImpl
public EvcsWebastoNextImpl()
-
-
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:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsModbusComponent
-
defineModbusProtocol
Description copied from class:AbstractOpenemsModbusComponent
Defines the Modbus protocol.- Specified by:
defineModbusProtocol
in classAbstractOpenemsModbusComponent
- Returns:
- the ModbusProtocol
- Throws:
OpenemsException
- on error
-
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
-
getEvcsPower
Description copied from interface:ManagedEvcs
Get theEvcsPower
.- Specified by:
getEvcsPower
in interfaceManagedEvcs
- Returns:
- the
EvcsPower
-
getConfiguredMinimumHardwarePower
public int getConfiguredMinimumHardwarePower()Description copied from interface:ManagedEvcs
Minimum hardware limit in W given by the configuration.This value is taken as a fallback for the
invalid reference
ChannelId#FIXED_MINIMUM_HARDWARE_POWER
- Specified by:
getConfiguredMinimumHardwarePower
in interfaceManagedEvcs
- Returns:
- minimum hardware limit in W
-
getConfiguredMaximumHardwarePower
public int getConfiguredMaximumHardwarePower()Description copied from interface:ManagedEvcs
Maximum hardware limit in W given by the configuration.This value is taken as a fallback for the
invalid reference
ChannelId#FIXED_MAXIMUM_HARDWARE_POWER
- Specified by:
getConfiguredMaximumHardwarePower
in interfaceManagedEvcs
- Returns:
- maximum hardware limit in W
-
getConfiguredDebugMode
public boolean getConfiguredDebugMode()Description copied from interface:ManagedEvcs
Configuration if the debug mode is active or not.- Specified by:
getConfiguredDebugMode
in interfaceManagedEvcs
- Returns:
- boolean
-
applyChargePowerLimit
Description copied from interface:ManagedEvcs
Command to send the given power, to the EVCS.Example:
// Format the power to the required format and unit String raw = "currtime " + current + " 1"; byte[] raw = s.getBytes(); DatagramPacket packet = new DatagramPacket(raw, raw.length, ip, KebaKeContact.UDP_PORT); DatagramSocket datagrammSocket = null; try { datagrammSocket = new DatagramSocket(); datagrammSocket.send(packet); return true; } catch (SocketException e) { this.logError(this.log, "Unable to open UDP socket for sending [" + s + "] to [" + ip.getHostAddress() + "]: " + e.getMessage()); } catch (IOException e) { this.logError(this.log, "Unable to send [" + s + "] UDP message to [" + ip.getHostAddress() + "]: " + e.getMessage()); } finally { if (datagrammSocket != null) { datagrammSocket.close(); } } return false;
- Specified by:
applyChargePowerLimit
in interfaceManagedEvcs
- Parameters:
power
- Power that should be send in watt- Returns:
- boolean if the power was applied to the EVCS
- Throws:
Exception
-
pauseChargeProcess
Description copied from interface:ManagedEvcs
Command to pause a charge process of the EVCS.In most of the cases, it is sufficient to call the method
invalid reference
#applyChargePowerLimit(Integer)
- Specified by:
pauseChargeProcess
in interfaceManagedEvcs
- Returns:
- boolean if the command was applied to the EVCS
- Throws:
Exception
-
applyDisplayText
Description copied from interface:ManagedEvcs
Command to send the specified text to the EVCS display, if supportedWrites to the display of the charging station, if the EVCS supports that feature - if not, return false.
- Specified by:
applyDisplayText
in interfaceManagedEvcs
- Parameters:
text
- Text to display- Returns:
- boolean if it was sent or not
- Throws:
OpenemsException
- on error
-
getMinimumTimeTillChargingLimitTaken
public int getMinimumTimeTillChargingLimitTaken()Description copied from interface:ManagedEvcs
Minimum time till a charging limit is taken by the EVCS in seconds.- Specified by:
getMinimumTimeTillChargingLimitTaken
in interfaceManagedEvcs
- Returns:
- time in seconds
-
getChargeStateHandler
Description copied from interface:ManagedEvcs
Get charge state handler.- Specified by:
getChargeStateHandler
in interfaceManagedEvcs
- Returns:
- charge state handler
-
logDebug
Description copied from interface:ManagedEvcs
Log debug usingManagedEvcs
Logger.- Specified by:
logDebug
in interfaceManagedEvcs
- Parameters:
message
- message
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-