Changes due to different comports

This commit is contained in:
Julian Appel 2025-01-28 15:38:15 +01:00
parent 34fca8c2d0
commit 5514c8e08e
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ from influxdb_client import Point, WritePrecision
from influx import writeToDB from influx import writeToDB
stream = SmlStreamReader() 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/ttyUSB0', 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 energyCounter = 0 # Counter for values that should only be pushed to db every minute
@ -64,4 +64,4 @@ while True:
writeToDB(pointList) # Write pointlist to db writeToDB(pointList) # Write pointlist to db
time.sleep(10) # Sleep 10 seconds before reading the next value time.sleep(10) # Sleep 10 seconds before reading the next value

View File

@ -7,7 +7,7 @@ from influxdb_client import Point, WritePrecision
from influx import writeToDB from influx import writeToDB
stream = SmlStreamReader() 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/ttyUSB1', 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 energyCounter = 0 # Counter for values that should only be pushed to db every minute
@ -60,4 +60,4 @@ while True:
writeToDB(pointList) # Write pointlist to db writeToDB(pointList) # Write pointlist to db
time.sleep(10) # Sleep 10 seconds before reading the next value time.sleep(10) # Sleep 10 seconds before reading the next value