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.fmiweather.internal.client;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Request for weather observations
20 * @author Sami Salonen - Initial contribution
24 public class ObservationRequest extends Request {
26 public static final String STORED_QUERY_ID = "fmi::observations::weather::multipointcoverage";
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";
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 };
45 public ObservationRequest(QueryParameter location, long startEpoch, long endEpoch, long timestepMinutes) {
46 super(STORED_QUERY_ID, location, startEpoch, endEpoch, timestepMinutes, PARAMETERS);