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.regoheatpump.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.regoheatpump.internal.RegoHeatPumpBindingConstants;
17 import org.openhab.binding.regoheatpump.internal.protocol.IpRegoConnection;
18 import org.openhab.binding.regoheatpump.internal.protocol.RegoConnection;
19 import org.openhab.core.thing.Thing;
22 * The {@link IpRego6xxHeatPumpHandler} is responsible for handling commands, which are
23 * sent to one of the channels.
25 * @author Boris Krivonog - Initial contribution
28 public class IpRego6xxHeatPumpHandler extends Rego6xxHeatPumpHandler {
29 public IpRego6xxHeatPumpHandler(Thing thing) {
34 protected RegoConnection createConnection() {
35 String host = (String) getConfig().get(RegoHeatPumpBindingConstants.HOST_PARAMETER);
36 Integer port = ((Number) getConfig().get(RegoHeatPumpBindingConstants.TCP_PORT_PARAMETER)).intValue();
38 return new IpRegoConnection(host, port);