Water Leak Detector Getting Started

With the introduction of our Water Leak Detector we also are introducing Version 2 of our API that supports both our Lyric Round Thermostat and the new Lyric Wi-Fi Water Leak and Freeze Detector! Introduced into the API will be:

  • The ability to filter device results by device type (e.g., GET v2/devices/waterLeakDetector or GET v2/devices/thermostats)
  • Water Leak Detector temperature and humidity history readings
  • Notifications for a Water Leak Detector (e.g., high humidity, leak detected, etc)

Here are some general points on how the device works:

  • The device checks not only moisture, but temperature and humidity as well.
  • By default, the device will 'wake up' once a day to report daily temperature and humidity readings. The end user can change this to up to three times a day at the expense of battery life.
  • If the device does detect a leak or a reading that meets the user defined temperature or humidity alerts it will 'wake-up' and send an alert to our servers which are then reflected in the API and the user's Lyric App. Notifications are also sent via email if the user has configured that feature via the Lyric App.
  • The device includes a rope sensor that senses moisture away from the device. This can be extended by purchasing additional lengths of sensor rope.

How am I informed of alerts via the API?

Right now, polling is available right away. The polling frequency we allow differs based on your use case.

Example API Calls

As in V1 of the API, we still require an OAuth2 Bearer Token for all API calls

Getting a list of all locations for a user:

Request:

curl -H "Authorization: Bearer accessTokenHere" api.honeywell.com/v2/locations?apikey={apikey}

Response snippet:

[
  {
    "locationID": 22562,
    "name": "Office",
    "streetAddress": "1985 Douglas Drive North",
    "city": "Golden Valley",
    "state": "MN",
    "country": "Usa",
    "zipcode": "55422",
    "devices": [
      {
                "firmwareVer": "0.5.11A4",
                "waterPresent": false,
                "currentSensorReadings": {
                    "time": "2016-01-11T11:54:26",
                    "temperature": 13.8,
                    "humidity": 53
                },
                "currentAlarms": [
                    {
                        "type": "HighTemperature",
                        "created": "2016-01-09T20:30:52"
                    },
                    {
                        "type": "HighHumidity",
                        "created": "2016-01-09T20:04:55"
                    }
                ]....

Show all Water Leak Detectors for a location:

Request:

curl -H "Authorization: Bearer accessTokenHere" api.honeywell.com/v2/devices/waterLeakDetectors?apikey={apikey}&locationId={locationId}

Response snippet:

{
  "waterPresent": false,
  "currentSensorReadings": {
    "time": "0001-01-01T00:00:00",
    "temperature": 128.87,
    "humidity": 99.9
  },
  "currentAlarms": [
    {
      "type": "DeviceOffline",
      "created": "2015-11-02T05:23:13"
    }
  ],
  "lastCheckin": "2015-11-02T05:16:01",
  "lastDeviceSettingUpdatedOn": "0001-01-01T00:00:00",
  "batteryRemaining": 72,
  "isRegistered": true,
  "hasDeviceCheckedIn": true,
  "isDeviceOffline": true,
  "deviceOfflineTime": "2015-11-02T05:23:13",
  "firstFailedAttemptTime": "0001-01-01T00:00:00",
  "failedConnectionAttempts": 0,
  "wifiSignalStrength": -45,
  "time": "2015-11-02T23:11:03",
  "deviceClass": "LeakDetector",
  "deviceType": "Water Leak Detector",
  "deviceID": "c8dc222d-e64a-4984-8990-4a911722ac72".....

Show temperature and humidity sensor history:

Request:

curl -H "Authorization: Bearer accessTokenHere" api.honeywell.com/v2/devices/waterLeakDetectors/{deviceId}/history?apikey={apikey}&locationId={locationId}&startDate="2016-03-14"&endDate="2016-03-15"

Response snippet:

[
  {
    "time": "2016-03-14T19:44:14",
    "humidity": "44.8",
    "temperature": "20.44"
  },
  {
    "time": "2016-03-14T21:10:10",
    "humidity": "44.4",
    "temperature": "21.45"
  }