Hi all
Here’s a strange one…
I am trying to control a Global Cache IP2IR device. I have written the Lua code to send an IR command to turn my Pioneer Amp on.
I pasted the code into the Apps/DevelopApps/Test Lua Code box and BINGO it works perfectly… the Pioneer Amp turns on.
But when I paste this same code into a scene Lua code (no other code present), it does not work.
any ideas anyone…? (thanks)
This code:
local socket = require(“socket”)
tcp = assert(socket.connect(“192.168.1.181”, 4998))
tcp:send(“sendir,1:3,1,39000,5,1,360,180,22,67,22,22,22,67,22,22,22,22,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,67,22,22,22,22,22,22,22,67,22,67,22,67,22,22,22,22,22,67,22,67,22,67,22,22,22,22,22,22,22,67,22,67,22,22,22,989,360,180,22,67,22,22,22,67,22,22,22,22,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,67,22,22,22,67,22,22,22,67,22,67,22,22,22,22,22,67,22,67,22,22,22,67,22,22,22,22,22,67,22,67,22,22,22,22,22,989\r”)
luup.sleep(100)
tcp:close()