From 064a3d41349a6c8a559939866880fa6196455a0c Mon Sep 17 00:00:00 2001 From: Filtik <1388865+Filtik@users.noreply.github.com> Date: Sat, 23 Sep 2023 17:33:42 +0200 Subject: [PATCH] Update scanner.py Update broadcast for Windows system --- flux_led/scanner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flux_led/scanner.py b/flux_led/scanner.py index 911399d2..8db3c46c 100644 --- a/flux_led/scanner.py +++ b/flux_led/scanner.py @@ -5,6 +5,7 @@ import socket import sys import time +import platform from datetime import date from typing import Dict, List, Optional, Tuple, Union @@ -174,6 +175,8 @@ class BulbScanner: REBOOT_MESSAGE = b"AT+Z\r" ALL_MESSAGES = {DISCOVER_MESSAGE, VERSION_MESSAGE, REMOTE_ACCESS_MESSAGE} BROADCAST_ADDRESS = "" + if platform.system() == "Windows": + BROADCAST_ADDRESS = "255.255.255.255" def __init__(self) -> None: self._discoveries: Dict[str, FluxLEDDiscovery] = {}