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.

Control BenQ projector with RS232
#3
(20.05.2020, 10:30)victor.back Wrote: Hi 

I have some trouble to send control commands ON/OFF to a BenQ MS517H usin gfollowing event based script. 

Code:
require('serial')

device = '/dev/ttyUSB0'

port = serial.open(device, { baudrate = 9600, parity = 'none', stopbits = 1  })

-- get value of KNX object
value = event.getvalue()

if (value == true) then
  -- send power on command with returns to make them stick
  char = "<CR>*pow=on#<CR>" 
  port:write(char)
else
  -- send power off command
  char = "<CR>*pow=off#<CR>" 
  port:write(char)
end


-- close port
port:close()
I had an issue with benq once before, I think the solution was to replace <CR> with hex terminator 0D
Try,
char = string.char(“0x0D”)..”*pow=off”..string.char(“0x0D”)

Can you test the command by sending it from a terminal from pc
Reply


Messages In This Thread
RE: Control BenQ projector with RS232 - by benanderson_475 - 20.05.2020, 10:43

Forum Jump: