]> git.basschouten.com Git - openhab-addons.git/blob
310e2b58fb2b6ff38c430cc6b6c1adbd41ee8822
[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.fmiweather.internal.client;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Request for weather observations
19  *
20  * @author Sami Salonen - Initial contribution
21  *
22  */
23 @NonNullByDefault
24 public class ObservationRequest extends Request {
25
26     public static final String STORED_QUERY_ID = "fmi::observations::weather::multipointcoverage";
27
28     // For description of variables, see http://opendata.fmi.fi/meta?observableProperty=observation
29     public static final String PARAM_TEMPERATURE = "t2m";
30     public static final String PARAM_HUMIDITY = "rh";
31     public static final String PARAM_WIND_DIRECTION = "wd_10min";
32     public static final String PARAM_WIND_SPEED = "ws_10min";
33     public static final String PARAM_WIND_GUST = "wg_10min";
34     public static final String PARAM_PRESSURE = "p_sea";
35     public static final String PARAM_PRECIPITATION_AMOUNT = "r_1h";
36     public static final String PARAM_SNOW_DEPTH = "snow_aws";
37     public static final String PARAM_VISIBILITY = "vis";
38     public static final String PARAM_CLOUDS = "n_man";
39     public static final String PARAM_PRESENT_WEATHER = "wawa";
40
41     public static final String[] PARAMETERS = new String[] { PARAM_TEMPERATURE, PARAM_HUMIDITY, PARAM_WIND_DIRECTION,
42             PARAM_WIND_SPEED, PARAM_WIND_GUST, PARAM_PRESSURE, PARAM_PRECIPITATION_AMOUNT, PARAM_SNOW_DEPTH,
43             PARAM_VISIBILITY, PARAM_CLOUDS, PARAM_PRESENT_WEATHER };
44
45     public ObservationRequest(QueryParameter location, long startEpoch, long endEpoch, long timestepMinutes) {
46         super(STORED_QUERY_ID, location, startEpoch, endEpoch, timestepMinutes, PARAMETERS);
47     }
48 }