Yes—two independent rules can attempt to send the same device command at overlapping times; whether both requests execute depends on the rules engine, command path and device behavior. When designing automation with the Kilo IoT Platform, treat conflict handling as an explicit design decision rather than assuming commands are automatically deduplicated, prioritized or executed in trigger order.
- A two rules same device command conflict needs explicit arbitration, not assumptions about which request arrives first.
- Identical commands can duplicate work; opposing commands can make the device alternate between states.
- Kilo supports rules-driven IoT automation; command delivery alone does not verify a physical outcome.
- Route competing requests through one decision point, then verify the resulting device state.
Can two rules trigger the same device command at the same time?
Yes, independent automation paths can request commands for the same device during overlapping execution windows. They don't need identical timestamps to interfere: a delayed request or retry can overlap with a newer decision.
Separate the requests from their effects. A rules engine evaluates conditions, an integration transports commands, and the device interprets them. Ordering or protection at one layer doesn't establish the behavior of the entire path.
| Situation | What the requests mean | Main risk | Recommended design |
|---|---|---|---|
| Identical state requests | Both rules request the same final state | Redundant traffic or repeated device processing | State comparison; best for avoiding unnecessary state-setting commands |
| Opposing state requests | One rule requests on; another requests off | Unintended final state or repeated switching | Shared arbitration; best for resolving competing objectives |
| Repeated action requests | Both rules request a pulse, toggle or cycle | The physical action happens again | Action-specific duplicate protection; best for non-repeatable operations |
| An older request arrives late | A previous decision reaches the device after conditions change | An obsolete action overrides the current intent | Freshness checks; best for delayed command paths |
These are general control-design patterns, not a claim that a particular arbitration feature is built into Kilo. Implement each protection only where the platform, integration or device provides the required behavior.
Why duplicate commands and conflicting commands need different fixes
Two requests to set an output off aren't equivalent to two requests to toggle it. Setting a state describes the destination; toggling describes a transition. Repeating the transition can undo the intended result.
This distinction is called idempotency: repeating an operation has the same intended effect as performing it once. A state-setting command can be idempotent at the application level, but its actual implementation still matters. A device might perform additional work whenever it receives that command.
Use explicit target states instead of toggles when the interface supports them. You'll have a clearer basis for comparing the requested state with the reported state and deciding whether another command is necessary.
Opposing requests need a different answer. If one rule wants an output on and another wants it off, duplicate suppression cannot decide which objective should win. You need a policy that resolves the disagreement before sending the command.
Why command conflicts vary between deployments
The same rule layout can behave differently when the transport or equipment changes. Review these factors before deciding how to prevent interference:
- Command meaning: Setting a target state, issuing a pulse and starting a cycle have different consequences when repeated.
- Execution overlap: A rule that hasn't finished can overlap with another evaluation, even if their triggers occurred separately.
- Transport behavior: Queuing, delivery delays and retries affect when requests reach the equipment.
- Device behavior: Firmware determines how received commands are interpreted and whether repeated requests cause additional actions.
- Feedback quality: A recent measured state supports a different decision from an old reading or a transport acknowledgment.
- Other command sources: Manual controls, schedules and external integrations also need a place in the authority policy.
A cooldown addresses repetition over time. A priority policy addresses competing intent. Neither substitutes for verifying what the equipment actually did.
How to prevent competing rules from controlling the same output
Give each controlled output one logical decision point. Multiple rules can identify conditions, but a shared decision should determine the permitted action before a command is issued.
This is an architecture recommendation, not a promise that moving branches into one visual rule automatically serializes execution. Concurrent runs can still read the same state and make conflicting decisions unless the implementation provides the necessary coordination.
- Collect requests. Identify every source that can request a change, including schedules, thresholds, manual controls and integrations.
- Resolve priority. Define which requests take precedence and the conditions under which that precedence ends.
- Check state. Compare the proposed action with sufficiently recent device feedback and any known pending request.
- Issue command. Send the supported command through the configured integration, using the coordination mechanism your implementation provides.
- Verify outcome. Evaluate device feedback or subsequent measurements and define what happens when confirmation doesn't arrive.

