Changed comport to /dev/serial/by-id/... to avoid future problems with wrong allocations after restart

This commit is contained in:
Julian Appel 2025-01-28 15:51:03 +01:00
parent 5514c8e08e
commit 7ec3036281
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ from influxdb_client import Point, WritePrecision
from influx import writeToDB
stream = SmlStreamReader()
port = serial.Serial(port='/dev/ttyUSB0', baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
port = serial.Serial(port='/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0021-if00-port0', baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
energyCounter = 0 # Counter for values that should only be pushed to db every minute

View File

@ -7,7 +7,7 @@ from influxdb_client import Point, WritePrecision
from influx import writeToDB
stream = SmlStreamReader()
port = serial.Serial(port='/dev/ttyUSB1', baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
port = serial.Serial(port='/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0038-if00-port0', baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)
energyCounter = 0 # Counter for values that should only be pushed to db every minute