Changes due to different comports
This commit is contained in:
+2
-2
@@ -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
|
||||||
|
|||||||
+2
-2
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user