This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM Ambient with GC-WF2IR
#2
This example comes from our partners, we haven't tested it locally. I've modified it to provide error reporting which can be seen in Alerts tab.

Put this into Common functions:
Code:
function sendircmd(cmd, ip, port)
  local sock, res, err
  
  sock = require('socket').tcp()
  sock:settimeout(3)
  res, err = sock:connect(ip, port or 4998)
  
  if res then
    res, err = sock:send(cmd .. '\r')

    if res then
      res, err = sock:receive()
    else
      alert('send failed: ' .. tostring(err))  
    end
  else
    alert('connect failed: ' .. tostring(err))
  end

  sock:close()
  return res, err
end

This goes into event script, make sure to modify cmd and ip:
Code:
cmd = 'sendir,1:1,1,37650,1,1,341,171,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,21,21,64,21,64,21,21,21,64,21,64,21,64,21,64,21,64,21,64,21,21,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,64,21,64,21,64,21,21,21,64,21,64,21,64,21,1520,342,85,21,3765'
res, err = sendircmd(cmd, '192.168.1.1', 4998)
log(res, err)
Reply


Messages In This Thread
LM Ambient with GC-WF2IR - by s.prathmesh - 01.07.2016, 07:42
RE: LM Ambient with GC-WF2IR - by admin - 01.07.2016, 07:54
RE: LM Ambient with GC-WF2IR - by s.prathmesh - 01.07.2016, 08:54
RE: LM Ambient with GC-WF2IR - by admin - 01.07.2016, 08:57
RE: LM Ambient with GC-WF2IR - by s.prathmesh - 01.07.2016, 09:18
RE: LM Ambient with GC-WF2IR - by AEK - 01.07.2016, 09:50
RE: LM Ambient with GC-WF2IR - by admin - 01.07.2016, 10:02
RE: LM Ambient with GC-WF2IR - by admin - 01.07.2016, 11:03
RE: LM Ambient with GC-WF2IR - by s.prathmesh - 11.07.2016, 11:50
RE: LM Ambient with GC-WF2IR - by admin - 12.07.2016, 06:03
RE: LM Ambient with GC-WF2IR - by Anh Nguyen - 22.11.2017, 09:38
RE: LM Ambient with GC-WF2IR - by admin - 22.11.2017, 13:50
RE: LM Ambient with GC-WF2IR - by Anh Nguyen - 24.11.2017, 02:04
RE: LM Ambient with GC-WF2IR - by Mr.D - 01.12.2018, 12:17
RE: LM Ambient with GC-WF2IR - by Mr.D - 17.12.2018, 11:21
RE: LM Ambient with GC-WF2IR - by admin - 17.12.2018, 12:22
RE: LM Ambient with GC-WF2IR - by Mr.D - 17.12.2018, 12:25
RE: LM Ambient with GC-WF2IR - by admin - 17.12.2018, 12:27
RE: LM Ambient with GC-WF2IR - by Mr.D - 17.12.2018, 12:32
RE: LM Ambient with GC-WF2IR - by admin - 17.12.2018, 12:42
RE: LM Ambient with GC-WF2IR - by Mr.D - 03.01.2019, 23:00
RE: LM Ambient with GC-WF2IR - by Sumit - 30.01.2020, 06:29
RE: LM Ambient with GC-WF2IR - by admin - 30.01.2020, 08:05

Forum Jump: