25.05.2020, 09:59
(This post was last modified: 25.05.2020, 10:13 by victor.back.)
(20.05.2020, 10:33)admin Wrote: <CR> is \r (carriage return):Thanks, changed that but no success.
Code:char = "\r*pow=on#\r"
(20.05.2020, 10:43)benanderson_475 Wrote:I tried with Tera term but didnt get it to work.(20.05.2020, 10:30)victor.back Wrote: HiI had an issue with benq once before, I think the solution was to replace <CR> with hex terminator 0D
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()
Try,
char = string.char(“0x0D”)..”*pow=off”..string.char(“0x0D”)
Can you test the command by sending it from a terminal from pc
Managed to send power on command from a Zennio SKX Open with the HEX code 0D2A706F773D6F6E230D.
Sorry but I didnt understand how to change the script with your solution. Im an beginner in LUA.