2 * Copyright (c) 2010-2023 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.sensebox.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
19 * The {@link SenseBoxBindingConstants} class defines common constants, which are
20 * used across the whole binding.
22 * @author Hakan Tandogan - Initial contribution
25 public class SenseBoxBindingConstants {
27 public static final String BINDING_ID = "sensebox";
29 // List of all Thing Type UIDs
30 public static final ThingTypeUID THING_TYPE_BOX = new ThingTypeUID(BINDING_ID, "box");
32 // List of all Channel ids
33 public static final String CHANNEL_LOCATION = "descriptors#location";
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";
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";
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";
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";
62 // Minimum timeslice between API requests in seconds
63 public static final int MINIMUM_UPDATE_INTERVAL = 5 * 60;
65 // How long do we want each cache entry to be available?
66 public static final int CACHE_EXPIRY = 10 * 1000; // 10s
68 // 67108860 is an invalid reading which the API sends us nevertheless
69 public static final String INVALID_BRIGHTNESS = "67108860";