Index
Constructors
Methods
Constructors
constructor
-
Parameters
-
version: string
Returns App
-
Methods
getDeviceManager
-
getDeviceManager
is called by app to get the reference to the singleton DeviceManager object.Returns DeviceManager
listen
-
listen
is called by app when the app is ready to handle the intents.Returns Promise<void>
onExecute
-
onExecute
is called by app to attach the handler for EXECUTE intent.Parameters
-
handler: ExecuteHandler
The handler that handles EXECUTE intent.
Returns this
-
onIdentify
-
onIdentify
is called by app to attach the handler for IDENTIFY intent.Parameters
-
handler: IdentifyHandler
The handler that handles IDENTIFY intent.
Returns this
-
onQuery
-
onQuery
is called by app to attach the handler for QUERY intent.Parameters
-
handler: QueryHandler
The handler that handles QUERY intent.
Returns this
-
onReachableDevices
-
onReachableDevices
is called by app to attach the handler for REACHABLE_DEVICES intent.Parameters
-
handler: ReachableDevicesHandler
The handler that handles REACHABLE_DEVICES intent.
Returns this
-
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"));