A shared decision point makes the policy easier to inspect, but it also becomes a dependency. Define what the system should do if that decision point is unavailable or its inputs are stale; don't let an undocumented default become the operating policy.
A ventilation example: occupancy demand versus a shutdown schedule
Illustrative scenario: an occupancy rule requests ventilation on while a schedule requests it off. Assume the installation has a compatible controller, supported commands and feedback that reports the relevant equipment state.
If both rules send commands directly, the result depends on the command path rather than a deliberate operating decision. The schedule can request off while occupancy still requests on. Sending the occupancy command again doesn't resolve that disagreement.
Instead, make the schedule and occupancy rule supply inputs to a shared policy. For this example, assume authorized occupancy overrides the ordinary shutdown schedule, while a maintenance inhibit blocks automatic requests. Those are example operating choices, not universal recommendations for ventilation control.
The policy evaluates occupancy, schedule, maintenance status and input freshness before selecting a target state. The configured command path then requests that state. A responsible facilities person receives an exception notification if the expected feedback doesn't arrive, provided that notification workflow has been configured.
Evidence of success is the appropriate device feedback or measurement—not merely a successful rule run. Keep equipment-specific safety controls with the system responsible for them; cloud automation doesn't replace protective interlocks.
What happens when both rules check the device state first?
A state check helps, but it doesn't by itself prevent a race condition. Both rule executions can read the same reported state before either request changes it, then both decide to send a command.
This is the difference between checking a condition and coordinating access. To prevent duplicate decisions, the read-and-decide operation needs appropriate coordination, such as a serialized controller or an atomic mechanism supported by the implementation.
A per-device lock is one possible engineering pattern, not an assumed platform feature. It needs ownership, release and failure handling. A lock that never releases blocks later commands; one that expires too early allows overlapping execution again.
For straightforward deployments, consolidating the decision policy can make this problem easier to reason about. For more complex integrations, involve the developer responsible for concurrency rather than treating another conditional branch as mutual exclusion.
Does the last command always win?
No. Last-command-wins is an explicit behavior that needs evidence from the complete command path, not a safe default assumption.
The last rule to trigger isn't necessarily the last request to arrive. A request can be delayed, rejected or retried, and the device can apply its own acceptance conditions. Even confirmed arrival order doesn't establish how long a requested state persists.
If your design intentionally uses last-write-wins behavior, define what “last” means: event creation, platform acceptance or device processing. Then establish how stale requests are identified and handled. Without that definition, the phrase hides the decision you need to make.
How should you test overlapping device commands?
Test the interaction, not just each rule in isolation. A rule can pass its own checks while still interfering with another automation that controls the same output.
Start with controlled inputs and isolated command effects. In Kilo's Rules Engine debugger, Execute performs the real operation for supported side-effect nodes and is selected initially; choose Skip or Mock deliberately when you don't intend to act on equipment. Debugging is not automatically a sandbox.
Build your test cases around the failures you need to distinguish:
- Both rules request the same state before feedback changes.
- Rules request opposing states during overlapping runs.
- An earlier request is delayed while a newer decision is made.
- A timeout occurs after the device has already acted.
- A manual request arrives while automation is active.
- Feedback is missing, stale or inconsistent with the requested state.
For each case, write down the intended decision before running the test. Capture the available rule-execution evidence, command status and device feedback separately; they answer different questions.
Restoring a previous rule version is also not a physical recovery procedure. In Kilo, restoration creates a new draft that must be built and deployed separately. It doesn't reverse a command already executed by equipment.
Where Kilo fits in a coordinated command workflow
Kilo fits integrators building IoT workflows that connect device data, configured automation and supported commands. The useful design question is how those capabilities form an understandable control path—not whether adding more rules makes the system more capable.
Use the platform's relevant device context, rules and alarms to organize the workflow, while keeping arbitration requirements explicit. Don't infer an automatic per-device lock, cross-rule priority system, duplicate-command filter or delivery-order guarantee from the existence of a rules engine.
Hardware remains a separate part of the design. Kilo Electronics is a separate online authorised dealer serving individual and business buyers sourcing compatible hardware; purchasing there isn't an additional platform requirement. Select equipment for its documented command interface and feedback, not merely because it shares a protocol name with your integration.
FAQ
Should I retry a device command if it times out?
A timeout doesn't prove the device failed to act. Check available feedback and command semantics before retrying, especially for pulses, toggles or actions that must not repeat.
Can a cooldown stop two rules from sending the same command?
A cooldown limits repetition but doesn't automatically coordinate independent rules. Separate cooldowns can both permit a request, and a shared cooldown still needs correctly coordinated updates.
Will hysteresis prevent conflicting device commands?
Hysteresis reduces switching around a threshold by separating activation and reset conditions. It doesn't resolve disagreement between unrelated rules, such as an occupancy policy and a schedule.
Should manual control always override automated rules?
Manual priority is an operating-policy decision, not a universal rule. Define who can override automation, which equipment protections remain active and how automatic control resumes.
Do automated Kilo rules wait for someone to approve every command?
Deliberately configured rules can execute commands autonomously. The built-in assistant's confirmation flow for direct device commands is separate from rule execution, and external MCP clients have their own approval behavior.
Does a delivered command prove the equipment changed state?
A delivered command doesn't prove a physical outcome. Verification depends on suitable device feedback or subsequent measurements where supported.
Can I use one global lock for all connected equipment?
A global lock coordinates unrelated equipment as well as competing requests, which can unnecessarily block independent work. Choose the coordination scope around the resource being controlled and any genuine shared dependencies.
Before adding another rule, define who owns the output
The most useful change is often a short command-ownership policy, not another automation branch. Record which component decides the target state, which requests it accepts, how conflicts are resolved and what feedback establishes completion.
Then test the uncomfortable case: the device acted, but confirmation never arrived. Your answer determines whether the next step is a state check, an operator investigation or another command. “Try again” is not a complete recovery policy for physical actions.
Related guides
Written by Tim Kravchunovsky



