]> git.basschouten.com Git - openhab-addons.git/blob
91115b92e5766c0dbd665fb7ef3e69bf4b6c7a4c
[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.irobot.internal;
14
15 import javax.net.ssl.TrustManager;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.io.net.http.TrustAllTrustManager;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link IRobotBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author hkuhn42 - Initial contribution
26  * @author Pavel Fedin - rename and update
27  * @author Alexander Falkenstern - Add support for I7 series
28  */
29 @NonNullByDefault
30 public class IRobotBindingConstants {
31
32     public static final String BINDING_ID = "irobot";
33
34     // List of all Thing Type UIDs
35     public static final ThingTypeUID THING_TYPE_ROOMBA = new ThingTypeUID(BINDING_ID, "roomba");
36
37     // Something goes wrong...
38     public static final String UNKNOWN = "UNKNOWN";
39
40     // List of all Channel ids
41     public static final String CHANNEL_COMMAND = "command";
42     public static final String CHANNEL_CYCLE = "cycle";
43     public static final String CHANNEL_PHASE = "phase";
44     public static final String CHANNEL_BIN = "bin";
45     public static final String CHANNEL_BATTERY = "battery";
46     public static final String CHANNEL_ERROR = "error";
47     public static final String CHANNEL_RSSI = "rssi";
48     public static final String CHANNEL_SNR = "snr";
49     // iRobot's JSON lists weekdays starting from Saturday
50     public static final String CHANNEL_SCHED_SWITCH_PREFIX = "sched_";
51     public static final String[] CHANNEL_SCHED_SWITCH = { "sched_sun", "sched_mon", "sched_tue", "sched_wed",
52             "sched_thu", "sched_fri", "sched_sat" };
53     public static final String CHANNEL_SCHEDULE = "schedule";
54     public static final String CHANNEL_EDGE_CLEAN = "edge_clean";
55     public static final String CHANNEL_ALWAYS_FINISH = "always_finish";
56     public static final String CHANNEL_POWER_BOOST = "power_boost";
57     public static final String CHANNEL_CLEAN_PASSES = "clean_passes";
58     public static final String CHANNEL_MAP_UPLOAD = "map_upload";
59     public static final String CHANNEL_LAST_COMMAND = "last_command";
60
61     public static final String CMD_CLEAN = "clean";
62     public static final String CMD_CLEAN_REGIONS = "cleanRegions";
63     public static final String CMD_SPOT = "spot";
64     public static final String CMD_DOCK = "dock";
65     public static final String CMD_PAUSE = "pause";
66     public static final String CMD_STOP = "stop";
67
68     public static final String BIN_OK = "ok";
69     public static final String BIN_FULL = "full";
70     public static final String BIN_REMOVED = "removed";
71
72     public static final String BOOST_AUTO = "auto";
73     public static final String BOOST_PERFORMANCE = "performance";
74     public static final String BOOST_ECO = "eco";
75
76     public static final String PASSES_AUTO = "auto";
77     public static final String PASSES_1 = "1";
78     public static final String PASSES_2 = "2";
79
80     // Connection and config constants
81     public static final int MQTT_PORT = 8883;
82     public static final int UDP_PORT = 5678;
83     public static final TrustManager[] TRUST_MANAGERS = { TrustAllTrustManager.getInstance() };
84
85     public static final String ROBOT_BLID = "blid";
86     public static final String ROBOT_PASSWORD = "password";
87 }