Author Topic: How to get temp min with api.  (Read 413 times)

0 Members and 1 Guest are viewing this topic.

Offline jamiguel77

  • Member
  • *
  • Posts: 3
How to get temp min with api.
« on: March 29, 2020, 09:32:49 PM »
hi i try understand Json: (see the image same time, get the picture and json request).

not see 18.4 18.5 19.518.5 18.3 values (03/29/2020 - 7:00 PM)


{
    "credit": "Davis Instruments Corp.",
    "credit_URL": "http://www.davisnet.com",
    "disclaimer_url": "http://www.davisnet.com/about/terms.asp",
    "copyright_url": "http://www.davisnet.com/about/terms.asp",
    "privacy_policy_url": "http://www.davisnet.com/about/privacy.asp",
    "image": {
        "url": "http://www.weatherlink.com/images/Logo_Davis_reflxblu.jpg",
        "title": "Davis WeatherLink",
        "link": "http://www.weatherlink.com"
    },
    "suggested_pickup": "15 minutes after the hour",
    "suggested_pickup_period": "60",
    "dewpoint_c": "-13.3",
    "dewpoint_f": "8.0",
    "dewpoint_string": "8.0 F (-13.3 C)",
    "heat_index_c": "14.4",
    "heat_index_f": "58.0",
    "heat_index_string": "58.0 F (14.4 C)",
    "location": "Chih., Mexico",
    "latitude": "28.8383",
    "longitude": "-107.04882",
    "observation_time": "Last Updated on Mar 29 2020, 6:26 pm MST",
    "observation_time_rfc822": "Sun, 29 Mar 2020 18:26:30 -0700",
    "pressure_in": "29.166",
    "pressure_mb": "987.7",
    "pressure_string": "987.7 mb",
    "relative_humidity": "11",
    "station_id": "temperature",
    "temp_c": "17.7",
    "temp_f": "63.8",
    "temperature_string": "63.8 F (17.7 C)",
    "wind_degrees": "57",
    "wind_dir": "East-northeast",
    "wind_kt": "4.3",
    "wind_mph": "5.0",
    "windchill_c": "17.8",
    "windchill_f": "64.0",
    "windchill_string": "64.0 F (17.8 C)",
    "davis_current_observation": {
        "DID": "007 [ You are not allowed to view attachments ] DCA00F5DF",
        "station_name": "R189",
        "observation_age": 5,
        "dewpoint_day_high_f": "29",
        "dewpoint_day_high_time": "8:42am",
        "dewpoint_day_low_f": "-6",
        "dewpoint_day_low_time": "3:51pm",
        "dewpoint_month_high_f": "49",
        "dewpoint_month_low_f": "-10",
        "dewpoint_year_high_f": "49",
        "dewpoint_year_low_f": "-13",
        "et_day": "0.000",
        "et_month": "0.000",
        "et_year": "0.000",
        "heat_index_day_high_f": "70",
        "heat_index_day_high_time": "3:12pm",
        "heat_index_month_high_f": "78",
        "heat_index_year_high_f": "78",
        "pressure_day_high_in": "29.279",
        "pressure_day_high_time": "9:39am",
        "pressure_day_low_in": "29.106",
        "pressure_day_low_time": "4:47pm",
        "pressure_month_high_in": "29.650",
        "pressure_month_low_in": "28.903",
        "pressure_tendency_string": "Rising Slowly",
        "pressure_year_high_in": "29.827",
        "pressure_year_low_in": "28.888",
        "rain_day_in": "0.0000",
        "rain_month_in": "0.0866",
        "rain_rate_day_high_in_per_hr": "0.0000",
        "rain_rate_hour_high_in_per_hr": "0.0000",
        "rain_rate_in_per_hr": "0.0000",
        "rain_rate_month_high_in_per_hr": "1.0000",
        "rain_rate_year_high_in_per_hr": "1.0000",
        "rain_storm_in": "0.0000",
        "rain_year_in": "0.6063",
        "relative_humidity_day_high": "72",
        "relative_humidity_day_high_time": "4:02am",
        "relative_humidity_day_low": "4",
        "relative_humidity_day_low_time": "3:51pm",
        "relative_humidity_month_high": "94",
        "relative_humidity_month_low": "4",
        "relative_humidity_year_high": "96",
        "relative_humidity_year_low": "3",
        "relative_humidity_in": "17",
        "relative_humidity_in_day_high": "20",
        "relative_humidity_in_day_high_time": "8:08am",
        "relative_humidity_in_day_low": "16",
        "relative_humidity_in_day_low_time": "4:41pm",
        "relative_humidity_in_month_high": "44",
        "relative_humidity_in_month_low": "15",
        "relative_humidity_in_year_high": "47",
        "relative_humidity_in_year_low": "10",
        "relative_humidity_1": "1",
        "relative_humidity_1_day_high": "52",
        "relative_humidity_1_day_high_time": "6:31am",
        "relative_humidity_1_day_low": "1",
        "relative_humidity_1_day_low_time": "1:46pm",
        "relative_humidity_1_month_high": "89",
        "relative_humidity_1_month_low": "1",
        "relative_humidity_1_year_high": "91",
        "relative_humidity_1_year_low": "1",
        "solar_radiation_day_high": "0",
        "solar_radiation_day_high_time": "12:00am",
        "solar_radiation_month_high": "0",
        "solar_radiation_year_high": "0",
        "sunrise": "7:03am",
        "sunset": "7:28pm",
        "temp_day_high_f": "74.7",
        "temp_day_high_time": "3:29pm",
        "temp_day_low_f": "32.3",
        "temp_day_low_time": "1:48am",
        "temp_month_high_f": "82.0",
        "temp_month_low_f": "20.5",
        "temp_year_high_f": "82.0",
        "temp_year_low_f": "10.0",
        "temp_extra_1": "64.0",
        "temp_extra_1_day_high": "74.0",
        "temp_extra_1_day_high_time": "3:47pm",
        "temp_extra_1_day_low": "34.0",
        "temp_extra_1_day_low_time": "3:18am",
        "temp_extra_1_month_high": "82.0",
        "temp_extra_1_month_low": "21.0",
        "temp_extra_1_year_high": "82.0",
        "temp_extra_1_year_low": "13.0",
        "temp_in_day_high_f": "65.3",
        "temp_in_day_high_time": "6:30pm",
        "temp_in_day_low_f": "55.5",
        "temp_in_day_low_time": "8:33am",
        "temp_in_f": "65.2",
        "temp_in_month_high_f": "73.3",
        "temp_in_month_low_f": "43.4",
        "temp_in_year_high_f": "73.3",
        "temp_in_year_low_f": "39.3",
        "uv_index_day_high": "0.0",
        "uv_index_day_high_time": "12:00am",
        "uv_index_month_high": "0.0",
        "uv_index_year_high": "0.0",
        "wind_day_high_mph": "28.0",
        "wind_day_high_time": "4:02pm",
        "wind_month_high_mph": "51.0",
        "wind_ten_min_avg_mph": "7.0",
        "wind_ten_min_gust_mph": "11.0",
        "wind_year_high_mph": "51.0",
        "windchill_day_low_f": "27",
        "windchill_day_low_time": "1:49am",
        "windchill_month_low_f": "17",
        "windchill_year_low_f": "6"
    },
    "time_to_generate": "0.008154 seconds"
}


