Stop repeated webhook events from flickering a light

Status Light represents software state through a configured bridge to the physical device. If repeated webhook deliveries make the signal flicker or repeatedly restart an effect, inspect how the receiver handles duplicates. The appropriate software result may be no new hardware write at all. First confirm the actual device behaviour rather than assuming every repeated command is visually harmless.

Are the events duplicates or distinct updates?

Compare the provider's delivery identifier, event type and task reference. Similar payloads can represent separate events, while a redelivery can carry the same original identifier. GitHub's best practices describe its delivery header and note that a requested redelivery retains that identifier.

Use the semantics of your actual provider when choosing a deduplication key. A job name alone is too broad because it can group legitimate later runs together. Keep duplicate detection separate from the rule that decides whether a distinct event changes the current task state.

When should a delivery be considered handled?

Design the acknowledgement and processing records together. Marking an event complete before its work succeeds can make a retry disappear without repairing the failed update. Conversely, repeating every step after a partial failure can trigger unnecessary device actions.

Use a durable processing state appropriate to the receiver and its queue, with a clear route for retrying unfinished work. This is an integration design decision, not a feature supplied by the lamp. Keep the implementation simple enough to explain how it recovers after a worker restart.

Does the desired display state actually change?

Compare the newly computed state with the last confirmed or intended state, making that distinction explicit. If both are the same, the integration may be able to avoid another write. Do not suppress a needed recovery write merely because a previous unsuccessful attempt requested the same colour.

Check how the documented device control behaves when asked for its current state again. A repeated command might be inert or might restart an effect, depending on the implementation. Avoid relying on unverified flashing or animation capabilities when defining the display behaviour.

What test exposes the problem clearly?

Deliver one controlled event repeatedly, then introduce a failed device write followed by a retry. Confirm that the duplicate path avoids unwanted visual changes while the failure path still reaches the correct final state. Include a genuinely new event with a similar payload so deduplication does not hide real work.

Review the Status Light product details for the hardware context. Stable output requires deliberate retry and state-handling rules in the bridge, rather than a delay added solely to mask repeated updates.

Back to blog