]> git.basschouten.com Git - openhab-addons.git/blob
2a1ba489511d682bf26e9ade0be5e055c781ab86
[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.automower.internal;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link AutomowerBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Markus Pfleger - Initial contribution
26  * @author Marcin Czeczko - Added support for planner & calendar data
27  */
28 @NonNullByDefault
29 public class AutomowerBindingConstants {
30     private static final String BINDING_ID = "automower";
31
32     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
33
34     // generic thing types
35     public static final ThingTypeUID THING_TYPE_AUTOMOWER = new ThingTypeUID(BINDING_ID, "automower");
36
37     // List of all status Channel ids
38     public static final String GROUP_STATUS = ""; // no channel group in use at the moment, we'll possibly introduce
39                                                   // this in a future release
40     public static final String CHANNEL_STATUS_NAME = GROUP_STATUS + "name";
41     public static final String CHANNEL_STATUS_MODE = GROUP_STATUS + "mode";
42     public static final String CHANNEL_STATUS_ACTIVITY = GROUP_STATUS + "activity";
43     public static final String CHANNEL_STATUS_STATE = GROUP_STATUS + "state";
44     public static final String CHANNEL_STATUS_LAST_UPDATE = GROUP_STATUS + "last-update";
45     public static final String CHANNEL_STATUS_BATTERY = GROUP_STATUS + "battery";
46     public static final String CHANNEL_STATUS_ERROR_CODE = GROUP_STATUS + "error-code";
47     public static final String CHANNEL_STATUS_ERROR_TIMESTAMP = GROUP_STATUS + "error-timestamp";
48     public static final String CHANNEL_PLANNER_NEXT_START = GROUP_STATUS + "planner-next-start";
49     public static final String CHANNEL_PLANNER_OVERRIDE_ACTION = GROUP_STATUS + "planner-override-action";
50     public static final String CHANNEL_CALENDAR_TASKS = GROUP_STATUS + "calendar-tasks";
51
52     // Position Channels ids
53     public static final String GROUP_POSITIONS = ""; // no channel group in use at the moment, we'll possibly
54                                                      // introduce
55     // this in a future release
56     public static final String LAST_POSITION = GROUP_POSITIONS + "last-position";
57     public static final ArrayList<String> CHANNEL_POSITIONS = new ArrayList<String>(
58             List.of(GROUP_POSITIONS + "position01", GROUP_POSITIONS + "position02", GROUP_POSITIONS + "position03",
59                     GROUP_POSITIONS + "position04", GROUP_POSITIONS + "position05", GROUP_POSITIONS + "position06",
60                     GROUP_POSITIONS + "position07", GROUP_POSITIONS + "position08", GROUP_POSITIONS + "position09",
61                     GROUP_POSITIONS + "position10", GROUP_POSITIONS + "position11", GROUP_POSITIONS + "position12",
62                     GROUP_POSITIONS + "position13", GROUP_POSITIONS + "position14", GROUP_POSITIONS + "position15",
63                     GROUP_POSITIONS + "position16", GROUP_POSITIONS + "position17", GROUP_POSITIONS + "position18",
64                     GROUP_POSITIONS + "position19", GROUP_POSITIONS + "position20", GROUP_POSITIONS + "position21",
65                     GROUP_POSITIONS + "position22", GROUP_POSITIONS + "position23", GROUP_POSITIONS + "position24",
66                     GROUP_POSITIONS + "position25", GROUP_POSITIONS + "position26", GROUP_POSITIONS + "position27",
67                     GROUP_POSITIONS + "position28", GROUP_POSITIONS + "position29", GROUP_POSITIONS + "position30",
68                     GROUP_POSITIONS + "position31", GROUP_POSITIONS + "position32", GROUP_POSITIONS + "position33",
69                     GROUP_POSITIONS + "position34", GROUP_POSITIONS + "position35", GROUP_POSITIONS + "position36",
70                     GROUP_POSITIONS + "position37", GROUP_POSITIONS + "position38", GROUP_POSITIONS + "position39",
71                     GROUP_POSITIONS + "position40", GROUP_POSITIONS + "position41", GROUP_POSITIONS + "position42",
72                     GROUP_POSITIONS + "position43", GROUP_POSITIONS + "position44", GROUP_POSITIONS + "position45",
73                     GROUP_POSITIONS + "position46", GROUP_POSITIONS + "position47", GROUP_POSITIONS + "position48",
74                     GROUP_POSITIONS + "position49", GROUP_POSITIONS + "position50"));
75
76     // Command Channel ids
77     public static final String GROUP_COMMANDS = ""; // no channel group in use at the moment, we'll possibly introduce
78                                                     // this in a future release
79     public static final String CHANNEL_COMMAND_START = GROUP_COMMANDS + "start";
80     public static final String CHANNEL_COMMAND_RESUME_SCHEDULE = GROUP_COMMANDS + "resume_schedule";
81     public static final String CHANNEL_COMMAND_PAUSE = GROUP_COMMANDS + "pause";
82     public static final String CHANNEL_COMMAND_PARK = GROUP_COMMANDS + "park";
83     public static final String CHANNEL_COMMAND_PARK_UNTIL_NEXT_SCHEDULE = GROUP_COMMANDS + "park_until_next_schedule";
84     public static final String CHANNEL_COMMAND_PARK_UNTIL_NOTICE = GROUP_COMMANDS + "park_until_further_notice";
85
86     // Automower properties
87     public static final String AUTOMOWER_ID = "mowerId";
88     public static final String AUTOMOWER_NAME = "mowerName";
89     public static final String AUTOMOWER_MODEL = "mowerModel";
90     public static final String AUTOMOWER_SERIAL_NUMBER = "mowerSerialNumber";
91 }