LUA On Action and Off Action tables?
Posted: Tuesday 07 February 2017 17:57
...Ok..
I understand the script name pattern and where to store them on the PI3 (/home/pi/dommoticz/scripts/lua)
I understand that:
script_device_whatever.lua run on ANY devicechange
script_time_whatever.lua run once a minute
script_variable_whatever.lua runs on ANY variable change
script_security_whatever.lua runs on ANY security event (...even if I did not yet well understood which are they)
but... what is I would need to:
Run a script ONLY on triggering a device ON/OFF (or a pushbutton)?
I assume I would use ON Action and OFF Action using prefix script:// but this doesn't work (error 512)... and by my [poor] understanding this would work only for windows and anyhow no tables (otherdevices, othersevices_lasupdate, devicechanged, uservariables) are passed to script.
So.. what shall I do in order to run just a script in case I trigger just one button in a specific state?
Wiki is not really clear about... it just specify to use script_device_ and trigger the correct otherdevices
thanks
ciao
M
I understand the script name pattern and where to store them on the PI3 (/home/pi/dommoticz/scripts/lua)
I understand that:
script_device_whatever.lua run on ANY devicechange
script_time_whatever.lua run once a minute
script_variable_whatever.lua runs on ANY variable change
script_security_whatever.lua runs on ANY security event (...even if I did not yet well understood which are they)
but... what is I would need to:
Run a script ONLY on triggering a device ON/OFF (or a pushbutton)?
I assume I would use ON Action and OFF Action using prefix script:// but this doesn't work (error 512)... and by my [poor] understanding this would work only for windows and anyhow no tables (otherdevices, othersevices_lasupdate, devicechanged, uservariables) are passed to script.
So.. what shall I do in order to run just a script in case I trigger just one button in a specific state?
Wiki is not really clear about... it just specify to use script_device_ and trigger the correct otherdevices
thanks
ciao
M