Proof-of-concept tools for the UNI FAN SL-INF Wireless kit (SLV3 TX/RX dongles 0416:8040/8041): a Python scan/colour script, tinyuz helpers, a JavaScript tinyuz encoder, the SignalRGB plugin and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
676 B
Python
20 lines
676 B
Python
# Watch the fan's effect id via the RX dongle only (TX stays free for SignalRGB).
|
|
import os, sys, time
|
|
TOOLS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
|
|
sys.path.insert(0, TOOLS)
|
|
import lianli_poc as p
|
|
rx = p.Dongle(p.RX_ID, "RX")
|
|
try:
|
|
seen = []
|
|
end = time.time() + (float(sys.argv[1]) if len(sys.argv) > 1 else 10)
|
|
while time.time() < end:
|
|
for d in p.get_devices(rx):
|
|
e = d["effect"].hex()
|
|
if not seen or seen[-1] != e:
|
|
seen.append(e)
|
|
print(f"{time.strftime('%H:%M:%S')} effect {e}")
|
|
time.sleep(0.2)
|
|
print(f"{len(seen)} distinct effect ids")
|
|
finally:
|
|
rx.close()
|