added device name as configuration
This commit is contained in:
3
main.py
3
main.py
@@ -6,9 +6,10 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
ntfy_token = os.environ['NTFY_Token']
|
||||
device_name = os.environ['device_name']
|
||||
shutdown_timer = 10
|
||||
|
||||
with serial.Serial('COM10', 115200, timeout=1) as ser:
|
||||
with serial.Serial(device_name, 115200, timeout=1) as ser:
|
||||
inverter_offline_counter = 0
|
||||
while True:
|
||||
if ser.readline().decode().strip() == "0":
|
||||
|
||||
Reference in New Issue
Block a user