diff --git a/ems/src/main/java/org/openremote/extension/ems/agent/EmsDayAheadAsset.java b/ems/src/main/java/org/openremote/extension/ems/agent/EmsDayAheadAsset.java index d63bc26..536b919 100644 --- a/ems/src/main/java/org/openremote/extension/ems/agent/EmsDayAheadAsset.java +++ b/ems/src/main/java/org/openremote/extension/ems/agent/EmsDayAheadAsset.java @@ -39,19 +39,16 @@ public class EmsDayAheadAsset extends Asset { public static final AttributeDescriptor COLLECT_TIME_FORECASTS = new AttributeDescriptor<>("collectTimeForecasts", ValueType.TEXT); public static final AttributeDescriptor LAST_UPDATE_FORECASTS = new AttributeDescriptor<>("lastUpdateForecasts", ValueType.TEXT, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ); public static final AttributeDescriptor TARIFF_EXPORT_DAY_AHEAD = new AttributeDescriptor<>("tariffExportDayAheadForecast", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits("EUR", UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR); public static final AttributeDescriptor TARIFF_IMPORT_DAY_AHEAD = new AttributeDescriptor<>("tariffImportDayAheadForecast", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits("EUR", UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR); diff --git a/ems/src/main/java/org/openremote/extension/ems/agent/EmsElectricityBatteryAsset.java b/ems/src/main/java/org/openremote/extension/ems/agent/EmsElectricityBatteryAsset.java index 2c9839e..7a4fc1c 100644 --- a/ems/src/main/java/org/openremote/extension/ems/agent/EmsElectricityBatteryAsset.java +++ b/ems/src/main/java/org/openremote/extension/ems/agent/EmsElectricityBatteryAsset.java @@ -51,7 +51,6 @@ public enum EmsElectricityBatteryConnectionStatusValueType { public static final ValueDescriptor CONNECTION_STATUS_VALUE_TYPE = new ValueDescriptor<>("EmsElectricityBatteryConnectionStatusValueType", EmsElectricityBatteryConnectionStatusValueType.class); public static final AttributeDescriptor CONNECTION_STATUS = new AttributeDescriptor<>("connectionStatus", CONNECTION_STATUS_VALUE_TYPE, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ); @@ -67,7 +66,6 @@ public enum EmsElectricityBatteryConnectionStatusValueType { ).withUnits(UNITS_KILO, UNITS_WATT, UNITS_HOUR); public static final AttributeDescriptor ENERGY_LEVEL = new AttributeDescriptor<>("energyLevel", ValueType.POSITIVE_NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -75,7 +73,6 @@ public enum EmsElectricityBatteryConnectionStatusValueType { ).withUnits(UNITS_KILO, UNITS_WATT, UNITS_HOUR); public static final AttributeDescriptor ENERGY_LEVEL_PERCENTAGE = new AttributeDescriptor<>("energyLevelPercentage", ValueType.POSITIVE_NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -89,7 +86,6 @@ public enum EmsElectricityBatteryConnectionStatusValueType { ).withUnits(UNITS_PERCENTAGE); public static final AttributeDescriptor POWER = new AttributeDescriptor<>("power", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -97,7 +93,6 @@ public enum EmsElectricityBatteryConnectionStatusValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_SETPOINT = new AttributeDescriptor<>("powerSetpoint", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), diff --git a/ems/src/main/java/org/openremote/extension/ems/agent/EmsEnergyOptimisationAsset.java b/ems/src/main/java/org/openremote/extension/ems/agent/EmsEnergyOptimisationAsset.java index 52311e3..2e80eb7 100644 --- a/ems/src/main/java/org/openremote/extension/ems/agent/EmsEnergyOptimisationAsset.java +++ b/ems/src/main/java/org/openremote/extension/ems/agent/EmsEnergyOptimisationAsset.java @@ -41,13 +41,11 @@ public class EmsEnergyOptimisationAsset extends Asset ENABLE_DETAILED_LOGGING = new AttributeDescriptor<>("enableDetailedLogging", ValueType.BOOLEAN); public static final AttributeDescriptor ENERGY_EXPORT_TOTAL = new AttributeDescriptor<>("energyExportTotal", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT, UNITS_HOUR); public static final AttributeDescriptor ENERGY_IMPORT_TOTAL = new AttributeDescriptor<>("energyImportTotal", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT, UNITS_HOUR); @@ -70,7 +68,6 @@ public enum OptimisationMethodValueType { ); public static final AttributeDescriptor POWER_CONSUMPTION = new AttributeDescriptor<>("powerConsumption", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -78,7 +75,6 @@ public enum OptimisationMethodValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_FLEXIBLE = new AttributeDescriptor<>("powerFlexible", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -86,7 +82,6 @@ public enum OptimisationMethodValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_NET = new AttributeDescriptor<>("powerNet", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -94,7 +89,6 @@ public enum OptimisationMethodValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_PRODUCTION = new AttributeDescriptor<>("powerProduction", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -105,7 +99,6 @@ public enum OptimisationMethodValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_LIMIT_MAXIMUM_PROFILE_MANUAL = new AttributeDescriptor<>("powerLimitMaximumProfileManual", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -116,7 +109,6 @@ public enum OptimisationMethodValueType { ); public static final AttributeDescriptor POWER_LIMIT_MAXIMUM_PROFILE_TOTAL = new AttributeDescriptor<>("powerLimitMaximumProfileTotal", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -126,7 +118,6 @@ public enum OptimisationMethodValueType { ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_LIMIT_MINIMUM_PROFILE_MANUAL = new AttributeDescriptor<>("powerLimitMinimumProfileManual", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -137,14 +128,12 @@ public enum OptimisationMethodValueType { ); public static final AttributeDescriptor POWER_LIMIT_MINIMUM_PROFILE_TOTAL = new AttributeDescriptor<>("powerLimitMinimumProfileTotal", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor TARIFF_EXPORT = new AttributeDescriptor<>("tariffExport", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), @@ -152,7 +141,6 @@ public enum OptimisationMethodValueType { ).withUnits("EUR", UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR); public static final AttributeDescriptor TARIFF_IMPORT = new AttributeDescriptor<>("tariffImport", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.RULE_STATE), diff --git a/ems/src/main/java/org/openremote/extension/ems/agent/EmsGOPACSAsset.java b/ems/src/main/java/org/openremote/extension/ems/agent/EmsGOPACSAsset.java index 85d2ac5..200f3b9 100644 --- a/ems/src/main/java/org/openremote/extension/ems/agent/EmsGOPACSAsset.java +++ b/ems/src/main/java/org/openremote/extension/ems/agent/EmsGOPACSAsset.java @@ -42,35 +42,30 @@ public class EmsGOPACSAsset extends Asset { ); public static final AttributeDescriptor CURRENT_POWER_FLEX_REQUEST = new AttributeDescriptor<>("currentPowerFlexRequest", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_LIMIT_MAXIMUM_PROFILE_FLEX_ORDER = new AttributeDescriptor<>("powerLimitMaximumProfileFlexOrder", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_LIMIT_MINIMUM_PROFILE_FLEX_ORDER = new AttributeDescriptor<>("powerLimitMinimumProfileFlexOrder", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_MAXIMUM_FLEX_REQUEST = new AttributeDescriptor<>("powerMaximumFlexRequest", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ).withUnits(UNITS_KILO, UNITS_WATT); public static final AttributeDescriptor POWER_MINIMUM_FLEX_REQUEST = new AttributeDescriptor<>("powerMinimumFlexRequest", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -109,7 +104,6 @@ public class EmsGOPACSAsset extends Asset { ); public static final AttributeDescriptor REDISPATCH_REQUESTED_POWER = new AttributeDescriptor<>("redispatchRequestedPower", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -134,7 +128,6 @@ public class EmsGOPACSAsset extends Asset { // --- Redispatch bid attributes (auto-calculated, operator-overridable) --- public static final AttributeDescriptor REDISPATCH_SUGGESTED_POWER = new AttributeDescriptor<>("redispatchSuggestedPower", ValueType.NUMBER, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 7), new MetaItem<>(MetaItemType.HAS_PREDICTED_DATA_POINTS), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) @@ -159,13 +152,11 @@ public class EmsGOPACSAsset extends Asset { // --- Redispatch history (stored as data points for time-series history) --- public static final AttributeDescriptor REDISPATCH_ANNOUNCEMENT_HISTORY = new AttributeDescriptor<>("redispatchAnnouncementHistory", ValueType.JSON_OBJECT, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 90), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) ); public static final AttributeDescriptor REDISPATCH_BID_HISTORY = new AttributeDescriptor<>("redispatchBidHistory", ValueType.JSON_OBJECT, - new MetaItem<>(MetaItemType.DATA_POINTS_MAX_AGE_DAYS, 90), new MetaItem<>(MetaItemType.READ_ONLY), new MetaItem<>(MetaItemType.STORE_DATA_POINTS) );