From 179f2505bc66a1f4ccd247ca2e8493e023a178c8 Mon Sep 17 00:00:00 2001 From: Kai Neuhaus Date: Fri, 8 Nov 2024 21:43:15 +0100 Subject: [PATCH] [kermi] updated README.md & fixed typos from review Signed-off-by: Kai Neuhaus --- .../handler/KermiXcenterThingHandler.java | 17 ++++++++--------- .../OH-INF/thing/bridge-kermi-xcenter.xml | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/bundles/org.openhab.binding.modbus.kermi/src/main/java/org/openhab/binding/modbus/kermi/internal/handler/KermiXcenterThingHandler.java b/bundles/org.openhab.binding.modbus.kermi/src/main/java/org/openhab/binding/modbus/kermi/internal/handler/KermiXcenterThingHandler.java index a0037a50499b7..1ef1cf5480001 100644 --- a/bundles/org.openhab.binding.modbus.kermi/src/main/java/org/openhab/binding/modbus/kermi/internal/handler/KermiXcenterThingHandler.java +++ b/bundles/org.openhab.binding.modbus.kermi/src/main/java/org/openhab/binding/modbus/kermi/internal/handler/KermiXcenterThingHandler.java @@ -227,7 +227,8 @@ public void initialize() { } ModbusCommunicationInterface localComms = connectEndpoint(); if (localComms == null) { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Connection failure on initialize..."); + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, + "Connection failure on initialize..."); return; } @@ -272,8 +273,7 @@ public void initialize() { pollTasks.add(chargingCircuitPoller); ModbusReadRequestBlueprint energySourceRequest = new ModbusReadRequestBlueprint(slaveId, - ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, ENERGY_SOURCE_REG_START, ENERGY_SOURCE_REG_SIZE, - 3); + ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, ENERGY_SOURCE_REG_START, ENERGY_SOURCE_REG_SIZE, 3); energySourcePoller = localComms.registerRegularPoll(energySourceRequest, localConfig.refresh, 0, this::handleEnergySourceResult, this::handleEnergySourceFailure); @@ -281,15 +281,15 @@ public void initialize() { ModbusReadRequestBlueprint powerRequest = new ModbusReadRequestBlueprint(slaveId, ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, POWER_REG_START, POWER_REG_SIZE, 3); - powerPoller = localComms.registerRegularPoll(powerRequest, localConfig.refresh, 0, - this::handlePowerResult, this::handlePowerFailure); + powerPoller = localComms.registerRegularPoll(powerRequest, localConfig.refresh, 0, this::handlePowerResult, + this::handlePowerFailure); pollTasks.add(powerPoller); if (localConfig.pvEnabled) { ModbusReadRequestBlueprint pvRequest = new ModbusReadRequestBlueprint(slaveId, - ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, PV_MODULATION_REG_START, - PV_MODULATION_REG_SIZE, 3); + ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, PV_MODULATION_REG_START, PV_MODULATION_REG_SIZE, + 3); pvPoller = localComms.registerRegularPoll(pvRequest, localConfig.refresh, 0, this::handlePvResult, this::handlePvFailure); @@ -317,8 +317,7 @@ public void initialize() { slaveId = slaveEndpointThingHandler.getSlaveId(); comms = slaveEndpointThingHandler.getCommunicationInterface(); } catch (EndpointNotInitializedException e) { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, - "Slave Endpoint not initialized"); + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Slave Endpoint not initialized"); logger.debug("Slave Endpoint not initialized, Thing is offline"); return null; } diff --git a/bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/bridge-kermi-xcenter.xml b/bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/bridge-kermi-xcenter.xml index a907279c7582e..e1630e7852b65 100644 --- a/bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/bridge-kermi-xcenter.xml +++ b/bundles/org.openhab.binding.modbus.kermi/src/main/resources/OH-INF/thing/bridge-kermi-xcenter.xml @@ -23,7 +23,7 @@ Refresh Rate of Xcenter values in Milliseconds 5000 - true + true