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