2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.openwebnet.internal.handler;
15 import static org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants.*;
17 import java.util.HashSet;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.binding.openwebnet.internal.OpenWebNetBindingConstants;
22 import org.openhab.core.library.types.DecimalType;
23 import org.openhab.core.library.types.OnOffType;
24 import org.openhab.core.library.types.QuantityType;
25 import org.openhab.core.library.types.StringType;
26 import org.openhab.core.library.unit.SIUnits;
27 import org.openhab.core.thing.ChannelUID;
28 import org.openhab.core.thing.Thing;
29 import org.openhab.core.thing.ThingStatus;
30 import org.openhab.core.thing.ThingStatusDetail;
31 import org.openhab.core.thing.ThingTypeUID;
32 import org.openhab.core.types.Command;
33 import org.openhab.core.types.UnDefType;
34 import org.openwebnet4j.communication.OWNException;
35 import org.openwebnet4j.message.BaseOpenMessage;
36 import org.openwebnet4j.message.FrameException;
37 import org.openwebnet4j.message.MalformedFrameException;
38 import org.openwebnet4j.message.Thermoregulation;
39 import org.openwebnet4j.message.Thermoregulation.WhatThermo;
40 import org.openwebnet4j.message.Where;
41 import org.openwebnet4j.message.WhereThermo;
42 import org.openwebnet4j.message.Who;
43 import org.slf4j.Logger;
44 import org.slf4j.LoggerFactory;
47 * The {@link OpenWebNetThermoregulationHandler} is responsible for handling
48 * commands/messages for Thermoregulation
49 * Things. It extends the abstract {@link OpenWebNetThingHandler}.
51 * @author Massimo Valla - Initial contribution. Added support for 4-zone CU
52 * @author Andrea Conte - Thermoregulation
53 * @author Gilberto Cocchi - Thermoregulation
56 public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
58 private final Logger logger = LoggerFactory.getLogger(OpenWebNetThermoregulationHandler.class);
60 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = OpenWebNetBindingConstants.THERMOREGULATION_SUPPORTED_THING_TYPES;
62 private double currentSetPointTemp = 11.5d; // 11.5 is the default setTemp used in MyHomeUP mobile app
64 private Thermoregulation.Function currentFunction = Thermoregulation.Function.GENERIC;
65 private Thermoregulation.OperationMode currentMode = Thermoregulation.OperationMode.MANUAL;
67 private boolean isStandAlone = true; // true if zone is not associated to a CU
69 private boolean isCentralUnit = false;
71 private String programNumber = "1";
73 private static Set<String> probesInProtection = new HashSet<String>();
74 private static Set<String> probesInOFF = new HashSet<String>();
75 private static Set<String> probesInManual = new HashSet<String>();
77 private static final String CU_REMOTE_CONTROL_ENABLED = "ENABLED";
78 private static final String CU_REMOTE_CONTROL_DISABLED = "DISABLED";
79 private static final String CU_BATTERY_OK = "OK";
80 private static final String CU_BATTERY_KO = "KO";
81 private static final Integer UNDOCUMENTED_WHAT_4001 = 4001;
82 private static final Integer UNDOCUMENTED_WHAT_4002 = 4002;
84 public OpenWebNetThermoregulationHandler(Thing thing) {
89 public void initialize() {
92 ThingTypeUID thingType = thing.getThingTypeUID();
93 isCentralUnit = OpenWebNetBindingConstants.THING_TYPE_BUS_THERMO_CU.equals(thingType);
96 Object standAloneConfig = getConfig().get(OpenWebNetBindingConstants.CONFIG_PROPERTY_STANDALONE);
97 if (standAloneConfig != null) {
98 isStandAlone = Boolean.parseBoolean(standAloneConfig.toString());
100 logger.debug("@@@@ THERMO ZONE INITIALIZE isStandAlone={}", isStandAlone);
103 // central unit must have WHERE=#0 or WHERE=0 or WHERE=#0#n
104 String w = deviceWhere.value();
105 if (w == null || !("0".equals(w) || "#0".equals(w) || w.startsWith("#0#"))) {
106 logger.warn("initialize() Invalid WHERE={} for Central Unit.", deviceWhere.value());
107 updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
108 "@text/offline.conf-error-where");
111 // reset state of signal channels (they will be setted when specific messages
113 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_MANUAL, OnOffType.OFF);
114 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_OFF, OnOffType.OFF);
115 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_PROTECTION, OnOffType.OFF);
116 updateState(CHANNEL_CU_SCENARIO_PROGRAM_NUMBER, new DecimalType(programNumber));
117 updateState(CHANNEL_CU_WEEKLY_PROGRAM_NUMBER, new DecimalType(programNumber));
118 updateState(CHANNEL_CU_FAILURE_DISCOVERED, OnOffType.OFF);
123 protected void handleChannelCommand(ChannelUID channel, Command command) {
124 switch (channel.getId()) {
125 case CHANNEL_TEMP_SETPOINT:
126 handleSetpoint(command);
128 case CHANNEL_FUNCTION:
129 handleFunction(command);
134 case CHANNEL_FAN_SPEED:
135 handleSetFanSpeed(command);
137 case CHANNEL_CU_WEEKLY_PROGRAM_NUMBER:
138 case CHANNEL_CU_SCENARIO_PROGRAM_NUMBER:
139 handleSetProgramNumber(command);
142 logger.warn("handleChannelCommand() Unsupported ChannelUID {}", channel.getId());
148 protected void requestChannelState(ChannelUID channel) {
149 super.requestChannelState(channel);
150 refreshDevice(false);
154 protected Where buildBusWhere(String wStr) throws IllegalArgumentException {
155 return new WhereThermo(wStr);
159 protected String ownIdPrefix() {
160 return Who.THERMOREGULATION.value().toString();
163 private void handleSetFanSpeed(Command command) {
164 if (command instanceof StringType) {
165 Where w = deviceWhere;
168 Thermoregulation.FanCoilSpeed speed = Thermoregulation.FanCoilSpeed.valueOf(command.toString());
169 send(Thermoregulation.requestWriteFanCoilSpeed(w.value(), speed));
170 } catch (OWNException e) {
171 logger.warn("handleSetFanSpeed() {}", e.getMessage());
172 } catch (IllegalArgumentException e) {
173 logger.warn("handleSetFanSpeed() Unsupported command {} for thing {}", command,
174 getThing().getUID());
179 logger.warn("handleSetFanSpeed() Unsupported command {} for thing {}", command, getThing().getUID());
183 private void handleSetProgramNumber(Command command) {
184 if (command instanceof DecimalType) {
185 if (!isCentralUnit) {
186 logger.warn("handleSetProgramNumber() This command can be sent only for a Central Unit.");
190 programNumber = command.toString();
191 logger.debug("handleSetProgramNumber() Program number set to {}", programNumber);
193 // force OperationMode update if we are already in SCENARIO o WEEKLY mode
194 if (currentMode.isScenario() || currentMode.isWeekly()) {
196 Thermoregulation.OperationMode new_mode = Thermoregulation.OperationMode
197 .valueOf(currentMode.mode() + "_" + programNumber);
198 logger.debug("handleSetProgramNumber() new mode {}", new_mode);
199 send(Thermoregulation.requestWriteMode(getWhere(deviceWhere.value()), new_mode, currentFunction,
200 currentSetPointTemp));
201 } catch (OWNException e) {
202 logger.warn("handleSetProgramNumber() {}", e.getMessage());
203 } catch (IllegalArgumentException e) {
204 logger.warn("handleSetProgramNumber() Unsupported command {} for thing {}", command,
205 getThing().getUID());
210 logger.warn("handleSetProgramNumber() Unsupported command {} for thing {}", command, getThing().getUID());
214 private void handleSetpoint(Command command) {
215 if (command instanceof QuantityType || command instanceof DecimalType) {
216 Where w = deviceWhere;
219 if (command instanceof QuantityType) {
220 QuantityType<?> tempCelsius = ((QuantityType<?>) command).toUnit(SIUnits.CELSIUS);
221 if (tempCelsius != null) {
222 newTemp = tempCelsius.doubleValue();
225 newTemp = ((DecimalType) command).doubleValue();
228 send(Thermoregulation.requestWriteSetpointTemperature(getWhere(w.value()), newTemp,
230 } catch (MalformedFrameException | OWNException e) {
231 logger.warn("handleSetpoint() {}", e.getMessage());
235 logger.warn("handleSetpoint() Unsupported command {} for thing {}", command, getThing().getUID());
239 private void handleMode(Command command) {
240 if (command instanceof StringType) {
241 Where w = deviceWhere;
244 Thermoregulation.OperationMode new_mode = Thermoregulation.OperationMode.OFF;
246 if (isCentralUnit && WhatThermo.isComplex(command.toString())) {
247 new_mode = Thermoregulation.OperationMode.valueOf(command.toString() + "_" + programNumber);
249 // store current mode
250 currentMode = new_mode;
252 new_mode = Thermoregulation.OperationMode.valueOf(command.toString());
254 send(Thermoregulation.requestWriteMode(getWhere(w.value()), new_mode, currentFunction,
255 currentSetPointTemp));
256 } catch (OWNException e) {
257 logger.warn("handleMode() {}", e.getMessage());
258 } catch (IllegalArgumentException e) {
259 logger.warn("handleMode() Unsupported command {} for thing {}", command, getThing().getUID());
264 logger.warn("handleMode() Unsupported command {} for thing {}", command, getThing().getUID());
268 private String getWhere(String where) {
270 if (where.charAt(0) == '#') {
272 } else { // to support old configurations for CU with where="0"
276 return isStandAlone ? where : "#" + where;
280 private void handleFunction(Command command) {
281 if (command instanceof StringType) {
282 Where w = deviceWhere;
285 Thermoregulation.Function function = Thermoregulation.Function.valueOf(command.toString());
286 send(Thermoregulation.requestWriteFunction(w.value(), function));
287 } catch (OWNException e) {
288 logger.warn("handleFunction() {}", e.getMessage());
289 } catch (IllegalArgumentException e) {
290 logger.warn("handleFunction() Unsupported command {} for thing {}", command, getThing().getUID());
295 logger.warn("handleFunction() Unsupported command {} for thing {}", command, getThing().getUID());
300 protected void handleMessage(BaseOpenMessage msg) {
301 super.handleMessage(msg);
303 logger.debug("@@@@ Thermo.handleMessage(): {}", msg.toStringVerbose());
306 if (msg.getWhat() == null) {
310 // there isn't a message used for setting OK for battery status so let's assume
311 // it's OK and then change to KO if according message is received
312 updateCUBatteryStatus(CU_BATTERY_OK);
314 // same in case of Failure Discovered
315 updateCUFailureDiscovered(OnOffType.OFF);
317 if (msg.getWhat() == Thermoregulation.WhatThermo.REMOTE_CONTROL_DISABLED) {
318 updateCURemoteControlStatus(CU_REMOTE_CONTROL_DISABLED);
319 } else if (msg.getWhat() == Thermoregulation.WhatThermo.REMOTE_CONTROL_ENABLED) {
320 updateCURemoteControlStatus(CU_REMOTE_CONTROL_ENABLED);
321 } else if (msg.getWhat() == Thermoregulation.WhatThermo.BATTERY_KO) {
322 updateCUBatteryStatus(CU_BATTERY_KO);
323 } else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_OFF) {
324 updateCUAtLeastOneProbeOff(OnOffType.ON);
325 } else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_ANTIFREEZE) {
326 updateCUAtLeastOneProbeProtection(OnOffType.ON);
327 } else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_MANUAL) {
328 updateCUAtLeastOneProbeManual(OnOffType.ON);
329 } else if (msg.getWhat() == Thermoregulation.WhatThermo.FAILURE_DISCOVERED) {
330 updateCUFailureDiscovered(OnOffType.ON);
331 } // must intercept all possibile WHATs
332 else if (msg.getWhat() == Thermoregulation.WhatThermo.RELEASE_SENSOR_LOCAL_ADJUST) { // will be implemented
334 logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
335 } else if (msg.getWhat().value() == UNDOCUMENTED_WHAT_4001) {
336 logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
337 } else if (msg.getWhat().value() == UNDOCUMENTED_WHAT_4002) {
338 logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
340 // check and update values of other channel (mode, function, temp)
341 updateModeAndFunction((Thermoregulation) msg);
342 updateSetpoint((Thermoregulation) msg);
347 if (msg.isCommand()) {
348 updateModeAndFunction((Thermoregulation) msg);
350 if (msg.getDim() == null) {
353 if (msg.getDim() == Thermoregulation.DimThermo.TEMPERATURE
354 || msg.getDim() == Thermoregulation.DimThermo.PROBE_TEMPERATURE) {
355 updateTemperature((Thermoregulation) msg);
356 } else if (msg.getDim() == Thermoregulation.DimThermo.TEMP_SETPOINT
357 || msg.getDim() == Thermoregulation.DimThermo.COMPLETE_PROBE_STATUS) {
358 updateSetpoint((Thermoregulation) msg);
359 } else if (msg.getDim() == Thermoregulation.DimThermo.VALVES_STATUS) {
360 updateValveStatus((Thermoregulation) msg);
361 } else if (msg.getDim() == Thermoregulation.DimThermo.ACTUATOR_STATUS) {
362 updateActuatorStatus((Thermoregulation) msg);
363 } else if (msg.getDim() == Thermoregulation.DimThermo.FAN_COIL_SPEED) {
364 updateFanCoilSpeed((Thermoregulation) msg);
365 } else if (msg.getDim() == Thermoregulation.DimThermo.OFFSET) {
366 updateLocalOffset((Thermoregulation) msg);
368 logger.debug("handleMessage() Ignoring unsupported DIM {} for thing {}. Frame={}", msg.getDim(),
369 getThing().getUID(), msg);
374 private void updateModeAndFunction(Thermoregulation tmsg) {
375 if (tmsg.getWhat() == null) {
376 logger.debug("updateModeAndFunction() Could not parse Mode or Function from {} (what is null)",
377 tmsg.getFrameValue());
380 Thermoregulation.WhatThermo w = Thermoregulation.WhatThermo.fromValue(tmsg.getWhat().value());
382 if (w.getMode() == null) {
383 logger.debug("updateModeAndFunction() Could not parse Mode from: {}", tmsg.getFrameValue());
387 if (w.getFunction() == null) {
388 logger.debug("updateModeAndFunction() Could not parse Function from: {}", tmsg.getFrameValue());
392 Thermoregulation.OperationMode operationMode = w.getMode();
393 Thermoregulation.Function function = w.getFunction();
395 // keep track of thermostats (zones) status
396 if (!isCentralUnit && (!((WhereThermo) deviceWhere).isProbe())) {
397 if (operationMode == Thermoregulation.OperationMode.OFF) {
398 probesInManual.remove(tmsg.getWhere().value());
399 probesInProtection.remove(tmsg.getWhere().value());
400 if (probesInOFF.add(tmsg.getWhere().value())) {
401 logger.debug("atLeastOneProbeInOFF: added WHERE ---> {}", tmsg.getWhere());
403 } else if (operationMode == Thermoregulation.OperationMode.PROTECTION) {
404 probesInManual.remove(tmsg.getWhere().value());
405 probesInOFF.remove(tmsg.getWhere().value());
406 if (probesInProtection.add(tmsg.getWhere().value())) {
407 logger.debug("atLeastOneProbeInProtection: added WHERE ---> {}", tmsg.getWhere());
409 } else if (operationMode == Thermoregulation.OperationMode.MANUAL) {
410 probesInProtection.remove(tmsg.getWhere().value());
411 probesInOFF.remove(tmsg.getWhere().value());
412 if (probesInManual.add(tmsg.getWhere().value())) {
413 logger.debug("atLeastOneProbeInManual: added WHERE ---> {}", tmsg.getWhere());
417 if (probesInOFF.isEmpty()) {
418 updateCUAtLeastOneProbeOff(OnOffType.OFF);
420 if (probesInProtection.isEmpty()) {
421 updateCUAtLeastOneProbeProtection(OnOffType.OFF);
423 if (probesInManual.isEmpty()) {
424 updateCUAtLeastOneProbeManual(OnOffType.OFF);
428 updateState(CHANNEL_FUNCTION, new StringType(function.toString()));
430 // must convert from OperationMode to Mode and set ProgramNumber when necessary
431 updateState(CHANNEL_MODE, new StringType(operationMode.mode()));
432 if (operationMode.isScenario()) {
433 logger.debug("updateModeAndFunction() set SCENARIO program to: {}", operationMode.programNumber());
434 updateState(CHANNEL_CU_SCENARIO_PROGRAM_NUMBER, new DecimalType(operationMode.programNumber()));
436 if (operationMode.isWeekly()) {
437 logger.debug("updateModeAndFunction() set WEEKLY program to: {}", operationMode.programNumber());
438 updateState(CHANNEL_CU_WEEKLY_PROGRAM_NUMBER, new DecimalType(operationMode.programNumber()));
441 // store current function
442 currentFunction = function;
444 // in case of central unit store also current operation mode
446 currentMode = operationMode;
450 private void updateTemperature(Thermoregulation tmsg) {
452 double temp = Thermoregulation.parseTemperature(tmsg);
453 updateState(CHANNEL_TEMPERATURE, getAsQuantityTypeOrNull(temp, SIUnits.CELSIUS));
454 } catch (FrameException e) {
455 logger.warn("updateTemperature() FrameException on frame {}: {}", tmsg, e.getMessage());
456 updateState(CHANNEL_TEMPERATURE, UnDefType.UNDEF);
460 private void updateSetpoint(Thermoregulation tmsg) {
464 if (tmsg.getWhat() == null) {
465 // it should be like *4*WHAT#TTTT*#0##
466 logger.debug("updateSetpoint() Could not parse function from {} (what is null)",
467 tmsg.getFrameValue());
471 String[] parameters = tmsg.getWhatParams();
472 if (parameters.length > 0) {
473 temp = Thermoregulation.decodeTemperature(parameters[0]);
474 logger.debug("updateSetpoint() parsed temperature from {}: {} ---> {}", tmsg.toStringVerbose(),
475 parameters[0], temp);
478 temp = Thermoregulation.parseTemperature(tmsg);
480 updateState(CHANNEL_TEMP_SETPOINT, getAsQuantityTypeOrNull(temp, SIUnits.CELSIUS));
481 currentSetPointTemp = temp;
482 } catch (NumberFormatException e) {
483 logger.warn("updateSetpoint() NumberFormatException on frame {}: {}", tmsg, e.getMessage());
484 updateState(CHANNEL_TEMP_SETPOINT, UnDefType.UNDEF);
485 } catch (FrameException e) {
486 logger.warn("updateSetpoint() FrameException on frame {}: {}", tmsg, e.getMessage());
487 updateState(CHANNEL_TEMP_SETPOINT, UnDefType.UNDEF);
491 private void updateFanCoilSpeed(Thermoregulation tmsg) {
493 Thermoregulation.FanCoilSpeed speed = Thermoregulation.parseFanCoilSpeed(tmsg);
494 updateState(CHANNEL_FAN_SPEED, new StringType(speed.toString()));
495 } catch (FrameException e) {
496 logger.warn("updateFanCoilSpeed() FrameException on frame {}: {}", tmsg, e.getMessage());
497 updateState(CHANNEL_FAN_SPEED, UnDefType.UNDEF);
501 private void updateValveStatus(Thermoregulation tmsg) {
503 Thermoregulation.ValveOrActuatorStatus cv = Thermoregulation.parseValveStatus(tmsg,
504 Thermoregulation.WhatThermo.CONDITIONING);
505 updateState(CHANNEL_CONDITIONING_VALVES, new StringType(cv.toString()));
507 Thermoregulation.ValveOrActuatorStatus hv = Thermoregulation.parseValveStatus(tmsg,
508 Thermoregulation.WhatThermo.HEATING);
509 updateState(CHANNEL_HEATING_VALVES, new StringType(hv.toString()));
510 } catch (FrameException e) {
511 logger.warn("updateValveStatus() FrameException on frame {}: {}", tmsg, e.getMessage());
512 updateState(CHANNEL_CONDITIONING_VALVES, UnDefType.UNDEF);
513 updateState(CHANNEL_HEATING_VALVES, UnDefType.UNDEF);
517 private void updateActuatorStatus(Thermoregulation tmsg) {
519 Thermoregulation.ValveOrActuatorStatus hv = Thermoregulation.parseActuatorStatus(tmsg);
520 updateState(CHANNEL_ACTUATORS, new StringType(hv.toString()));
521 } catch (FrameException e) {
522 logger.warn("updateActuatorStatus() FrameException on frame {}: {}", tmsg, e.getMessage());
523 updateState(CHANNEL_ACTUATORS, UnDefType.UNDEF);
527 private void updateLocalOffset(Thermoregulation tmsg) {
529 Thermoregulation.LocalOffset offset = Thermoregulation.parseLocalOffset(tmsg);
530 updateState(CHANNEL_LOCAL_OFFSET, new StringType(offset.toString()));
531 logger.debug("updateLocalOffset() {}: {}", tmsg, offset.toString());
533 } catch (FrameException e) {
534 logger.warn("updateLocalOffset() FrameException on frame {}: {}", tmsg, e.getMessage());
535 updateState(CHANNEL_LOCAL_OFFSET, UnDefType.UNDEF);
539 private void updateCURemoteControlStatus(String status) {
540 updateState(CHANNEL_CU_REMOTE_CONTROL, new StringType(status));
541 logger.debug("updateCURemoteControlStatus(): {}", status);
544 private void updateCUBatteryStatus(String status) {
545 updateState(CHANNEL_CU_BATTERY_STATUS, new StringType(status));
547 if (status == CU_BATTERY_KO) { // do not log default value (which is automatically setted)
548 logger.debug("updateCUBatteryStatus(): {}", status);
552 private void updateCUFailureDiscovered(OnOffType status) {
553 updateState(CHANNEL_CU_FAILURE_DISCOVERED, status);
555 if (status == OnOffType.ON) { // do not log default value (which is automatically setted)
556 logger.debug("updateCUFailureDiscovered(): {}", status);
560 private void updateCUAtLeastOneProbeOff(OnOffType status) {
561 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_OFF, status);
562 logger.debug("updateCUAtLeastOneProbeOff(): {}", status);
565 private void updateCUAtLeastOneProbeProtection(OnOffType status) {
566 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_PROTECTION, status);
567 logger.debug("updateCUAtLeastOneProbeProtection(): {}", status);
570 private void updateCUAtLeastOneProbeManual(OnOffType status) {
571 updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_MANUAL, status);
572 logger.debug("updateCUAtLeastOneProbeManual(): {}", status);
575 private Boolean channelExists(String channelID) {
576 return thing.getChannel(channelID) != null;
580 protected void refreshDevice(boolean refreshAll) {
581 logger.debug("--- refreshDevice() : refreshing SINGLE... ({})", thing.getUID());
583 if (deviceWhere != null) {
584 String w = deviceWhere.value();
588 send(Thermoregulation.requestStatus(getWhere(w)));
589 } catch (OWNException e) {
590 logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
596 send(Thermoregulation.requestTemperature(w));
598 if (!((WhereThermo) deviceWhere).isProbe()) {
599 // for bus_thermo_zone request also other single channels updates
600 send(Thermoregulation.requestSetPointTemperature(w));
601 send(Thermoregulation.requestMode(w));
603 // refresh ONLY subscribed channels
604 if (channelExists(CHANNEL_FAN_SPEED)) {
605 send(Thermoregulation.requestFanCoilSpeed(w));
608 if (channelExists(CHANNEL_CONDITIONING_VALVES) || channelExists(CHANNEL_HEATING_VALVES)) {
609 send(Thermoregulation.requestValvesStatus(w));
612 if (channelExists(CHANNEL_ACTUATORS)) {
613 send(Thermoregulation.requestActuatorsStatus(w));
616 if (channelExists(CHANNEL_LOCAL_OFFSET)) {
617 send(Thermoregulation.requestLocalOffset(w));
620 } catch (OWNException e) {
621 logger.warn("refreshDevice() where='{}' returned OWNException {}", w, e.getMessage());
624 logger.debug("refreshDevice() where is null");