Patterns for driving rate-limited IoT actuators from real-time producers: async debounced controller, target quantization for stability, and bottom-up progress-bar rendering.
96
96%
Does it follow best practices?
Impact
97%
1.25xAverage score across 9 eval scenarios
Passed
No known issues
Cloud-controlled IoT devices (Govee, LIFX, Zigbee-over-HTTP, many more) get hammered into the ground by real-time pipelines that emit 30 updates a second. This skill encodes the controller pattern that moves the I/O off the hot path and filters transient noise.
target. The controller thread reads.N ticks
(default N=2). Suppresses flicker from borderline classifier output.min_interval_sec (default 1.2s).0.4s. Fast enough to feel responsive, slow enough for the
stability filter to do meaningful work.scripts/debounce_controller.py. It gives you a ready-to-subclass controller._apply(target) method — everything else is generic.set_target(...) from any thread; it's cheap."off"), time.sleep(1.5), then stop(timeout=2.0).target-quantization skill in this plugin BEFORE picking your target type. The stability filter requires targets to be discrete; float targets will never commit.from scripts.debounce_controller import DebouncedDeviceController
class MyController(DebouncedDeviceController):
def _apply(self, target):
my_device_api.set_color(target)
ctrl = MyController(min_interval_sec=1.2, stability_ticks=2, tick_sec=0.4, name="lamp")
ctrl.set_target("red")
ctrl.set_target("blue") # supersedes red if throttle window still open
ctrl.set_target("off")
ctrl.stop(timeout=2.0)MIN_INTERVAL_SEC cloud API → 1.2s (default)
LAN device → 0.2s (can drop stability_ticks=1 if producer already filters)
STABILITY_TICKS 2 (default) → target must hold 2 consecutive ticks to commit
1 → responsive, no stability filtering
TICK_SEC 0.4s (default) → 2.5 Hz controllermin_interval_sec in 0.2s increments.stability_ticks is higher than the producer's natural hold time.target-quantization — discrete targets are a prerequisite for the stability filterrender-progress-bar — UI pattern often paired with a debounced actuatorface-recognition-persistence (producer-side persistence, composes with this actuator-side debounce)