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
Removed usage of AssetMeta EXECUTABLE from Velbus protocol (always false and removing avoids confusion)
Rich Turner0705be06ca98
diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.javaindex c8482f60b..2063a7855 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java@@ -376,7 +376,7 @@ public abstract class AbstractVelbusProtocol extends AbstractProtocol implementspropertyDescriptor.getDisplayName(),propertyDescriptor.getAttributeType(),propertyDescriptor.isReadOnly(),- propertyDescriptor.isExecutable(),+ false,createLinkedAttributeMetaItems(deviceAddress,propertyDescriptor.getLinkName()diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.javaindex 6b5639b98..4a1caed8a 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/AnalogInputProcessor.java@@ -115,28 +115,28 @@ public class AnalogInputProcessor extends FeatureProcessor {protected static final String EmptySensorText = " ";protected static final List<PropertyDescriptor> METEO_PROPERTIES = Arrays.asList(- new PropertyDescriptor("rainfall", "Rainfall", "RAINFALL", AttributeType.RAINFALL, true, false),- new PropertyDescriptor("lightLevel", "Light Level", "LIGHT", AttributeType.BRIGHTNESS_LUX, true, false),- new PropertyDescriptor("windSpeed", "Wind Speed", "WIND", AttributeType.SPEED_KPH, true, false)+ new PropertyDescriptor("rainfall", "Rainfall", "RAINFALL", AttributeType.RAINFALL, true),+ new PropertyDescriptor("lightLevel", "Light Level", "LIGHT", AttributeType.BRIGHTNESS_LUX, true),+ new PropertyDescriptor("windSpeed", "Wind Speed", "WIND", AttributeType.SPEED_KPH, true));protected static final List<PropertyDescriptor> IO_PROPERTIES = Arrays.asList(- new PropertyDescriptor("sensor1", "Sensor 1", "SENSOR1", AttributeType.NUMBER, true, false),- new PropertyDescriptor("sensor2", "Sensor 2", "SENSOR2", AttributeType.NUMBER, true, false),- new PropertyDescriptor("sensor3", "Sensor 3", "SENSOR3", AttributeType.NUMBER, true, false),- new PropertyDescriptor("sensor4", "Sensor 4", "SENSOR4", AttributeType.NUMBER, true, false),- new PropertyDescriptor("sensor1Text", "Sensor 1 Text", "SENSOR1_TEXT", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor2Text", "Sensor 2 Text", "SENSOR2_TEXT", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor3Text", "Sensor 3 Text", "SENSOR3_TEXT", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor4Text", "Sensor 4 Text", "SENSOR4_TEXT", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor1Type", "Sensor 1 Type", "SENSOR1_TYPE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor2Type", "Sensor 2 Type", "SENSOR2_TYPE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor3Type", "Sensor 3 Type", "SENSOR3_TYPE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor4Type", "Sensor 4 Type", "SENSOR4_TYPE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor1Mode", "Sensor 1 Mode", "SENSOR1_MODE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor2Mode", "Sensor 2 Mode", "SENSOR2_MODE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor3Mode", "Sensor 3 Mode", "SENSOR3_MODE", AttributeType.STRING, true, false),- new PropertyDescriptor("sensor4Mode", "Sensor 4 Mode", "SENSOR4_MODE", AttributeType.STRING, true, false)+ new PropertyDescriptor("sensor1", "Sensor 1", "SENSOR1", AttributeType.NUMBER, true),+ new PropertyDescriptor("sensor2", "Sensor 2", "SENSOR2", AttributeType.NUMBER, true),+ new PropertyDescriptor("sensor3", "Sensor 3", "SENSOR3", AttributeType.NUMBER, true),+ new PropertyDescriptor("sensor4", "Sensor 4", "SENSOR4", AttributeType.NUMBER, true),+ new PropertyDescriptor("sensor1Text", "Sensor 1 Text", "SENSOR1_TEXT", AttributeType.STRING, true),+ new PropertyDescriptor("sensor2Text", "Sensor 2 Text", "SENSOR2_TEXT", AttributeType.STRING, true),+ new PropertyDescriptor("sensor3Text", "Sensor 3 Text", "SENSOR3_TEXT", AttributeType.STRING, true),+ new PropertyDescriptor("sensor4Text", "Sensor 4 Text", "SENSOR4_TEXT", AttributeType.STRING, true),+ new PropertyDescriptor("sensor1Type", "Sensor 1 Type", "SENSOR1_TYPE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor2Type", "Sensor 2 Type", "SENSOR2_TYPE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor3Type", "Sensor 3 Type", "SENSOR3_TYPE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor4Type", "Sensor 4 Type", "SENSOR4_TYPE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor1Mode", "Sensor 1 Mode", "SENSOR1_MODE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor2Mode", "Sensor 2 Mode", "SENSOR2_MODE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor3Mode", "Sensor 3 Mode", "SENSOR3_MODE", AttributeType.STRING, true),+ new PropertyDescriptor("sensor4Mode", "Sensor 4 Mode", "SENSOR4_MODE", AttributeType.STRING, true));@Overridediff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/CounterProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/CounterProcessor.javaindex 6457925be..18445fb50 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/CounterProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/CounterProcessor.java@@ -71,18 +71,18 @@ public class CounterProcessor extends FeatureProcessor {}public static final List<PropertyDescriptor> SUPPORTED_PROPERTIES = Arrays.asList(- new PropertyDescriptor("counter1Enabled", "Counter 1 Enabled", "COUNTER1_ENABLED", AttributeType.BOOLEAN, true, false),- new PropertyDescriptor("counter2Enabled", "Counter 2 Enabled", "COUNTER2_ENABLED", AttributeType.BOOLEAN, true, false),- new PropertyDescriptor("counter3Enabled", "Counter 3 Enabled", "COUNTER3_ENABLED", AttributeType.BOOLEAN, true, false),- new PropertyDescriptor("counter4Enabled", "Counter 4 Enabled", "COUNTER4_ENABLED", AttributeType.BOOLEAN, true, false),- new PropertyDescriptor("counter1Units", "Counter 1 Units", "COUNTER1_UNITS", AttributeType.STRING, true, false),- new PropertyDescriptor("counter2Units", "Counter 2 Units", "COUNTER2_UNITS", AttributeType.STRING, true, false),- new PropertyDescriptor("counter3Units", "Counter 3 Units", "COUNTER3_UNITS", AttributeType.STRING, true, false),- new PropertyDescriptor("counter4Units", "Counter 4 Units", "COUNTER4_UNITS", AttributeType.STRING, true, false),- new PropertyDescriptor("counter1Instant", "Counter 1 Instant", "COUNTER1_INSTANT", AttributeType.NUMBER, true, false),- new PropertyDescriptor("counter2Instant", "Counter 2 Instant", "COUNTER2_INSTANT", AttributeType.NUMBER, true, false),- new PropertyDescriptor("counter3Instant", "Counter 3 Instant", "COUNTER3_INSTANT", AttributeType.NUMBER, true, false),- new PropertyDescriptor("counter4Instant", "Counter 4 Instant", "COUNTER4_INSTANT", AttributeType.NUMBER, true, false),+ new PropertyDescriptor("counter1Enabled", "Counter 1 Enabled", "COUNTER1_ENABLED", AttributeType.BOOLEAN, true),+ new PropertyDescriptor("counter2Enabled", "Counter 2 Enabled", "COUNTER2_ENABLED", AttributeType.BOOLEAN, true),+ new PropertyDescriptor("counter3Enabled", "Counter 3 Enabled", "COUNTER3_ENABLED", AttributeType.BOOLEAN, true),+ new PropertyDescriptor("counter4Enabled", "Counter 4 Enabled", "COUNTER4_ENABLED", AttributeType.BOOLEAN, true),+ new PropertyDescriptor("counter1Units", "Counter 1 Units", "COUNTER1_UNITS", AttributeType.STRING, true),+ new PropertyDescriptor("counter2Units", "Counter 2 Units", "COUNTER2_UNITS", AttributeType.STRING, true),+ new PropertyDescriptor("counter3Units", "Counter 3 Units", "COUNTER3_UNITS", AttributeType.STRING, true),+ new PropertyDescriptor("counter4Units", "Counter 4 Units", "COUNTER4_UNITS", AttributeType.STRING, true),+ new PropertyDescriptor("counter1Instant", "Counter 1 Instant", "COUNTER1_INSTANT", AttributeType.NUMBER, true),+ new PropertyDescriptor("counter2Instant", "Counter 2 Instant", "COUNTER2_INSTANT", AttributeType.NUMBER, true),+ new PropertyDescriptor("counter3Instant", "Counter 3 Instant", "COUNTER3_INSTANT", AttributeType.NUMBER, true),+ new PropertyDescriptor("counter4Instant", "Counter 4 Instant", "COUNTER4_INSTANT", AttributeType.NUMBER, true),new PropertyDescriptor("counter1", "Counter 1", "COUNTER1", AttributeType.NUMBER),new PropertyDescriptor("counter2", "Counter 2", "COUNTER2", AttributeType.NUMBER),new PropertyDescriptor("counter3", "Counter 3", "COUNTER3", AttributeType.NUMBER),diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/FeatureProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/FeatureProcessor.javaindex b097da02a..aeeead2d6 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/FeatureProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/FeatureProcessor.java@@ -21,7 +21,6 @@ package org.openremote.agent.protocol.velbus.device;import org.openremote.agent.protocol.velbus.VelbusPacket;import org.openremote.model.attribute.AttributeType;-import org.openremote.model.attribute.MetaItem;import org.openremote.model.util.EnumUtil;import org.openremote.model.value.Value;import org.openremote.model.value.ValueType;@@ -44,14 +43,13 @@ public abstract class FeatureProcessor {protected final String linkName;protected final AttributeType attributeType;protected final boolean readOnly;- protected final boolean executable;public PropertyDescriptor(String name,String displayName,String linkName,AttributeType attributeType) {- this(name, displayName, linkName, attributeType, false, false);+ this(name, displayName, linkName, attributeType, false);}public PropertyDescriptor(@@ -59,14 +57,12 @@ public abstract class FeatureProcessor {String displayName,String linkName,AttributeType attributeType,- boolean readOnly,- boolean executable) {+ boolean readOnly) {this.name = name;this.displayName = displayName;this.linkName = linkName;this.attributeType = attributeType;this.readOnly = readOnly;- this.executable = executable;}public String getName() {@@ -85,10 +81,6 @@ public abstract class FeatureProcessor {return readOnly;}- public boolean isExecutable() {- return executable;- }-public String getLinkName() {return linkName;}@@ -123,7 +115,7 @@ public abstract class FeatureProcessor {}public static LedState fromCode(int code) {- for (LedState type : LedState.values()) {+ for (LedState type : values) {if (type.getCode() == code) {return type;}diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.javaindex e50351233..036d2fd08 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/InputProcessor.java@@ -159,10 +159,10 @@ public class InputProcessor extends ChannelProcessor {properties.add(new PropertyDescriptor("ch"+i+"LockDuration", "CH" + i + " Lock Duration (s)", "CH" + i + propertyType.getPropertySuffix(), AttributeType.NUMBER));break;case ENABLED_STATE:- properties.add(new PropertyDescriptor("ch"+i+"Enabled", "CH" + i + " Enabled", "CH" + i + propertyType.getPropertySuffix(), AttributeType.BOOLEAN, true, false));+ properties.add(new PropertyDescriptor("ch"+i+"Enabled", "CH" + i + " Enabled", "CH" + i + propertyType.getPropertySuffix(), AttributeType.BOOLEAN, true));break;case INVERTED_STATE:- properties.add(new PropertyDescriptor("ch"+i+"Inverted", "CH" + i + " Inverted", "CH" + i + propertyType.getPropertySuffix(), AttributeType.BOOLEAN, true, false));+ properties.add(new PropertyDescriptor("ch"+i+"Inverted", "CH" + i + " Inverted", "CH" + i + propertyType.getPropertySuffix(), AttributeType.BOOLEAN, true));break;}diff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/TemperatureProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/TemperatureProcessor.javaindex ace2784ad..1c3343373 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/TemperatureProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/TemperatureProcessor.java@@ -29,9 +29,9 @@ import java.util.List;public class TemperatureProcessor extends FeatureProcessor {protected static final List<PropertyDescriptor> SUPPORTED_PROPERTIES = Arrays.asList(- new PropertyDescriptor("tempCurrent", "Temp Current", "TEMP_CURRENT", AttributeType.TEMPERATURE_CELCIUS, true, false),- new PropertyDescriptor("tempMin", "Temp Min", "TEMP_MIN", AttributeType.TEMPERATURE_CELCIUS, true, false),- new PropertyDescriptor("tempMax", "Temp Max", "TEMP_MAX", AttributeType.TEMPERATURE_CELCIUS, true, false)+ new PropertyDescriptor("tempCurrent", "Temp Current", "TEMP_CURRENT", AttributeType.TEMPERATURE_CELCIUS, true),+ new PropertyDescriptor("tempMin", "Temp Min", "TEMP_MIN", AttributeType.TEMPERATURE_CELCIUS, true),+ new PropertyDescriptor("tempMax", "Temp Max", "TEMP_MAX", AttributeType.TEMPERATURE_CELCIUS, true));@Overridediff --git a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/ThermostatProcessor.java b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/ThermostatProcessor.javaindex 229db6b9b..833ec009e 100644--- a/agent/src/main/java/org/openremote/agent/protocol/velbus/device/ThermostatProcessor.java+++ b/agent/src/main/java/org/openremote/agent/protocol/velbus/device/ThermostatProcessor.java@@ -130,14 +130,14 @@ public class ThermostatProcessor extends FeatureProcessor {}protected static final List<PropertyDescriptor> THERMOSTAT_PROPERTIES = Arrays.asList(- new PropertyDescriptor("heater", "Heater", "HEATER", AttributeType.STRING, true, false),- new PropertyDescriptor("boost", "Boost", "BOOST", AttributeType.STRING, true, false),- new PropertyDescriptor("pump", "Pump", "PUMP", AttributeType.STRING, true, false),- new PropertyDescriptor("cooler", "Cooler", "COOLER", AttributeType.STRING, true, false),- new PropertyDescriptor("tempAlarm1", "Temp Alarm 1", "TEMP_ALARM1", AttributeType.STRING, true, false),- new PropertyDescriptor("tempAlarm2", "Temp Alarm 2", "TEMP_ALARM2", AttributeType.STRING, true, false),- new PropertyDescriptor("tempAlarm3", "Temp Alarm 3", "TEMP_ALARM3", AttributeType.STRING, true, false),- new PropertyDescriptor("tempAlarm4", "Temp Alarm 4", "TEMP_ALARM4", AttributeType.STRING, true, false),+ new PropertyDescriptor("heater", "Heater", "HEATER", AttributeType.STRING, true),+ new PropertyDescriptor("boost", "Boost", "BOOST", AttributeType.STRING, true),+ new PropertyDescriptor("pump", "Pump", "PUMP", AttributeType.STRING, true),+ new PropertyDescriptor("cooler", "Cooler", "COOLER", AttributeType.STRING, true),+ new PropertyDescriptor("tempAlarm1", "Temp Alarm 1", "TEMP_ALARM1", AttributeType.STRING, true),+ new PropertyDescriptor("tempAlarm2", "Temp Alarm 2", "TEMP_ALARM2", AttributeType.STRING, true),+ new PropertyDescriptor("tempAlarm3", "Temp Alarm 3", "TEMP_ALARM3", AttributeType.STRING, true),+ new PropertyDescriptor("tempAlarm4", "Temp Alarm 4", "TEMP_ALARM4", AttributeType.STRING, true),new PropertyDescriptor("tempState", "Thermostat State", "TEMP_STATE", AttributeType.STRING),new PropertyDescriptor("tempStateDisable", "Thermostat Disable (s)", "TEMP_STATE_DISABLE_SECONDS", AttributeType.TIME_SECONDS),// Get current mode or set mode until next program step