Open mavsejko opened 2 months ago
from flux_led import WifiLedBulb import time
def control_device(ip): try: bulb = WifiLedBulb(ip) bulb.refreshState()
print(f"Turning on device at {ip}")
bulb.turnOn()
time.sleep(5)
print(f"Turning off device at {ip}")
bulb.turnOff()
print(f"Successfully controlled the device at {ip}")
except Exception as e:
print(f"Failed to control device at {ip}: {e}")
if name == "main": device_ip = '192.168.31.193' control_device(device_ip)
для реализации проекта понадобится
блок питания 220/12
реле с катушкой на 12 вольт постоянного тока
пускатель магнитный на 220 вольт (для управления циркуляркой)
Device from the manufacturer DoHome failed to connect