From 8680d6ffc3c09177d302dc95c7836eb41b702883 Mon Sep 17 00:00:00 2001 From: Matthias Krebs Date: Tue, 27 May 2025 15:06:24 +0200 Subject: [PATCH 1/2] updated to latest commhandler. --- SampleCommunicator/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SampleCommunicator/build.gradle b/SampleCommunicator/build.gradle index 984950e..9933e5d 100644 --- a/SampleCommunicator/build.gradle +++ b/SampleCommunicator/build.gradle @@ -43,9 +43,9 @@ java { dependencies { // SGr dependencies - implementation group: 'com.smartgridready', name: 'sgr-commhandler', version: '2.4.0' + implementation group: 'com.smartgridready', name: 'sgr-commhandler', version: '2.4.1' runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-j2mod', version: '1.0.0' - runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-apachehttp', version: '2.1.0' + runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-apachehttp', version: '2.1.1' runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-hivemq', version: '2.0.1' // Logging From ed05559476a9a9d2efe7f3afec9f05dd7581e993 Mon Sep 17 00:00:00 2001 From: Matthias Krebs Date: Tue, 3 Jun 2025 12:26:23 +0200 Subject: [PATCH 2/2] added note about the type of value to be given in setVal(...). --- .../communicator/example/EnumAndBitmapSampleCommunicator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SampleCommunicator/src/main/java/com/smartgridready/communicator/example/EnumAndBitmapSampleCommunicator.java b/SampleCommunicator/src/main/java/com/smartgridready/communicator/example/EnumAndBitmapSampleCommunicator.java index ac11bdb..2ca1f00 100644 --- a/SampleCommunicator/src/main/java/com/smartgridready/communicator/example/EnumAndBitmapSampleCommunicator.java +++ b/SampleCommunicator/src/main/java/com/smartgridready/communicator/example/EnumAndBitmapSampleCommunicator.java @@ -92,6 +92,9 @@ public static void main(String[] argv) // The next command sets the heat pump to comfort operation, which is defined as an enum. // To determine valid enum strings for a given data point, have a look at the EI-XML file. // ('./resources/SampleExternalInterfaceFile.xml' in our case) + // Make sure that the type of the value instance you are feeding into the data point + // matches the data point's data type, e.g. EnumValue if the data point's data type is enum. + // If not, conversion errors may occur. This is a library issue which is yet to be resolved. sgcpDevice.setVal(HEAT_PUMP_BASE_PROFILE, HEAT_PUMP_OP_CMD, EnumValue.of("WP_DOM_WATER_OP")); // It is also possible to set the value as an ordinal. sgcpDevice.setVal(HEAT_PUMP_BASE_PROFILE, HEAT_PUMP_OP_CMD, EnumValue.of(5));