-
-
Notifications
You must be signed in to change notification settings - Fork 15
Module events
maxbachmann edited this page Oct 9, 2019
·
3 revisions
When writing a module, there are several events you can override to react when something happens in the Project Alice ecosystem. Those events always start with "on", as per exemple onHotword
or onStop
!! If you override onStart you must call super().onStart
immediately and make your override return return self._SUPPORTED_INTENTS
!!
- def onHotword(siteId: str)
- def onSay(session: DialogSession)
- def onSayFinished(session: DialogSession)
- def onHotwordToggleOn(siteId: str)
- def onUserCancel(session: DialogSession)
- def onSessionTimeout(session: DialogSession)
- def onSessionError(session: DialogSession)
- def onSessionEnded(session: DialogSession)
- def onSessionStarted(session: DialogSession)
- def onSessionQueued(session: DialogSession)
- def onIntentNotRecognized(session: DialogSession)
- def onStartListening(session: DialogSession)
- def onCaptured(session: DialogSession)
- def onIntentParsed(session: DialogSession)
- def onBooted()
- def onModuleInstalled()
- def onModuleUpdated()
- def onSleep()
- def onWakeup()
- def onGoingBed()
- def onLeavingHome()
- def onReturningHome()
- def onEating()
- def onWatchingTV()
- def onCooking()
- def onMakeup()
- def onContextSensitiveDelete(sessionId: str)
- def onContextSensitiveEdit(sessionId: str)
- def onStop()
- def onFullMinute()
- def onFiveMinute()
- def onQuarterHour()
- def onFullHour()
- def onMessage(intent: str, session: DialogSession)
- def onCancel()
- def onASRCaptured(*args)
- def onWakeword()
- def onMotionDetected(*args)
- def onMotionStopped(*args)
- def onButtonPressed(*args)
- def onButtonReleased(*args)
- def onDeviceConnecting(*args)
- def onDeviceDisconnecting(*args)
- def onRaining(*args)
- def onWindy(*args)
- def onFreezing(deviceList: list)
- def onTemperatureAlert(deviceList: list)
- def onCO2Alert(deviceList: list)
- def onHumidityAlert(deviceList: list)
- def onNoiseAlert(deviceList: list)
- def onPressureAlert(deviceList: list)
- def onBroadcastingForNewDeviceStart(session: DialogSession)
- def onBroadcastingForNewDeviceStop(*args)
- def onSnipsAssistantDownloaded(*args)
- def onSnipsAssistantDownloadFailed(*args)
- def onAuthenticated(session: DialogSession, *args)
- def onAuthenticationFailed(session: DialogSession, *args)