If I fill in 3 seconds, it works. Anything else wont work...
I couldn't find the problem.
Has anyone an idea??
This is the script:
Code: Select all
commandArray = {}
-- Alarm AAN
if (uservariables['alarmarm01'] == "1") or (uservariables['alarmarm02'] == "1") or (uservariables['alarmarm03'] == "1") then
print("Alarm Armed")
commandArray[#commandArray + 1]={['Variable:Alarmtssn1'] = tostring (1)} --Bepaald of alarm effectief aan staat
commandArray[#commandArray + 1]={['Alarm STATUS']='On AFTER 3'} --alarm aan AFTER in seconden
commandArray[#commandArray + 1]={['Alarmlicht']='On AFTER 10'} --Alarmlicht aan AFTER seconden
-- Alarm Uit
else
commandArray['Variable:Alarmtssn1'] = tostring (0)
print("Alarm Disarmed")
commandArray[#commandArray + 1]={['Alarm STATUS']='Off'} --Bepaald of alarm effectief uit staat
commandArray[#commandArray + 1]={['Alarmlicht']='Off'}
commandArray[#commandArray + 1]={['$Alarm toestand']='Off'}
end
return commandArray
Domoticz 3.9439
On a Synology NAS
Saved the scriped as Alarm_arm with dropbox selection "All"
Variables are strings
Swithes are on-off
Thanks in advance!!