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()