Kotlin/coroutines patterns for driving rate-limited IoT actuators from real-time producers: debounce controller, target quantization, bottom-up progress-bar rendering.
73
68%
Does it follow best practices?
Impact
95%
1.63xAverage score across 3 eval scenarios
Passed
No known issues
A Tessl plugin encoding the Kotlin/coroutines patterns for driving rate-limited IoT actuators from real-time producers — the kind of pipeline you build when a 30 fps camera feed needs to drive a cloud-throttled smart light.
| Kind | Name | Purpose |
|---|---|---|
| Skill | debounce-controller-kotlin | One-coroutine-per-device debounce controller. 0.2 s min-interval for LAN, 1.2 s for cloud APIs, 2-tick stability filter, send-latest semantics, Dispatchers.IO. |
| Skill | target-quantization-kotlin | Discretise float producer signals to Int so the stability filter can commit. Without this, noisy producers block every commit and the actuator stays dark. |
| Skill | render-progress-bar-kotlin | Bottom-up red→yellow→green segmented bar with the index-direction fork (top-indexed vs bottom-indexed hardware). |
| Rule | iot-actuator-patterns-kotlin-rules | Concise in-context reminder card. |
When a producer (face recognition pipeline, sensor stream, audio meter) needs to drive a rate-limited IoT actuator, three things go wrong at once:
0.0001 every frame → stability filter blocks every commit.This plugin codifies the fix for all three, plus the LAN-vs-cloud min-interval distinction agents commonly get wrong.
submit() is called but _apply() doesn't firekotlinx.coroutines with Dispatchers.IO (not Default — that's CPU-bound)tessl install jbaruch/iot-actuator-patterns-kotlinMIT — see LICENSE.