|
|
|
@ -20,7 +20,7 @@ devices = {}
|
|
|
|
|
|
|
|
|
|
|
|
# Helper functions and callbacks
|
|
|
|
# Helper functions and callbacks
|
|
|
|
def log(msg, level="INFO"):
|
|
|
|
def log(msg, level="INFO"):
|
|
|
|
ts = datetime.now(timezone.utc).strftime("%d/%m/%Y %H:%M:%S")
|
|
|
|
ts = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
if level != "DEBUG" or ('debug' in config and config['debug']):
|
|
|
|
if level != "DEBUG" or ('debug' in config and config['debug']):
|
|
|
|
print(f"{ts} [{level}] {msg}")
|
|
|
|
print(f"{ts} [{level}] {msg}")
|
|
|
|
|
|
|
|
|
|
|
|
|