This class is the main entry point for your app in the local home platform. Use the App class to register callback handlers for Intents and to listen for new events.

import App = smarthome.App;

const localHomeApp: App = new App("1.0.0");
localHomeApp
  .onIdentify(identifyHandler)
  .onExecute(executeHandler)
  .listen()
  .then(() => console.log("Ready"));

Index

Constructors

constructor

  • new App ( version string ) : App
  • Parameters

    • version: string

    Returns App

Methods

getDeviceManager

listen

  • listen ( ) : Promise < void >
  • listen is called by app when the app is ready to handle the intents.

    Returns Promise<void>

onExecute

  • onExecute ( handler ExecuteHandler ) : this
  • onExecute is called by app to attach the handler for EXECUTE intent.

    Parameters

    Returns this

onIdentify

  • onIdentify ( handler IdentifyHandler ) : this
  • onIdentify is called by app to attach the handler for IDENTIFY intent.

    Parameters

    Returns this

onReachableDevices

  • onReachableDevices ( handler ReachableDevicesHandler ) : this
  • onReachableDevices is called by app to attach the handler for REACHABLE_DEVICES intent.

    Parameters

    Returns this