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.

Blinds Control - Multiple Socket Connections Per Script
#4
'\x0D\x0A' is the same as '\r\n' so extra '\r' is not needed
I think the problem might be with multiple connections which the gateway might not handle properly. Try sending two commands in the same connection:
Code:
sock = require("socket").tcp()
sock:settimeout(5)
res, err = sock:connect('192.168.1.200', 4999)

if res then
  sock:send('0113U\r\n')
  os.sleep(1)
  sock:send('0113S\r\n')
  sock:close()
end
Reply


Messages In This Thread
RE: Blinds Control - Multiple Socket Connections Per Script - by admin - 09.02.2020, 12:27

Forum Jump: