From 169894dfc3380d4d96e5216fd1a4e6b8d82e21c5 Mon Sep 17 00:00:00 2001 From: Matthew Frost Date: Sun, 19 Nov 2023 01:12:57 +0100 Subject: [PATCH] test --- app/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views.py b/app/views.py index 9156654..3504925 100644 --- a/app/views.py +++ b/app/views.py @@ -47,6 +47,7 @@ def powerbar_control(powerbar, outlet, action): if action == 'on': # Telnet to powerbar and send command try: + print(f"Turning on powerbar {powerbar} outlet {outlet}") tn = telnetlib.Telnet(powerbars[powerbar]['host'], powerbars[powerbar]['port']) tn.write(f"on {outlet}\r\n".encode('ascii')) tn.close() @@ -59,6 +60,7 @@ def powerbar_control(powerbar, outlet, action): if action == 'off': # Telnet to powerbar and send command try: + print(f"Turning off powerbar {powerbar} outlet {outlet}") tn = telnetlib.Telnet(powerbars[powerbar]['host'], powerbars[powerbar]['port']) tn.write(f"off {outlet}\r\n".encode('ascii')) tn.close()