[Solved] My first system
Re: [Solved] My first system
Thanks Andrea for your contribution.
If I have not misunderstood, your script performs almost the same function as the 2 LogicalRules that I implemented, but does so with a different tool.
Because I'm ignorant in this field, how I could use the files that you posted with your attachment?
Claudio
If I have not misunderstood, your script performs almost the same function as the 2 LogicalRules that I implemented, but does so with a different tool.
Because I'm ignorant in this field, how I could use the files that you posted with your attachment?
Claudio
Re: [Solved] My first system
1. Put the unzipped folder with the 2 files within the userModules folder of the z-way server (default is: /opt/z-way-server/automation/userModules)
2. Stop the z-way server (sudo /etc/init.d/z-way-server stop)
3. Start the z-way server (sudo /etc/init.d/z-way-server start)
4. Look for a new automation module through the preferences panel within the HA UI
Andrea
2. Stop the z-way server (sudo /etc/init.d/z-way-server stop)
3. Start the z-way server (sudo /etc/init.d/z-way-server start)
4. Look for a new automation module through the preferences panel within the HA UI
Andrea
Re: [Solved] My first system
Andrea,
I followed your instructions:
- I started my RPI2,
- I used the file manager to copy the folder AutoOffSmart containing the two files index.js and module.json in /opt/z-way-server/automation/userModules,
- I stopped and restarted the server Z-way with the commands:
- I opened the HA interface UI and did not find the new module in the path Preferences > Automation, as expected.
Where did I go wrong?
Claudio
I followed your instructions:
- I started my RPI2,
- I used the file manager to copy the folder AutoOffSmart containing the two files index.js and module.json in /opt/z-way-server/automation/userModules,
- I stopped and restarted the server Z-way with the commands:
Code: Select all
sudo /etc/init.d/z-way-server stop
sudo /etc/init.d/z-way-server start
Where did I go wrong?
Claudio
Re: [Solved] My first system
try to put it in modules instead of userModules.
Re: [Solved] My first system
Andrea,
I tried to move the folder AUtoOffSmart from /opt/z-way-server/automation/userModules to /opt/z-way-server/automation/modules without achieving the desired result. I then moved it back to the initial position.
This surprised me because a few days ago I complained that the old warnings were not removed due to a bug in the system and I was sure to find them into the dashborad along with any new ones. Surprisingly there was only one, this:
I told myself that it is not true that the old warning are not removed.
Can a Z-way expert clarify this point?
I am not savvy enough to figure out what to do, but I sense that the warning was generated as a result of the move of the folder in the folder AutoOffSmart userModules and may be due to a syntax error in the file module.json.
Comments?
Claudio
I tried to move the folder AUtoOffSmart from /opt/z-way-server/automation/userModules to /opt/z-way-server/automation/modules without achieving the desired result. I then moved it back to the initial position.
This surprised me because a few days ago I complained that the old warnings were not removed due to a bug in the system and I was sure to find them into the dashborad along with any new ones. Surprisingly there was only one, this:
Code: Select all
Type: core
Timestamp: 16/05/15-14:13
Message:
Can not load modules.json from userModules/AutoOffSmart/module.json: SyntaxError: Unexpected token “
Can a Z-way expert clarify this point?
I am not savvy enough to figure out what to do, but I sense that the warning was generated as a result of the move of the folder in the folder AutoOffSmart userModules and may be due to a syntax error in the file module.json.
Comments?
Claudio
Re: [Solved] My first system
There was an error in the file. Try with the one attached.
Andrea
Andrea
- Attachments
-
- AutoOffSmart.zip
- (3.69 KiB) Downloaded 261 times
Re: [Solved] My first system
Andrea,
I inserted the new folder with the file you modified in /opt/z-way-server/automation/userModules and I got the following warning:
while the previous one was not present.
I noticed in the timestamp 20:17 while my pc was reporting 21:17.
Claudio
I inserted the new folder with the file you modified in /opt/z-way-server/automation/userModules and I got the following warning:
Code: Select all
Type: core
Timestamp: 16/05/15-20:17
Message:
Can not load modules.json from userModules/AutoOffSmart/module.json: SyntaxError: Unexpected token “
I noticed in the timestamp 20:17 while my pc was reporting 21:17.
Claudio
Re: [Solved] My first system
Be sure to download the latest zip file. The error you receive is exactly the one I corrected: there was a “ character instead of ".
It works for me.
Andrea
It works for me.
Andrea
Re: [Solved] My first system
Andea,
what follows is the current contents of file module.json, located in the folder x
/opt/z-way-server/automation/userModules
Now in the dashboard I see the previous warning and the new one:
Additional Note: few minutes ago I changed battery to my Multisensor device!
Claudio
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"
}
}
}
}
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
Claudio
Re: [Solved] My first system
Andrea,
here attached the content of the final part of the file /var/log/z-way-server.log of my raspberry (since this morning I started and restarted a couple of times the Raspi).
The warnings have not changed (are the three previously reported)
ecco in allegato il contenuto dellla parte finale del file /var/log/z-way-server.log del raspberry (da quando questa mattina ho avviato e riavviato un paio di volte il Raspi).
Gli warnings non sono cambiati (sono i 3 già riportati)
Claudio
here attached the content of the final part of the file /var/log/z-way-server.log of my raspberry (since this morning I started and restarted a couple of times the Raspi).
The warnings have not changed (are the three previously reported)
ecco in allegato il contenuto dellla parte finale del file /var/log/z-way-server.log del raspberry (da quando questa mattina ho avviato e riavviato un paio di volte il Raspi).
Gli warnings non sono cambiati (sono i 3 già riportati)
Claudio
- Attachments
-
- z-way-server.log.zip
- (23.29 KiB) Downloaded 253 times