2 * Copyright (c) 2010-2024 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.salus.internal.cloud.handler;
15 import static java.nio.charset.StandardCharsets.UTF_8;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.salus.internal.SalusApi;
21 import org.openhab.binding.salus.internal.cloud.rest.HttpSalusApi;
22 import org.openhab.binding.salus.internal.handler.AbstractBridgeHandler;
23 import org.openhab.binding.salus.internal.handler.CloudApi;
24 import org.openhab.binding.salus.internal.rest.GsonMapper;
25 import org.openhab.binding.salus.internal.rest.RestClient;
26 import org.openhab.core.io.net.http.HttpClientFactory;
27 import org.openhab.core.thing.Bridge;
30 * @author Martin GrzeĊlowski - Initial contribution
33 public final class CloudBridgeHandler extends AbstractBridgeHandler<CloudBridgeConfig> implements CloudApi {
35 public CloudBridgeHandler(Bridge bridge, HttpClientFactory httpClientFactory) {
36 super(bridge, httpClientFactory, CloudBridgeConfig.class);
40 protected SalusApi newSalusApi(CloudBridgeConfig config, RestClient httpClient, GsonMapper gsonMapper) {
41 return new HttpSalusApi(config.getUsername(), config.getPassword().getBytes(UTF_8), config.getUrl(), httpClient,
46 public Set<String> it600RequiredChannels() {
47 return Set.of("ep_9:sIT600TH:LocalTemperature_x100", "ep_9:sIT600TH:HeatingSetpoint_x100",
48 "ep_9:sIT600TH:SetHeatingSetpoint_x100", "ep_9:sIT600TH:HoldType", "ep_9:sIT600TH:SetHoldType");
52 public boolean isReadOnly() {
57 public String channelPrefix() {