diff --git a/main.py b/main.py index db64c23..8a39804 100644 --- a/main.py +++ b/main.py @@ -26,11 +26,6 @@ LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest LED_INVERT = False # True to invert the signal (when using NPN transistor level shift) LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53 -global SOCKET_BIND_IP -SOCKET_BIND_IP = '192.168.190.173' -global SOCKET_BIND_PORT -SOCKET_BIND_PORT = 5760 - def debug_print(message: str): now = datetime.now() current_time = now.strftime("%H:%M:%S") @@ -96,6 +91,8 @@ def power_toggle(channel): debug_print('LED Power ON') def socket_listener(): + SOCKET_BIND_IP = '0.0.0.0' + SOCKET_BIND_PORT = 5760 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((SOCKET_BIND_IP, SOCKET_BIND_PORT)) s.listen()