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.

Script to control an Epson projector via RS-232
Today I created a small script in a KNX object to turn my Epson projector on off via a serial link. 

-- device on the LogicMachine connected to the Epson projector
-- ttyUSB0 is typical for a USB RS-232C
-- tested with adapter based on FT232 or CP210x chip.
device = '/dev/ttyUSB0'
-- opens a serial port using the sugested values of Epson manual
port =, { 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 = "PWR ON\r\n"  
 -- send power off command
 char = "PWR OFF\r\n"  

-- close port

Forum Jump: