Hello,
I have a code which logs every char received be serial port:
What I need is to find specific string in received data. For example "OUT1ON" or "OUT1OFF" and based on it control KNX object. Maybe someone can help me with that?
I have a code which logs every char received be serial port:
Code:
if not port then
require('serial')
port = serial.open('/dev/RS232', { baudrate = 9600, parity = 'none', duplex = 'full' })
port:flush()
end
-- port ready
if port then
char = port:read(1, 1)
if char then
alert(char)
end
end
What I need is to find specific string in received data. For example "OUT1ON" or "OUT1OFF" and based on it control KNX object. Maybe someone can help me with that?