Page 1 of 1

Lua send setpoint causes script timeout

Posted: Sunday 03 July 2016 13:37
by Westcott
Hi,

I have a Lua 'time' script that times out when it sends a setpoint to a setpoint device.
All other device updates work correctly in this script.
If I comment out the setpoint update the script executes correctly.
I have other scripts that do update setpoints correctly.

From the log, note the (apparently) out-of-sequence entries -

2016-07-03 12:12:02.086 EventSystem: Sending SetPoint to device....
2016-07-03 12:12:11.493 Error: EventSystem: Warning!, lua script Cube has been running for more than 10 seconds
2016-07-03 12:12:02.087 (Max Cube) Thermostat (1062EA setpoint)
2016-07-03 12:12:11.818 EventSystem: Script event triggered: Cube

Re: Lua send setpoint causes script timeout

Posted: Monday 04 July 2016 17:33
by Westcott
ANSWER-

It seems this is a VIRTUAL setpoint issue.
'Real' ones (e.g. Zwave hardware) work OK
I have to use this -
commandArray['OpenURL'] = DOMOTICZSERVER .. '/json.htm?type=command&param=udevice&idx=' .. SETPOINTIDX .. '&nvalue=0&svalue=' .. SETPOINTVALUE

Re: Lua send setpoint causes script timeout

Posted: Wednesday 07 December 2016 21:54
by ld57
Hi!

Confirmed also with the latest beta: my virtual thermostat timeouts when I try to set it with something like

commandArray.UpdateDevice = "516|0|"..temp

Any way to fix this?
Cheers,
Ludo

Re: Lua send setpoint causes script timeout

Posted: Wednesday 07 December 2016 21:58
by ld57
Here is the error message:

EventSystem: Sending SetPoint to device....
Error: EventSystem: Warning!, lua script thermo_set has been running for more than 10 seconds
2016-12-07 21:57:00.175 (virt) Thermostat (therm)
EventSystem: Script event triggered: thermo_set

Re: Lua send setpoint causes script timeout

Posted: Wednesday 07 December 2016 22:04
by Westcott
Yes, it seems to be a known problem.
Try this instead -
commandArray['SetSetPoint:'..idx]=tostring(setpoint)