Class CorrentlyImpl
- java.lang.Object
-
- io.openems.edge.common.component.AbstractOpenemsComponent
-
- io.openems.edge.timeofusetariff.corrently.CorrentlyImpl
-
- All Implemented Interfaces:
OpenemsComponent
,TimeOfUseTariff
,Corrently
public class CorrentlyImpl extends AbstractOpenemsComponent implements TimeOfUseTariff, OpenemsComponent, Corrently
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.openems.edge.timeofusetariff.corrently.Corrently
Corrently.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
-
Constructor Summary
Constructors Constructor Description CorrentlyImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deactivate()
Handles @Deactivate of implementations.TimeOfUsePrices
getPrices()
Gives electricity prices for the next 24 h; one value per 15 minutes; 96 values in total.static com.google.common.collect.ImmutableSortedMap<java.time.ZonedDateTime,java.lang.Float>
parsePrices(java.lang.String jsonData)
Parse the Corrently JSON to the Price Map.-
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, 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.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
-
-
-
Method Detail
-
deactivate
protected void deactivate()
Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
getPrices
public TimeOfUsePrices getPrices()
Description copied from interface:TimeOfUseTariff
Gives electricity prices for the next 24 h; one value per 15 minutes; 96 values in total.E.g. if called at 10:05, the first value stands for 10:00 to 10:15; second value for 10:15 to 10:30.
- Specified by:
getPrices
in interfaceTimeOfUseTariff
- Returns:
- the prices;
TimeOfUsePrices.empty(java.time.ZonedDateTime)
if no prices are known
-
parsePrices
public static com.google.common.collect.ImmutableSortedMap<java.time.ZonedDateTime,java.lang.Float> parsePrices(java.lang.String jsonData) throws OpenemsError.OpenemsNamedException
Parse the Corrently JSON to the Price Map.- Parameters:
jsonData
- the Corrently JSON- Returns:
- the Price Map
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
-