New smartmeter
This commit is contained in:
@@ -17,7 +17,7 @@ ActiveRecord::Base.establish_connection(connection_details)
|
||||
def open_device
|
||||
begin
|
||||
# Open connection to serial port
|
||||
io_device = SerialPort.new("/dev/ttyUSB0", 9600, 7, 1, SerialPort::EVEN)
|
||||
io_device = SerialPort.new("/dev/ttyUSB0", 115200, 8, 1, SerialPort::NONE)
|
||||
# Make reading blocking
|
||||
io_device.read_timeout = 0
|
||||
rescue
|
||||
|
||||
Reference in New Issue
Block a user