Changed comport to /dev/serial/by-id/... to avoid future problems with wrong allocations after restart
This commit is contained in:
parent
5514c8e08e
commit
7ec3036281
@ -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/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
|
energyCounter = 0 # Counter for values that should only be pushed to db every minute
|
||||||
|
|
||||||
|
|||||||
@ -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/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
|
energyCounter = 0 # Counter for values that should only be pushed to db every minute
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user