View on GitHub

Mount Kelvin Cloud API

A brief introduction to the Mount Kelvin 3.0 Cloud API

First, request siteGroupKey for your property. siteGroupKey is special key, which grants access to all sites within group.

Tools

The examples are illustrated using the following command-line tools:

Site group

Getting site group

To get the site group:

http get https://api.mountkelvin.com/v1/group/<siteGroupKey>

The response is the site group description including list of members sites.

Site group members

To list the member, do

http get https://api.mountkelvin.com/v1/group/<siteGroupKey> | jq '.members[]'

In following examples memberSiteId is an id of the target site.

Getting member site configuration

To get the single site configuration (a.k.a. site.json):

http get https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId>

The response is the site configuration.

Controlling individual devices

To list the devices in site.json, do

http get https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId> | jq '.devices[] | { id: .id, name: .name }'

Pick the device you want to control. Then, write a state for the device, such as

{
  "id": "<deviceId>",
  "state": {
    "on": true,
    "bri": 255
  }
}

and copy it into clipboard. Then

pbpaste | http post https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId>/applyDevice

Activating scenes

To list the scenes in site.json, do

http get https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId> | jq '.scenes[] | { id: .id, name: .name }'

Pick the scene you want to activate, then

echo '{ "id": "<sceneId>" }' | http post https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId>/applyScene

There is also two special scenes available allOn and allOff, they can be activated like normal scenes:

echo '{ "id": "allOff" }' | http post https://api.mountkelvin.com/v1/group/<siteGroupKey>/site/<memberSiteId>/applyScene