100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Updated attributes for several Assets
Michael Rademakerf7ace89353fa
diff --git a/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java b/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.javaindex 5b562259e..41e9fdd6d 100644--- a/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java+++ b/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java@@ -40,8 +40,6 @@ public class ElectricityConsumerAsset extends ElectricityAsset<ElectricityConsumpublic static final AttributeDescriptor<Double> TARIFF_IMPORT = ElectricitySupplierAsset.TARIFF_IMPORT.withOptional(true);public static final AttributeDescriptor<Double> TARIFF_EXPORT = ElectricitySupplierAsset.TARIFF_EXPORT.withOptional(true);public static final AttributeDescriptor<Double> CARBON_IMPORT = ElectricitySupplierAsset.CARBON_IMPORT.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_IMPORT_TOTAL = ElectricitySupplierAsset.CARBON_IMPORT_TOTAL.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_EXPORT_TOTAL = ElectricitySupplierAsset.CARBON_EXPORT_TOTAL.withOptional(true);/*** For use by hydrators (i.e. JPA/Jackson)diff --git a/model/src/main/java/org/openremote/model/asset/impl/ElectricityProducerAsset.java b/model/src/main/java/org/openremote/model/asset/impl/ElectricityProducerAsset.javaindex 74f5419c8..9501f3d6a 100644--- a/model/src/main/java/org/openremote/model/asset/impl/ElectricityProducerAsset.java+++ b/model/src/main/java/org/openremote/model/asset/impl/ElectricityProducerAsset.java@@ -37,8 +37,6 @@ public class ElectricityProducerAsset extends ElectricityAsset<ElectricityProducpublic static final AttributeDescriptor<Double> TARIFF_IMPORT = ElectricitySupplierAsset.TARIFF_IMPORT.withOptional(true);public static final AttributeDescriptor<Double> TARIFF_EXPORT = ElectricitySupplierAsset.TARIFF_EXPORT.withOptional(true);public static final AttributeDescriptor<Double> CARBON_IMPORT = ElectricitySupplierAsset.CARBON_IMPORT.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_IMPORT_TOTAL = ElectricitySupplierAsset.CARBON_IMPORT_TOTAL.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_EXPORT_TOTAL = ElectricitySupplierAsset.CARBON_EXPORT_TOTAL.withOptional(true);public static final AssetDescriptor<ElectricityProducerAsset> DESCRIPTOR = new AssetDescriptor<>("flash", "EABB4D", ElectricityProducerAsset.class);diff --git a/model/src/main/java/org/openremote/model/asset/impl/ElectricityStorageAsset.java b/model/src/main/java/org/openremote/model/asset/impl/ElectricityStorageAsset.javaindex f7fdfc243..b081d132a 100644--- a/model/src/main/java/org/openremote/model/asset/impl/ElectricityStorageAsset.java+++ b/model/src/main/java/org/openremote/model/asset/impl/ElectricityStorageAsset.java@@ -53,8 +53,6 @@ public abstract class ElectricityStorageAsset extends ElectricityAsset<Electricipublic static final AttributeDescriptor<Double> POWER_IMPORT_MIN = ElectricityAsset.POWER_IMPORT_MIN.withOptional(true);public static final AttributeDescriptor<Double> POWER_EXPORT_MIN = ElectricityAsset.POWER_EXPORT_MIN.withOptional(true);public static final AttributeDescriptor<Double> CARBON_IMPORT = ElectricitySupplierAsset.CARBON_IMPORT.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_IMPORT_TOTAL = ElectricitySupplierAsset.CARBON_IMPORT_TOTAL.withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_EXPORT_TOTAL = ElectricitySupplierAsset.CARBON_EXPORT_TOTAL.withOptional(true);/*** For use by hydrators (i.e. JPA/Jackson)diff --git a/model/src/main/java/org/openremote/model/asset/impl/ElectricitySupplierAsset.java b/model/src/main/java/org/openremote/model/asset/impl/ElectricitySupplierAsset.javaindex 547883cda..fc7e9fadf 100644--- a/model/src/main/java/org/openremote/model/asset/impl/ElectricitySupplierAsset.java+++ b/model/src/main/java/org/openremote/model/asset/impl/ElectricitySupplierAsset.java@@ -33,15 +33,9 @@ import static org.openremote.model.Constants.*;@Entitypublic class ElectricitySupplierAsset extends ElectricityAsset<ElectricitySupplierAsset> {- public static final AttributeDescriptor<Double> ENERGY_IMPORT_COST = new AttributeDescriptor<>("energyImportCost", ValueType.NUMBER,- new MetaItem<>(MetaItemType.READ_ONLY, true)- ).withUnits("EUR");- public static final AttributeDescriptor<Double> ENERGY_EXPORT_COST = new AttributeDescriptor<>("energyExportCost", ValueType.NUMBER,- new MetaItem<>(MetaItemType.READ_ONLY, true)- ).withUnits("EUR");- public static final AttributeDescriptor<Double> FINANCIAL_WALLET = new AttributeDescriptor<>("financialWallet", ValueType.NUMBER).withUnits("EUR");- public static final AttributeDescriptor<Integer> CARBON_WALLET = new AttributeDescriptor<>("carbonWallet", ValueType.INTEGER,- new MetaItem<>(MetaItemType.READ_ONLY)+ public static final AttributeDescriptor<Double> FINANCIAL_COST = new AttributeDescriptor<>("financialCost", ValueType.NUMBER).withUnits("EUR");+ public static final AttributeDescriptor<Double> CARBON_COST = new AttributeDescriptor<>("carbonCost", ValueType.NUMBER,+ new MetaItem<>(MetaItemType.READ_ONLY)).withUnits(UNITS_KILO, UNITS_GRAM);public static final AttributeDescriptor<Double> POWER_SETPOINT = ElectricityAsset.POWER_SETPOINT.withOptional(true);@@ -55,15 +49,9 @@ public class ElectricitySupplierAsset extends ElectricityAsset<ElectricitySupplipublic static final AssetDescriptor<ElectricitySupplierAsset> DESCRIPTOR = new AssetDescriptor<>("upload-network", "9257A9", ElectricitySupplierAsset.class);public static final AttributeDescriptor<Double> CARBON_IMPORT = new AttributeDescriptor<>("carbonImport", ValueType.NUMBER)- .withUnits(UNITS_KILO, UNITS_GRAM, UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR).withOptional(true);+ .withUnits(UNITS_KILO, UNITS_GRAM, UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR).withOptional(false);public static final AttributeDescriptor<Double> CARBON_EXPORT = new AttributeDescriptor<>("carbonExport", ValueType.NUMBER)- .withUnits(UNITS_KILO, UNITS_GRAM, UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR).withOptional(true);- public static final AttributeDescriptor<Integer> CARBON_IMPORT_TOTAL = new AttributeDescriptor<>("carbonImportTotal", ValueType.POSITIVE_INTEGER,- new MetaItem<>(MetaItemType.READ_ONLY, true)- ).withUnits(UNITS_KILO, UNITS_GRAM);- public static final AttributeDescriptor<Integer> CARBON_EXPORT_TOTAL = new AttributeDescriptor<>("carbonExportTotal", ValueType.POSITIVE_INTEGER,- new MetaItem<>(MetaItemType.READ_ONLY, true)- ).withUnits(UNITS_KILO, UNITS_GRAM);+ .withUnits(UNITS_KILO, UNITS_GRAM, UNITS_PER, UNITS_KILO, UNITS_WATT, UNITS_HOUR).withOptional(false);/*** For use by hydrators (i.e. JPA/Jackson)@@ -75,39 +63,21 @@ public class ElectricitySupplierAsset extends ElectricityAsset<ElectricitySupplisuper(name);}- public Optional<Double> getEnergyImportCost() {- return getAttributes().getValue(ENERGY_IMPORT_COST);- }-- public ElectricitySupplierAsset setEnergyImportCost(Double value) {- getAttributes().getOrCreate(ENERGY_IMPORT_COST).setValue(value);- return this;- }-- public Optional<Double> getEnergyExportCost() {- return getAttributes().getValue(ENERGY_EXPORT_COST);- }-- public ElectricitySupplierAsset setEnergyExportCost(Double value) {- getAttributes().getOrCreate(ENERGY_EXPORT_COST).setValue(value);- return this;- }-- public Optional<Double> getFinancialWallet() {- return getAttributes().getValue(FINANCIAL_WALLET);+ public Optional<Double> getFinancialCost() {+ return getAttributes().getValue(FINANCIAL_COST);}- public ElectricitySupplierAsset setFinancialWallet(Double value) {- getAttributes().getOrCreate(FINANCIAL_WALLET).setValue(value);+ public ElectricitySupplierAsset setFinancialCost(Double value) {+ getAttributes().getOrCreate(FINANCIAL_COST).setValue(value);return this;}- public Optional<Integer> getCarbonWallet() {- return getAttributes().getValue(CARBON_WALLET);+ public Optional<Double> getCarbonCost() {+ return getAttributes().getValue(CARBON_COST);}- public ElectricitySupplierAsset setCarbonWallet(Integer value) {- getAttributes().getOrCreate(CARBON_WALLET).setValue(value);+ public ElectricitySupplierAsset setCarbonCost(Double value) {+ getAttributes().getOrCreate(CARBON_COST).setValue(value);return this;}@@ -128,22 +98,4 @@ public class ElectricitySupplierAsset extends ElectricityAsset<ElectricitySuppligetAttributes().getOrCreate(CARBON_EXPORT).setValue(value);return this;}-- public Optional<Integer> getCarbonImportTotal() {- return getAttributes().getValue(CARBON_IMPORT_TOTAL);- }-- public ElectricitySupplierAsset setCarbonImportTotal(Integer value) {- getAttributes().getOrCreate(CARBON_IMPORT_TOTAL).setValue(value);- return this;- }-- public Optional<Integer> getCarbonExportTotal() {- return getAttributes().getValue(CARBON_EXPORT_TOTAL);- }-- public ElectricitySupplierAsset setCarbonExportTotal(Integer value) {- getAttributes().getOrCreate(CARBON_EXPORT_TOTAL).setValue(value);- return this;- }}