09.11.2018, 09:14
This is correct that I done in resident for reading:
Code:
require('serial')
port = serial.open('/dev/RS485-1', { baudrate = 57600, parity = 'none', duplex = 'half', databits = 8, stopbits = 1 })
port:flush()
grp.write('32/2/2', port:write(('get sauna val\r'), 'uint16'))
port:close()