]> git.basschouten.com Git - openhab-addons.git/blob
ad918d8fe16f1cae715243c398a2c82121be53b0
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.silvercrestwifisocket.internal;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.silvercrestwifisocket.internal.enums.SilvercrestWifiSocketVendor;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link SilvercrestWifiSocketBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Jaime Vaz - Initial contribution
26  * @author Christian Heimerl - for integration of EasyHome
27  */
28 @NonNullByDefault
29 public class SilvercrestWifiSocketBindingConstants {
30
31     /**
32      * The binding id.
33      */
34     public static final String BINDING_ID = "silvercrestwifisocket";
35
36     /**
37      * List of all Thing Type UIDs.
38      */
39     public static final ThingTypeUID THING_TYPE_WIFI_SOCKET = new ThingTypeUID(BINDING_ID, "wifiSocket");
40
41     /**
42      * List of all Channel ids
43      */
44     public static final String WIFI_SOCKET_CHANNEL_ID = "switch";
45
46     /**
47      * The supported thing types.
48      */
49     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_WIFI_SOCKET);
50
51     // -------------- Configuration arguments ----------------
52     /**
53      * Mac address configuration argument key.
54      */
55     public static final String MAC_ADDRESS_ARG = "macAddress";
56     /**
57      * Wifi socket update interval configuration argument key.
58      */
59     public static final String UPDATE_INTERVAL_ARG = "updateInterval";
60     /**
61      * Host address configuration argument key.
62      */
63     public static final String HOST_ADDRESS_ARG = "hostAddress";
64     /**
65      * Host address configuration argument key.
66      */
67     public static final String VENDOR_ARG = "vendor";
68
69     // -------------- Default values ----------------
70     /**
71      * Default Wifi socket refresh interval.
72      */
73     public static final long DEFAULT_REFRESH_INTERVAL = 60;
74
75     /**
76      * Default Wifi socket vendor.
77      */
78     public static final SilvercrestWifiSocketVendor DEFAULT_VENDOR = SilvercrestWifiSocketVendor.LIDL_SILVERCREST;
79
80     /**
81      * Default Wifi socket default UDP port.
82      */
83     public static final int WIFI_SOCKET_DEFAULT_UDP_PORT = 8530;
84
85     /**
86      * Discovery timeout in seconds.
87      */
88     public static final int DISCOVERY_TIMEOUT_SECONDS = 4;
89 }