Andea,
what follows is the current contents of file
module.json, located in the folder x
/opt/z-way-server/automation/
userModules
Code: Select all
{
"singleton": false,
"dependencies": [],
"category": "scheduling",
"author": "ilcato",
"homepage": "",
"icon": "",
"version": "1.0",
"maturity": "stable",
"repository": {
"type": "",
"source": ""
},
"defaults": {
"title": "Auto Off Smart",
"description": "Automatically turn of devices after N seconds only if the controlling sensor is off",
"timeout": 5,
"device": ""
},
"schema": {
"description": "Automatically turn of devices after N seconds only if the controlling sensor is off",
"type": "object",
"properties": {
"device": {
"field": "enum",
"datasource": "namespaces",
"enum": "namespaces:devices_switchBinary:deviceId,namespaces:devices_switchMultilevel:deviceId",
"required": true
},
"controllingDevice": {
"field": "enum",
"datasource": "namespaces",
"enum": "namespaces:devices_sensorBinary:deviceId",
"required": true
},
"timeout": {
"type": "number",
"required": true
}
},
"required": false
},
"options": {
"fields": {
"device": {
"label": "The device to be turned off after the timeout",
"datasource": "namespaces",
"field": "optionLabels",
"optionLabels": "namespaces:devices_switchBinary:deviceName,namespaces:devices_switchMultilevel:deviceName"
},
"controllingDevice": {
"label": "The binary sensor that control the device",
"datasource": "namespaces",
"field": "optionLabels",
"optionLabels": "namespaces:devices_sensorBinary:deviceName"
},
"timeout": {
"label": "Timeout in seconds"
}
}
}
}
Now in the dashboard I see the previous warning and the new one:
Code: Select all
[CORE] Can not load modules.json from userModules/AutoOffSmart/module.json: SyntaxError: Unexpected token “
Type: core
Timestamp: 17/05/15-14:31
Message:
Can not create vDev based on 2-0-48: TypeError: Cannot read property 'get' of undefined
Additional Note:
few minutes ago I changed battery to my Multisensor device!
Claudio
![Smile :)](./images/smilies/icon_e_smile.gif)