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.aws.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.aws.http.AwsSalusApi;
22 import org.openhab.binding.salus.internal.handler.AbstractBridgeHandler;
23 import org.openhab.binding.salus.internal.rest.GsonMapper;
24 import org.openhab.binding.salus.internal.rest.RestClient;
25 import org.openhab.core.io.net.http.HttpClientFactory;
26 import org.openhab.core.thing.Bridge;
29 * @author Martin GrzeĊlowski - Initial contribution
32 public final class AwsCloudBridgeHandler extends AbstractBridgeHandler<AwsCloudBridgeConfig> {
33 private final HttpClientFactory httpClientFactory;
35 public AwsCloudBridgeHandler(Bridge bridge, HttpClientFactory httpClientFactory) {
36 super(bridge, httpClientFactory, AwsCloudBridgeConfig.class);
37 this.httpClientFactory = httpClientFactory;
41 protected SalusApi newSalusApi(AwsCloudBridgeConfig config, RestClient httpClient, GsonMapper gsonMapper) {
42 return new AwsSalusApi(httpClientFactory, config.getUsername(), config.getPassword().getBytes(UTF_8),
43 config.getUrl(), httpClient, gsonMapper, config.getUserPoolId(), config.getIdentityPoolId(),
44 config.getClientId(), config.getRegion(), config.getCompanyCode(), config.getAwsService());
48 public Set<String> it600RequiredChannels() {
49 return Set.of("ep9:sIT600TH:LocalTemperature_x100", "ep9:sIT600TH:HeatingSetpoint_x100",
50 "ep9:sIT600TH:HoldType");
54 public boolean isReadOnly() {
59 public String channelPrefix() {