Lua send setpoint causes script timeout

Moderator: leecollings

Post Reply
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Lua send setpoint causes script timeout

Post 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
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: Lua send setpoint causes script timeout

Post 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
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
ld57
Posts: 11
Joined: Sunday 31 July 2016 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Lua send setpoint causes script timeout

Post 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
Domoticz + RPI3B+ + Zwave devices + RFLink
My blog: https://drolez.com/blog/
ld57
Posts: 11
Joined: Sunday 31 July 2016 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Lua send setpoint causes script timeout

Post 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
Domoticz + RPI3B+ + Zwave devices + RFLink
My blog: https://drolez.com/blog/
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: Lua send setpoint causes script timeout

Post by Westcott »

Yes, it seems to be a known problem.
Try this instead -
commandArray['SetSetPoint:'..idx]=tostring(setpoint)
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest