To specifically answer @melih’s question about LUA in scenes, I think of:
I have a LUA start-up function to control my QMotion roller shades. Qmotion Blinds - #36 by wilme2 Then I reference that function in scenes. This code was for 2rd generation QMotion requiring a QConnect and an IP2SL, but I also have a 3rd generation blind with a direct IP call to a QSync.
Move a Foscam PTZ camera based on an Event. Adjust Foscam FI9826P camera position when one of the doors is opened - #2 by ceefin
- Access functions of devices that are not available via official integration or plug-in.
Re-sync all devices on a DSC alarm panel connected to Vera via Envisalink and the DSC plug-in. DSC Plugin Getting out of Sync with Alarm System state - #9 by wilme2
- Control anything IR/RS232 via a Global Cache IP2IR/IS2SL
Turn on my kitchen TV:
SendiTachCommand("192.168.0.125,4998,sendir,1:1,1,38000,1,1,172,172,22,64,22,64,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,64,22,64,22,21,22,21,22,21,22,21,22,21,22,64,22,21,22,21,22,64,22,64,22,21,22,21,22,64,22,21,22,64,22,64,22,21,22,21,22,64,22,64,22,21,22,1820,\r") -- Turn On Samsung TV in Kitchen
Via Startup LUA:
local IPAddress,Port, CommandtoSend = string.match(ParamString,"(%d+.%d+.%d+.%d+),(%d+),(.+)")
local socket = require("socket")
c = assert(socket.connect(IPAddress, Port))
local sres, serr = c:send(CommandtoSend)
print("Send:", sres, serr)
local data, rerr = c:receive(5)
print ("Receive:", data, rerr)