]> git.basschouten.com Git - openhab-addons.git/blob
a3b71d8b7e99f112c860665b5e2fdf7ee68567cd
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.sensebox.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link SenseBoxBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Hakan Tandogan - Initial contribution
23  */
24 @NonNullByDefault
25 public class SenseBoxBindingConstants {
26
27     public static final String BINDING_ID = "sensebox";
28
29     // List of all Thing Type UIDs
30     public static final ThingTypeUID THING_TYPE_BOX = new ThingTypeUID(BINDING_ID, "box");
31
32     // List of all Channel ids
33     public static final String CHANNEL_LOCATION = "descriptors#location";
34
35     public static final String CHANNEL_UV_INTENSITY = "measurements#uvIntensity";
36     public static final String CHANNEL_ILLUMINANCE = "measurements#illuminance";
37     public static final String CHANNEL_PRESSURE = "measurements#pressure";
38     public static final String CHANNEL_HUMIDITY = "measurements#humidity";
39     public static final String CHANNEL_TEMPERATURE = "measurements#temperature";
40     public static final String CHANNEL_PARTICULATE_MATTER_2_5 = "measurements#particulateMatter2dot5";
41     public static final String CHANNEL_PARTICULATE_MATTER_10 = "measurements#particulateMatter10";
42
43     public static final String CHANNEL_UV_INTENSITY_LR = "lastReported#uvIntensityLastReported";
44     public static final String CHANNEL_ILLUMINANCE_LR = "lastReported#illuminanceLastReported";
45     public static final String CHANNEL_PRESSURE_LR = "lastReported#pressureLastReported";
46     public static final String CHANNEL_HUMIDITY_LR = "lastReported#humidityLastReported";
47     public static final String CHANNEL_TEMPERATURE_LR = "lastReported#temperatureLastReported";
48     public static final String CHANNEL_PARTICULATE_MATTER_2_5_LR = "lastReported#particulateMatter2dot5LastReported";
49     public static final String CHANNEL_PARTICULATE_MATTER_10_LR = "lastReported#particulateMatter10LastReported";
50
51     // List of all Property names
52     public static final String PROPERTY_NAME = "Name";
53     public static final String PROPERTY_EXPOSURE = "Exposure";
54     public static final String PROPERTY_IMAGE_URL = "ImageUrl";
55     public static final String PROPERTY_MAP_URL = "MapUrl";
56
57     // Base URL of the API server
58     public static final String SENSEMAP_API_URL_BASE = "https://api.opensensemap.org";
59     public static final String SENSEMAP_IMAGE_URL_BASE = "https://opensensemap.org/userimages";
60     public static final String SENSEMAP_MAP_URL_BASE = "https://opensensemap.org";
61
62     // Minimum timeslice between API requests in seconds
63     public static final int MINIMUM_UPDATE_INTERVAL = 5 * 60;
64
65     // How long do we want each cache entry to be available?
66     public static final int CACHE_EXPIRY = 10 * 1000; // 10s
67
68     // 67108860 is an invalid reading which the API sends us nevertheless
69     public static final String INVALID_BRIGHTNESS = "67108860";
70 }