New smartmeter

This commit is contained in:
2025-07-16 15:20:39 +02:00
parent abe9328460
commit 40d4956be3
7 changed files with 22 additions and 14 deletions

View File

@@ -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