]> git.basschouten.com Git - openhab-addons.git/blob
f035093602cf0528095b9626fbb5db58cfbe39b6
[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.echonetlite.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link EchonetLiteBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Michael Barker - Initial contribution
23  */
24 @NonNullByDefault
25 public class EchonetLiteBindingConstants {
26
27     public static final long DEFAULT_POLL_INTERVAL_MS = 30_000;
28     public static final long DEFAULT_RETRY_TIMEOUT_MS = 2_000;
29     public static final int NETWORK_WAIT_TIMEOUT = 250;
30
31     // List of all Thing Type UIDs
32     public static final String BINDING_ID = "echonetlite";
33     public static final ThingTypeUID THING_TYPE_ECHONET_DEVICE = new ThingTypeUID(BINDING_ID, "device");
34     public static final ThingTypeUID THING_TYPE_ECHONET_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
35
36     public static final StateCodec.OnOffCodec ON_OFF_CODEC_30_31 = new StateCodec.OnOffCodec(0x30, 0x31);
37     public static final StateCodec.OnOffCodec ON_OFF_CODEC_41_42 = new StateCodec.OnOffCodec(0x41, 0x42);
38
39     public static final String PROPERTY_NAME_INSTANCE_KEY = "instanceKey";
40     public static final String PROPERTY_NAME_HOSTNAME = "hostname";
41     public static final String PROPERTY_NAME_PORT = "port";
42     public static final String PROPERTY_NAME_GROUP_CODE = "groupCode";
43     public static final String PROPERTY_NAME_CLASS_CODE = "classCode";
44     public static final String PROPERTY_NAME_INSTANCE = "instance";
45     public static final int OFFLINE_TIMEOUT_COUNT = 2;
46 }