Hello guys,
I'm trying to integrate Dayton amp with the LM5 through RS232, I don't know what's wrong.
I have created a virtual point to send an on-off command to zone 1, but it didn't work.
in the bellow picture of the registers of the amp.
this is the script that i have used
require('serial')
device = '/dev/RS232'
port = serial.open(device, { baudrate = 9600, parity = 'none', databits = 8, 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 = "<01PR01\r"
port:write(char)
else
-- send power off command
char = "<01PR00\r"
port:write(char)
end
-- close port
port:close()
I'm trying to integrate Dayton amp with the LM5 through RS232, I don't know what's wrong.
I have created a virtual point to send an on-off command to zone 1, but it didn't work.
in the bellow picture of the registers of the amp.
this is the script that i have used
require('serial')
device = '/dev/RS232'
port = serial.open(device, { baudrate = 9600, parity = 'none', databits = 8, 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 = "<01PR01\r"
port:write(char)
else
-- send power off command
char = "<01PR00\r"
port:write(char)
end
-- close port
port:close()