-
-
Notifications
You must be signed in to change notification settings - Fork 15
Modules conditions
Psycho edited this page Nov 9, 2019
·
13 revisions
In the module install file you can specify conditions for it to start when Project Alice boots
This is an exemple install file, exposing all the possible conditions:
{
"name": "Disco",
"version": 1.0,
"author": "ProjectAlice",
"maintainers": ["Psycho"],
"desc": "Disco let's you set your Philips Hue bulbs into a disco mode",
"aliceMinVersion": 0.1,
"systemRequirements": [],
"pipRequirements": [],
"script": "postInstall.sh",
"conditions": {
"lang": [
"en",
"fr"
],
"module": [
{
"name": "PhilipsHue",
"url": "http://modules.projectalice.ch/PhilipsHue"
}
],
"online": true,
"asrArbitraryCapture": true,
"activeManager": ["TelemetryManager"],
"notModule": ["Netatmo"]
}
}
Our exemple here has all the possible conditions. All the conditions are optional, you don't need to implement them all! But keep in mind that if you don't implement the language condition, your module can be used by any language, so be ready to get some translators!
-
lang
: list. This defines what languages are supported by the module. If your Alice runs in another language, the module won't load -
module
: list[dict]. This defines if any other module is needed for this one to work. It can contain many modules. Modules are defined with their name and download url. If the required module is not found on your install, Alice will download it. If you have that module installed but set as inactive, the module won't load -
online
boolean. This define if the module requires connectivity. If set to True and you have configured your assistant as "stayCompletlyOffline" or if your raspberry pi is not connected, this module won't load -
asrArbitraryCapture
boolean. This define if the module requires an asr capable of returning the sentence even if the asr hasn't been trained for it -
activeManager
list. This defines the managers that must be active in order for this modules to be able to work. -
notModule
list. This defines what modules do conflict with this one and must not be active at the same time