Ambient Weather API

Writing a simple Android Wear and Android App that pull data from the Ambient weather API.

I think the API is maintained by a single hero:
https://github.com/owise1 while the main company that actually sell the station seem almost unaware of its marketing potential.
Would be nice to have a station’s QRcode ready to be shared with people that don’t have an Ambient weather account instead of forcing the owner to dig into the ambientweather.net account’s profile (that is different from the ambientweather.com account… sigh).
That would make configuring my app super simple and I can see local business owner’s sharing their station as a promotional bonus (scan the QRCcode and you get local real time weather data).

https://ambientweather.docs.apiary.io/#reference/0/device-data/query-device-data?console=1

---------- List User's Devices
## List User's Devices [/v1/devices/{macAddress}{?apiKey,applicationKey}]

+ Parameters
  + macAddress (required) - device Mac Address
  + apiKey (required) - API Key for user account
  + applicationKey (required) - Application Key

---------- Get request
https://api.ambientweather.net/v1/devices?applicationKey????????????????????????????????????????????????????????????????&apiKey=????????????????????????????????????????????????????????????????

---------- Answer (JSON)
[
  {
    "macAddress": "??:??:??:??:??:??",
    "lastData": {
      "dateutc": 1550265900000,
      "winddir": 272,
      "windspeedmph": 2.2,
      "windgustmph": 2.2,
      "maxdailygust": 6.9,
      "tempf": 62.8,
      "hourlyrainin": 0,
      "dailyrainin": 0,
      "weeklyrainin": 0.91,
      "monthlyrainin": 0.91,
      "totalrainin": 29.24,
      "baromrelin": 29.58,
      "baromabsin": 29.12,
      "humidity": 69,
      "tempinf": 68.5,
      "humidityin": 41,
      "uv": 1,
      "solarradiation": 113.16,
      "feelsLike": 62.8,
      "dewPoint": 52.47,
      "lastRain": "2019-02-13T00:59:00.000Z",
      "date": "2019-02-15T21:25:00.000Z"
    },
    "info": {
      "location": "???? ????",
      "name": "???? ????"
    }
  }
]

----------------------------------------------
---------- Device Data
## Device Data [/v1/devices/{macAddress}{?apiKey,applicationKey,endDate,limit}]

+ Parameters
  + macAddress (required) - device Mac Address
  + apiKey (required) - API Key for user account
  + applicationKey (required) - Application Key
  + endDate (optional) - The most recent datetime. Results descend from there. If left blank, the most recent results will be returned.  Date format should be in milliseconds since the epoch or string representations outlined here: https://momentjs.com/docs/#/parsing/string/. Note: datetimes are stored in UTC.
  + limit (optional, number) - The maximum number of results to return (max: 288)
      + Default: 5
---------- Get request
https://api.ambientweather.net/v1/devices/??:??:??:??:??:???apiKey=????????????????????????????????????????????????????????????????&applicationKey=????????????????????????????????????????????????????????????????

---------- Answer (JSON)
[
  {
    "dateutc": 1550430300000,
    "winddir": 64,
    "windspeedmph": 0.4,
    "windgustmph": 1.1,
    "maxdailygust": 10.3,
    "tempf": 39.2,
    "hourlyrainin": 0,
    "dailyrainin": 0.01,
    "weeklyrainin": 0.01,
    "monthlyrainin": 1.66,
    "totalrainin": 29.99,
    "baromrelin": 29.82,
    "baromabsin": 29.35,
    "humidity": 85,
    "tempinf": 67.3,
    "humidityin": 40,
    "uv": 0,
    "solarradiation": 57.25,
    "feelsLike": 39.2,
    "dewPoint": 35.08,
    "lastRain": "2019-02-17T12:59:00.000Z",
    "date": "2019-02-17T19:05:00.000Z"
  },
  {
    "dateutc": 1550430000000,
    "winddir": 74,
    "windspeedmph": 0.9,
    "windgustmph": 2.2,
    "maxdailygust": 10.3,
    "tempf": 39.2,
    "hourlyrainin": 0,
    "dailyrainin": 0.01,
    "weeklyrainin": 0.01,
    "monthlyrainin": 1.66,
    "totalrainin": 29.99,
    "baromrelin": 29.81,
    "baromabsin": 29.34,
    "humidity": 85,
    "tempinf": 67.1,
    "humidityin": 40,
    "uv": 0,
    "solarradiation": 54.19,
    "feelsLike": 39.2,
    "dewPoint": 35.08,
    "lastRain": "2019-02-17T12:59:00.000Z",
    "date": "2019-02-17T19:00:00.000Z"
  },
  {
    "dateutc": 1550429400000,
    "winddir": 129,
    "windspeedmph": 2.2,
    "windgustmph": 3.4,
    "maxdailygust": 10.3,
    "tempf": 39.2,
    "hourlyrainin": 0,
    "dailyrainin": 0.01,
    "weeklyrainin": 0.01,
    "monthlyrainin": 1.66,
    "totalrainin": 29.99,
    "baromrelin": 29.8,
    "baromabsin": 29.34,
    "humidity": 85,
    "tempinf": 67.6,
    "humidityin": 40,
    "uv": 0,
    "solarradiation": 78.05,
    "feelsLike": 39.2,
    "dewPoint": 35.08,
    "lastRain": "2019-02-17T12:59:00.000Z",
    "date": "2019-02-17T18:50:00.000Z"
  },
  {
    "dateutc": 1550429100000,
    "winddir": 143,
    "windspeedmph": 4,
    "windgustmph": 5.8,
    "maxdailygust": 10.3,
    "tempf": 39.2,
    "hourlyrainin": 0,
    "dailyrainin": 0.01,
    "weeklyrainin": 0.01,
    "monthlyrainin": 1.66,
    "totalrainin": 29.99,
    "baromrelin": 29.81,
    "baromabsin": 29.34,
    "humidity": 84,
    "tempinf": 67.8,
    "humidityin": 40,
    "uv": 0,
    "solarradiation": 83.19,
    "feelsLike": 36.39,
    "dewPoint": 34.78,
    "lastRain": "2019-02-17T12:59:00.000Z",
    "date": "2019-02-17T18:45:00.000Z"
  },
  {
    "dateutc": 1550428800000,
    "winddir": 66,
    "windspeedmph": 1.6,
    "windgustmph": 2.2,
    "maxdailygust": 10.3,
    "tempf": 39,
    "hourlyrainin": 0,
    "dailyrainin": 0.01,
    "weeklyrainin": 0.01,
    "monthlyrainin": 1.66,
    "totalrainin": 29.99,
    "baromrelin": 29.8,
    "baromabsin": 29.34,
    "humidity": 85,
    "tempinf": 67.8,
    "humidityin": 40,
    "uv": 0,
    "solarradiation": 80.25,
    "feelsLike": 39,
    "dewPoint": 34.88,
    "lastRain": "2019-02-17T12:59:00.000Z",
    "date": "2019-02-17T18:40:00.000Z"
  }
]

Leave a Reply

Your email address will not be published. Required fields are marked *