SDK Guidelines

Using the Homey Apps SDK should be self-explanatory, yet some things might need some elaboration.

The Homey module

Every class and manager available resides in the Homey module. It should therefore be included in every file of your app.

'use strict';

const Homey = require('homey');

SDK Version

The current SDK version is 3, and you must define this in your /app.json.

Not doing so will result in your app falling back to SDK level 1, which is deprecated and won't be accepted in the App Store.

/app.json

{
  "id": "com.athom.example",
  "sdk": 2
}

Callbacks vs. Promises

In previous versions of the Apps SDK many manager methods supported both callbacks and Promises. In version 3 the support for callbacks has been removed from all places that previously supported both. You can reference the SDK API documentation to find the signature of all methods.