Index
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
getLogger
-
getLogger
is called by app to get the reference to the singleton CloudLogger object.Returns CloudLogger
listen
-
listen
is called by app when the app is ready to handle the intents.Returns Promise<void>
on
-
on
is called by app to attach the handler for generic events specified in Constants.EventTypeParameters
-
eventType: EventType
The generic event type the hanlers
-
handler: EventHandler
The handler that handles the intent.
Returns this
-
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
-
onIndicate
-
onIndicate
is called by app to attach the handler for INDICATE intent.Parameters
-
handler: IndicateHandler
The handler that handles INDICATE intent.
Returns this
-
onParseNotification
-
onParseNotification
is called by app to attach the handler for PARSE_NOTIFICATION intent.Parameters
-
handler: ParseNotificationHandler
The handler that handles PARSE_NOTIFICATION intent.
Returns this
-
onProvision
-
onProvision
is called by app to attach the handler for PROVISION intent.Parameters
-
handler: ProvisionHandler
The handler that handles PROVISION intent.
Returns this
-
onProxySelected
-
onProxySelected
is called by app to attach the handler for PROXY_SELECTED intent.Parameters
-
handler: ProxySelectedHandler
The handler that handles PROXY_SELECTED 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
-
onRegister
-
onRegister
is called by app to attach the handler for REGISTER intent.Parameters
-
handler: RegisterHandler
The handler that handles REGISTER intent.
Returns this
-
onUnprovision
-
onUnprovision
is called by app to attach the handler for UNPROVISION intent.Parameters
-
handler: UnprovisionHandler
The handler that handles UNPROVISION 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"));