Page 1 of 1

Long time for UpdateDevice

Posted: Sunday 30 October 2016 22:08
by lzita
I need to change the value of the virtual device.
If you need to change a only single device then uses the syntax:

Code: Select all

commandArray['UpdateDevice'] = DevID..'|0|'..value
It's alright.

If it is necessary to change the value of multiple devices syntax used:

Code: Select all

commandArray[DevID1] = { ['UpdateDevice'] = DevID1 ..'|0|'..value1 }
commandArray[DevID2] = { ['UpdateDevice'] = DevID2 ..'|0|'..value2 }
In this case, however, the script is not properly completed and the log is dumped message:
Error: EventSystem: Warning!, lua script /usr/share/domoticz/scripts/lua/script_device_gettemp.lua has been running for more than 10 seconds

Where is my mistake?