Index
Constructors
constructor
-
Parameters
-
version: string
Returns App
-
Methods
getDeviceManager
-
getDeviceManageris called by app to get the reference to the singleton DeviceManager object.Returns DeviceManager
getLogger
-
getLoggeris called by app to get the reference to the singleton CloudLogger object.Returns CloudLogger
listen
-
listenis called by app when the app is ready to handle the intents.Returns Promise<void>
on
-
onis 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
-
onExecuteis called by app to attach the handler for EXECUTE intent.Parameters
-
handler: ExecuteHandler
The handler that handles EXECUTE intent.
Returns this
-
onIdentify
-
onIdentifyis called by app to attach the handler for IDENTIFY intent.Parameters
-
handler: IdentifyHandler
The handler that handles IDENTIFY intent.
Returns this
-
onIndicate
-
onIndicateis called by app to attach the handler for INDICATE intent.Parameters
-
handler: IndicateHandler
The handler that handles INDICATE intent.
Returns this
-
onParseNotification
-
onParseNotificationis called by app to attach the handler for PARSE_NOTIFICATION intent.Parameters
-
handler: ParseNotificationHandler
The handler that handles PARSE_NOTIFICATION intent.
Returns this
-
onProvision
-
onProvisionis called by app to attach the handler for PROVISION intent.Parameters
-
handler: ProvisionHandler
The handler that handles PROVISION intent.
Returns this
-
onProxySelected
-
onProxySelectedis called by app to attach the handler for PROXY_SELECTED intent.Parameters
-
handler: ProxySelectedHandler
The handler that handles PROXY_SELECTED intent.
Returns this
-
onQuery
-
onQueryis called by app to attach the handler for QUERY intent.Parameters
-
handler: QueryHandler
The handler that handles QUERY intent.
Returns this
-
onReachableDevices
-
onReachableDevicesis called by app to attach the handler for REACHABLE_DEVICES intent.Parameters
-
handler: ReachableDevicesHandler
The handler that handles REACHABLE_DEVICES intent.
Returns this
-
onRegister
-
onRegisteris called by app to attach the handler for REGISTER intent.Parameters
-
handler: RegisterHandler
The handler that handles REGISTER intent.
Returns this
-
onUnprovision
-
onUnprovisionis 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"));