2Question how to get the history records?

Thanks

Online johnd

  • Forecaster
  • *****
  • Posts: 4852
    • www.weatherstations.co.uk
Re: How to get temp min with api.
« Reply #1 on: March 30, 2020, 05:03:02 AM »
1. Which upload device (eg logger) do you have? For Weatherlink Live (and Enviromonitor) you need to use the v2 API. For all other upload devices it's still the v1 API.

2. Whichever command you've used (you haven't said AFAICS) your JSON is returning the current weather readings, which will not be the same as the archive data - I think that's why the readings aren't quite what you expect. If you want to use the API then you'll need to spend some time understanding the different API commands and the difference between current and archive data. Some links are:

(v1) https://www.manula.com/manuals/pws/davis-kb/1/en/topic/wl-com-2-0-data-handling

(v2) https://weatherlink.github.io/v2-api

3. As far as I'm aware, there's currently no API command for downloading the monthly summary programmatically - you need to do this interactively.
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Offline jamiguel77

  • Member
  • *
  • Posts: 3
Re: How to get temp min with api.
« Reply #2 on: March 30, 2020, 12:17:11 PM »
hi thanks for answer, i use WLL

i try use v2 api:

https://api.weatherlink.com/v2/historic/72443?api-key=987654321&t=1562176956&start-timestamp=1561964400&end-timestamp=1562050800&api-signature=d40baf8649aaf83fae135e0b57db03ec78688b49fce96d815474f366957f2b39

i have: api-key, start-timestamp, end-timestamp   but signature not where can get?

Thanks

Online mcrossley

  • Forecaster
  • *****
  • Posts: 1140
    • Wilmslow Astro
Re: How to get temp min with api.
« Reply #3 on: March 30, 2020, 12:37:33 PM »
You have to calculate the signature yourself, it is unique to every request you make - https://weatherlink.github.io/v2-api/authentication
Mark