]> git.basschouten.com Git - openhab-addons.git/blob
cfbfc954e44bbe7f74bc94efc37c8be89bceedd9
[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.lgwebos.internal;
14
15 import java.util.Set;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.jupnp.model.types.ServiceType;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * This class defines common constants, which are used across the whole binding.
23  *
24  * @author Sebastian Prehn - Initial contribution
25  */
26 @NonNullByDefault
27 public class LGWebOSBindingConstants {
28
29     public static final String BINDING_ID = "lgwebos";
30
31     public static final ThingTypeUID THING_TYPE_WEBOSTV = new ThingTypeUID(BINDING_ID, "WebOSTV");
32
33     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_WEBOSTV);
34
35     public static final ServiceType UPNP_SERVICE_TYPE = new ServiceType("lge-com", "webos-second-screen", 1);
36
37     /*
38      * Config names must match property names in
39      * - WebOSConfiguration
40      * - parameter names in OH-INF/config/config.xml
41      * - property names in OH-INF/thing/thing-types.xml
42      */
43     public static final String CONFIG_HOST = "host";
44     public static final String CONFIG_KEY = "key";
45     public static final String CONFIG_MAC_ADDRESS = "macAddress";
46
47     /*
48      * Property names must match property names in
49      * - property names in OH-INF/thing/thing-types.xml
50      */
51     public static final String PROPERTY_DEVICE_ID = "deviceId";
52     public static final String PROPERTY_DEVICE_OS = "deviceOS";
53     public static final String PROPERTY_DEVICE_OS_VERSION = "deviceOSVersion";
54     public static final String PROPERTY_DEVICE_OS_RELEASE_VERSION = "deviceOSReleaseVersion";
55     public static final String PROPERTY_LAST_CONNECTED = "lastConnected";
56
57     /*
58      * List of all Channel ids.
59      * Values have to match ids in thing-types.xml
60      */
61     public static final String CHANNEL_VOLUME = "volume";
62     public static final String CHANNEL_POWER = "power";
63     public static final String CHANNEL_MUTE = "mute";
64     public static final String CHANNEL_CHANNEL = "channel";
65     public static final String CHANNEL_TOAST = "toast";
66     public static final String CHANNEL_MEDIA_PLAYER = "mediaPlayer";
67     public static final String CHANNEL_MEDIA_STOP = "mediaStop";
68     public static final String CHANNEL_APP_LAUNCHER = "appLauncher";
69     public static final String CHANNEL_RCBUTTON = "rcButton";
70
71     public static final int DEFAULT_WS_PORT = 3000;
72     public static final int DEFAULT_WSS_PORT = 3001;
73 }