cannot create new scripts?
Posted: Friday 10 May 2019 12:22
Hi,
i am a happy dzvents user. But now i have a weird issue: Since a long time i created a new script and i noticed the script was not triggered. Some furhter investigation showed me the script file was not created. te reproduce the problem i tried with a sample script. So the steps
1. create new dzvents script (type device) with name 'Arnold' and the following code
2. enable the script (in my case: Set the button to 'Aan''
3. Save the script. I see the following log entries appear
4. if i push the button named 'test' nothing happens. (expected behaviour would be the logline 'Device test was changed'
5. i took a look at the filesystem level. And although there is a log entry (see step 3). the file Arnold.lua was not created:
Does anyone know what i am doing wrong?
(PS changing an existing script does work. Apparently dzVents cannot create new scripts for whatever reason)
i am a happy dzvents user. But now i have a weird issue: Since a long time i created a new script and i noticed the script was not triggered. Some furhter investigation showed me the script file was not created. te reproduce the problem i tried with a sample script. So the steps
1. create new dzvents script (type device) with name 'Arnold' and the following code
Code: Select all
return {
on = {
devices = {
'test'
}
},
execute = function(domoticz, device)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
end
}3. Save the script. I see the following log entries appear
Code: Select all
2019-05-10 12:13:39.651 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Appliances.lua
2019-05-10 12:13:39.652 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Rova.lua
2019-05-10 12:13:39.654 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Lights.lua
2019-05-10 12:13:39.656 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Ventilation.lua
2019-05-10 12:13:39.658 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Smoke.lua
2019-05-10 12:13:39.660 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Alarm.lua
2019-05-10 12:13:39.661 Status: dzVents: Write file: /home/domoticz/domoticz/scripts/dzVents/generated_scripts/Arnold.lua
5. i took a look at the filesystem level. And although there is a log entry (see step 3). the file Arnold.lua was not created:
Code: Select all
pi@pi:/home/domoticz/domoticz/scripts/dzVents/generated_scripts $ ls -Fla
totaal 72
drwxr-xr-x 2 pi pi 4096 aug 29 2017 ./
drwxr-xr-x 6 pi pi 4096 okt 8 2017 ../
-rw-r----- 1 domoticz domoticz 4559 mei 10 12:13 Alarm.lua
-rw-r----- 1 domoticz domoticz 11761 mei 10 12:13 Appliances.lua
-rw-r----- 1 domoticz domoticz 3925 mei 10 12:13 Energy.lua
-rw-r----- 1 domoticz domoticz 16081 mei 10 12:13 Lights.lua
-rw-r--r-- 1 pi pi 189 aug 29 2017 README.md
-rw-r----- 1 domoticz domoticz 3197 mei 10 12:13 Rova.lua
-rw-r----- 1 domoticz domoticz 980 mei 10 12:13 Smoke.lua
-rw-r----- 1 domoticz domoticz 12034 mei 10 12:13 Ventilation.lua
(PS changing an existing script does work. Apparently dzVents cannot create new scripts for whatever reason)