From 3fae77d2eaad99bb39c8296e201f9845837dbe02 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 21:38:06 +0200 Subject: feat(accent): light IKEA TRADFRI colour bulbs in the accent udt-bulb fades every paired colour bulb to the wallpaper accent through the TRADFRI gateway's local CoAP API, over DTLS-PSK via libcoap's coap-client. --pair trades the gateway's security code for an identity of its own and records the colour bulbs in ~/.config/udt/tradfri.json. Takes udt-ledstrip's on and off. A bare run, as udt-accent starts it, skips bulbs that are off, since the gateway switches a bulb on for any colour change. Colour and brightness go in separate requests, colour first: combined, or with a colour sent during a brightness fade, the gateway drops part of it. Co-Authored-By: Claude Opus 5.5 --- bin/udt-accent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/udt-accent') diff --git a/bin/udt-accent b/bin/udt-accent index 2f9440d..70557d8 100755 --- a/bin/udt-accent +++ b/bin/udt-accent @@ -625,9 +625,9 @@ def main(image): # GRUB's background is a wallpaper snapshot. Detached for the same reason; # it only rebuilds and notifies, since the copy into /boot needs root. # The keyboard takes seconds per colour change, and is often not there. - # The LED strip waits up to 20 s for its address broadcast. Both read - # files written above. - for helper in ("udt-homepage", "udt-grub", "udt-keyboard", "udt-ledstrip"): + # The LED strip waits up to 20 s for its address broadcast, the bulbs + # up to 5 s per bulb for the gateway. All three read files written above. + for helper in ("udt-homepage", "udt-grub", "udt-keyboard", "udt-ledstrip", "udt-bulb"): subprocess.Popen([Path(__file__).resolve().parent / helper], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, start_new_session=True) -- cgit v1.2.3