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.hue.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.hue.internal.handler.HueBridgeHandler;
20 * Configuration for the {@link HueBridgeHandler}.
22 * @author Christoph Weitkamp - Initial contribution
25 public class HueBridgeConfig {
26 public static final String HTTP = "http";
27 public static final String HTTPS = "https";
29 public @Nullable String ipAddress;
30 public @Nullable Integer port;
31 public String protocol = HTTPS;
32 public boolean useSelfSignedCertificate = true;
33 public @Nullable String userName;
34 public int pollingInterval = 10;
35 public int sensorPollingInterval = 500;
37 public int getPort() {
38 Integer thePort = port;
39 return (thePort != null) ? thePort.intValue() : HTTPS.equals(protocol) ? 443 : 80;