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.echonetlite.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link EchonetLiteBindingConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author Michael Barker - Initial contribution
25 public class EchonetLiteBindingConstants {
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;
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");
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);
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;