There are several solutions. If you're not scared of a little soldering and/or manual work than I'd recommend giving espeasy a try. It takes care of a lot for you
If you're looking for a simple out of the box solution you could try the H801 controller. It's about $10 on aliexpress and can control quite a lot of leds. Additionally, it is reprogrammable with a tiny bit of soldering:
https://www.aliexpress.com/item/RGBWW-S ... 07408.html
The device is easy enough to control using a bit of Python:
Code: Select all
import time
import socket
import colorsys
# Only change the 192.168.0 part, the 255 is the broadcast address which is
# what we want
IP = '192.168.0.255'
PORT = 30977
# Light IDs (hint, the last few characters of the wifi name: HCX_<id>). Don't
# forget to add the 0x before
IDS = 0x235817,
# Wait for 10ms between setting colours
DELAY = 10
# Rainbow steps
N = 0xAFF
def set_color(r=0, g=0, b=0, w0=0, w1=0):
message = [0xFB, 0xEB, r, g, b, w0, w1]
for id_ in IDS:
# The mac is in reverse order
message.append(id_ >> 0)
message.append(id_ >> 8)
message.append(id_ >> 16)
message.append(0x00)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
# Convert to characters and cut the numbers to 0xFF
sock.sendto(''.join(chr(c & 0xFF) for c in message), (IP, PORT))
time.sleep(DELAY / 1000.)
r = g = b = 0
# I like rainbows
for i in range(N):
# Generate HSV colours
h, s, v = i * 1. / N, 1., 1.
# Convert HSV to RGB integers
r, g, b = [int(0xFF * c) for c in colorsys.hsv_to_rgb(h, s, v)]
# Set the colour
set_color(r, g, b)
# Turn the lights off again
set_color()