dzVents global variables
Posted: Sunday 26 November 2017 11:35
Hi,
my lua script had some IP adresses as local variables, f.e.
On dzVents, within the execute function, it also works fine. Now i´d like to set them as global variables, as they are not changed and used often. Seems they are recognized as floating numbers, I found no way to get 'em to work the same way as in the execute function.
my lua script had some IP adresses as local variables, f.e.
Code: Select all
local IPR1 = {'192.168.178.44', '192.168.178.49', '192.168.178.50', '192.168.178.48'}
PORT = '55443'
for n, IP in pairs(IPR1) do
runcommandoff = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",4,1,\"500,1,16711680,1, 900000,7,0,0, 900000,2,1700,1, 900000,2,1700,100 \"]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."&";; os.execute(runcommandoff);