2 * Copyright (c) 2010-2021 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.opensprinkler.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link OpenSprinklerBinding} class defines common constants, which are
20 * used across the whole binding.
22 * @author Chris Graham - Initial contribution
23 * @author Florian Schmidt - Split channels to their own things
26 public class OpenSprinklerBindingConstants {
27 public static final String BINDING_ID = "opensprinkler";
29 // List of all Thing ids
30 public static final String HTTP_BRIDGE = "http";
31 public static final String PI_BRIDGE = "pi";
32 public static final String STATION_THING = "station";
33 public static final String DEVICE_THING = "device";
35 // List of all Thing Type UIDs
36 public static final ThingTypeUID OPENSPRINKLER_HTTP_BRIDGE = new ThingTypeUID(BINDING_ID, HTTP_BRIDGE);
37 public static final ThingTypeUID OPENSPRINKLER_STATION = new ThingTypeUID(BINDING_ID, STATION_THING);
38 public static final ThingTypeUID OPENSPRINKLER_DEVICE = new ThingTypeUID(BINDING_ID, DEVICE_THING);
40 public static final int DEFAULT_WAIT_BEFORE_INITIAL_REFRESH = 30;
41 public static final int DEFAULT_REFRESH_RATE = 60;
42 public static final int DISCOVERY_THREAD_POOL_SIZE = 15;
43 public static final boolean DISCOVERY_DEFAULT_AUTO_DISCOVER = false;
44 public static final int DISCOVERY_DEFAULT_TIMEOUT_RATE = 500;
45 public static final int DISCOVERY_DEFAULT_IP_TIMEOUT_RATE = 750;
47 // List of all Channel ids
48 public static final String SENSOR_RAIN = "rainsensor";
49 public static final String SENSOR_WATERLEVEL = "waterlevel";
50 public static final String SENSOR_CURRENT_DRAW = "currentDraw";
51 public static final String STATION_STATE = "stationState";
52 public static final String STATION_QUEUED = "queued";
53 public static final String REMAINING_WATER_TIME = "remainingWaterTime";
54 public static final String NEXT_DURATION = "nextDuration";