|
| 1 | +/** |
| 2 | + * Copyright (c) 2010-2024 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.huesync.internal; |
| 14 | + |
| 15 | +import org.eclipse.jdt.annotation.NonNullByDefault; |
| 16 | +import org.openhab.core.thing.ThingTypeUID; |
| 17 | + |
| 18 | +/** |
| 19 | + * The {@link HueSyncConstants} class defines common constants, which are |
| 20 | + * used across the whole binding. |
| 21 | + * |
| 22 | + * @author Patrik Gfeller - Initial contribution |
| 23 | + */ |
| 24 | +@NonNullByDefault |
| 25 | +public class HueSyncConstants { |
| 26 | + public static class ENDPOINTS { |
| 27 | + public static final String DEVICE = "device"; |
| 28 | + public static final String REGISTRATIONS = "registrations"; |
| 29 | + public static final String HDMI = "hdmi"; |
| 30 | + public static final String EXECUTION = "execution"; |
| 31 | + |
| 32 | + public static class COMMANDS { |
| 33 | + public static final String MODE = "mode"; |
| 34 | + public static final String SYNC = "syncActive"; |
| 35 | + public static final String HDMI = "hdmiActive"; |
| 36 | + public static final String SOURCE = "hdmiSource"; |
| 37 | + public static final String BRIGHTNESS = "brightness"; |
| 38 | + } |
| 39 | + } |
| 40 | + |
| 41 | + public static class CHANNELS { |
| 42 | + public static class DEVICE { |
| 43 | + public static class INFORMATION { |
| 44 | + public static final String FIRMWARE = "device-firmware#firmware"; |
| 45 | + public static final String FIRMWARE_AVAILABLE = "device-firmware#available-firmware"; |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + public static class COMMANDS { |
| 50 | + public static final String MODE = "device-commands#mode"; |
| 51 | + public static final String SYNC = "device-commands#sync-active"; |
| 52 | + public static final String HDMI = "device-commands#hdmi-active"; |
| 53 | + public static final String SOURCE = "device-commands#hdmi-source"; |
| 54 | + public static final String BRIGHTNESS = "device-commands#brightness"; |
| 55 | + } |
| 56 | + |
| 57 | + public static class HDMI { |
| 58 | + public static final HdmiChannels IN_1 = new HdmiChannels("device-hdmi-in-1#name", "device-hdmi-in-1#type", |
| 59 | + "device-hdmi-in-1#mode", "device-hdmi-in-1#status"); |
| 60 | + public static final HdmiChannels IN_2 = new HdmiChannels("device-hdmi-in-2#name", "device-hdmi-in-2#type", |
| 61 | + "device-hdmi-in-2#mode", "device-hdmi-in-2#status"); |
| 62 | + public static final HdmiChannels IN_3 = new HdmiChannels("device-hdmi-in-3#name", "device-hdmi-in-3#type", |
| 63 | + "device-hdmi-in-3#mode", "device-hdmi-in-3#status"); |
| 64 | + public static final HdmiChannels IN_4 = new HdmiChannels("device-hdmi-in-4#name", "device-hdmi-in-4#type", |
| 65 | + "device-hdmi-in-4#mode", "device-hdmi-in-4#status"); |
| 66 | + |
| 67 | + public static final HdmiChannels OUT = new HdmiChannels("device-hdmi-out#name", "device-hdmi-out#type", |
| 68 | + "device-hdmi-out#mode", "device-hdmi-out#status"); |
| 69 | + } |
| 70 | + } |
| 71 | + |
| 72 | + public static final String APPLICATION_NAME = "openHAB"; |
| 73 | + |
| 74 | + /** Minimal API Version required. Only apiLevel >= 7 is supported. */ |
| 75 | + public static final Integer MINIMAL_API_VERSION = 7; |
| 76 | + |
| 77 | + public static final String BINDING_ID = "huesync"; |
| 78 | + public static final String THING_TYPE_ID = "box"; |
| 79 | + public static final ThingTypeUID THING_TYPE_UID = new ThingTypeUID(BINDING_ID, THING_TYPE_ID); |
| 80 | + |
| 81 | + public static final String PARAMETER_HOST = "host"; |
| 82 | + public static final String PARAMETER_PORT = "port"; |
| 83 | + |
| 84 | + public static final Integer REGISTRATION_INITIAL_DELAY = 3; |
| 85 | + public static final Integer REGISTRATION_INTERVAL = 1; |
| 86 | + |
| 87 | + public static final String REGISTRATION_ID = "registrationId"; |
| 88 | + public static final String API_TOKEN = "apiAccessToken"; |
| 89 | +} |
0 commit comments