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.velux.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link VeluxBridgeConfiguration} is a wrapper for
19 * configuration settings needed to access the
20 * {@link org.openhab.binding.velux.internal.bridge.VeluxBridgeProvider}
23 * It contains the factory default values as well.
25 * <li>{@link VeluxBridgeConfiguration#protocol protocol} protocol type
26 * (one of http or https or slip),</li>
27 * <li>{@link VeluxBridgeConfiguration#ipAddress ipAddress} bridge IP address,</li>
28 * <li>{@link VeluxBridgeConfiguration#tcpPort tcpPort} bridge TCP port,</li>
29 * <li>{@link VeluxBridgeConfiguration#password password} bridge password,</li>
30 * <li>{@link VeluxBridgeConfiguration#timeoutMsecs timeoutMsecs} communication timeout in milliseconds,</li>
31 * <li>{@link VeluxBridgeConfiguration#retries retries} number of retries (with exponential backoff algorithm),</li>
32 * <li>{@link VeluxBridgeConfiguration#refreshMSecs refreshMSecs} refreshMSecs interval for retrieval of bridge
34 * <li>{@link VeluxBridgeConfiguration#isBulkRetrievalEnabled isBulkRetrievalEnabled} flag to use bulk product</LI>
35 * <li>{@link VeluxBridgeConfiguration#isSequentialEnforced isSequentialEnforced} flag to enforce sequential control on
37 * <li>{@link VeluxBridgeConfiguration#isProtocolTraceEnabled isProtocolTraceEnabled} flag to enable protocol logging
38 * (via loglevel INFO).</li>
42 * @author Guenther Schreiner - Initial contribution
45 public class VeluxBridgeConfiguration {
46 public static final String BRIDGE_PROTOCOL = "protocol";
47 public static final String BRIDGE_IPADDRESS = "ipAddress";
48 public static final String BRIDGE_TCPPORT = "tcpPort";
49 public static final String BRIDGE_PASSWORD = "password";
50 public static final String BRIDGE_TIMEOUT_MSECS = "timeoutMsecs";
51 public static final String BRIDGE_RETRIES = "retries";
52 public static final String BRIDGE_REFRESH_MSECS = "refreshMsecs";
53 public static final String BRIDGE_IS_BULK_RETRIEVAL_ENABLED = "isBulkRetrievalEnabled";
54 public static final String BRIDGE_IS_SEQUENTIAL_ENFORCED = "isSequentialEnforced";
55 public static final String BRIDGE_PROTOCOL_TRACE_ENABLED = "isProtocolTraceEnabled";
58 * Value to flag any changes towards the getter.
60 public boolean hasChanged = true;
63 * Default values - should not be modified
65 public String protocol = "slip";
66 public String ipAddress = "192.168.1.1";
67 public int tcpPort = 51200;
68 public String password = "velux123";
69 public int timeoutMsecs = 1000; // one second
70 public int retries = 5;
71 public long refreshMSecs = 10000L; // 10 seconds
72 public boolean isBulkRetrievalEnabled = true;
73 public boolean isSequentialEnforced = false;
74 public boolean isProtocolTraceEnabled = false;