Page 1 of 1

Script error when setting OFF TIMER

Posted: Fri Dec 04, 2015 3:43 pm
by mlinnen
I am using 4.6 and I am attempting to run a simple script that turns on a z-wave appliance module and then setting the OFF TIMER so that it turns off after a period of time. Here is the script:

Xmas Tree.Run Method.On


I know that 10 seconds is a silly time but I was just using that value to see if my script was working. The Xmas Tree turns on fine but after 10 seconds the tree does not turn off. In the logs I found the following error when the script runs:
Error RunScript - Length cannot be less than zero. Parameter name: length

If I move the SET PROPERTY command to the first line of the script it will run without causing the error and it will also set the OFF TIMER property to 10. Also if I just swap the 2 lines the Xmas Tree will turn on and then go out after 10 seconds so technically this achieves what I wanted the script to do anyway.

This works:
Xmas Tree.Run Method.On

So my question is why would I be getting a script runtime error if I call the SET PROPERTY last in the script?