Skip to content
Innomesh Docs
Room Manager Since v2.23.0

Conditional Macro

By default, a macro’s event triggers combine as an OR: any single trigger matching its configured Value fires the macro immediately. The optional Condition field lets a macro require more than that. Set it to All to fire only when every event trigger is satisfied at the same time, or write a boolean expression to fire on any combination of the macro’s own triggers. This turns macros from “when this event happens, do X” into “when the room reaches this combined state, do X once”.

A macro with no Condition combines its triggers exactly as before, and everything on the Macros page still applies. This page only covers the new field.

The Condition Field

Condition sits inside a macro’s Triggers object, alongside Time Triggers and Event Triggers.

FieldTypeRequiredDescription
ConditionstringNoHow this macro’s event triggers combine. Defaults to Any.

It accepts three forms:

  • Any (the default, also used when the field is absent or blank): the macro fires whenever any single event trigger matches. This is the existing behaviour.
  • All: the macro fires only when every event trigger’s current state matches its configured Value at the same time.
  • A boolean expression over the macro’s own event trigger IDs, for example event.1 && (event.2 || event.3). Each ID counts as true while that trigger is satisfied.

How Conditions Are Evaluated

Any

Any macros react to individual events. Every matching event fires the macro, every time, with no memory of previous state. Trigger IDs are never read in this mode.

All

All conditions are evaluated against the last reported value of each event trigger’s property, not just the event that arrived. Whenever any watched property reports a new value, the whole condition is re-evaluated, and the macro fires when every trigger is satisfied.

Expressions

An expression combines the macro’s own event triggers with boolean operators, and evaluates the same way as All: against last reported values, firing once on the transition into true.

  • Operands are the ID values of the macro’s event triggers.
  • Operators, from lowest to highest precedence: || (or), && (and), ! (not), with parentheses for grouping.
  • Unknown propagates. !mic.live is not true just because the microphone state has never been seen, and a && b cannot fire while b is unknown, but a || b can fire on a alone.
❗ Important
Equality operators (==, !=) and quoted string values are not part of this grammar and are rejected. A macro expression never compares values directly: each trigger already defines its own Guid, Property, and Value, and the expression only combines whether those triggers are satisfied.

Examples

Shut Down When Both Displays Are Off

With All, this macro fires once when the second of the two displays reports power off, and re-arms if either display turns back on.

{
  "ID": "macro.displays.off",
  "Name": "Shut Down When Displays Off",
  "Triggers": {
    "Condition": "All",
    "Event Triggers": [
      { "ID": "display.1.off", "Guid": "dev.display.1", "Property": "PowerIsOn", "Value": "False" },
      { "ID": "display.2.off", "Guid": "dev.display.2", "Property": "PowerIsOn", "Value": "False" }
    ]
  },
  "Actions": [
    { "ID": "action.room.off", "Script": "room.SetRoomMode(\"Off\")" }
  ]
}

Room On With a Live Microphone

An expression combining a room state with DSP signal detection: fire when the room is powered on and either microphone channel has signal present.

{
  "ID": "macro.mic.live",
  "Name": "Speech Lighting On Live Microphone",
  "Triggers": {
    "Condition": "room.on && (mic.1.live || mic.2.live)",
    "Event Triggers": [
      { "ID": "room.on", "Guid": "room", "Property": "PowerIsOn", "Value": "True" },
      { "ID": "mic.1.live", "Guid": "dev.dsp.1", "Property": "FaderSignalPresent", "Key": "microphone.1", "Value": "True" },
      { "ID": "mic.2.live", "Guid": "dev.dsp.1", "Property": "FaderSignalPresent", "Key": "microphone.2", "Value": "True" }
    ]
  },
  "Actions": [
    { "ID": "action.lights.speech", "Script": "lighting.PresetRecall(\"preset.speech\")" }
  ]
}

Fall Back to Signage When the PC Is Deselected

Negation works too: fire when the room is on and the PC is not routed anywhere. Note that !pc.selected still requires the PC’s routing state to have been reported at least once; on a fresh start the macro waits until it has been.

{
  "ID": "macro.signage.fallback",
  "Name": "Signage Fallback",
  "Triggers": {
    "Condition": "room.on && !pc.selected",
    "Event Triggers": [
      { "ID": "room.on", "Guid": "room", "Property": "PowerIsOn", "Value": "True" },
      { "ID": "pc.selected", "Guid": "room", "Property": "SourceIsSelected", "Key": "source.pc", "Value": "True" }
    ]
  },
  "Actions": [
    { "ID": "action.select.signage", "Script": "room.SetSourceSelect(\"source.signage\", \"Main\")" }
  ]
}

Caveats and Tips

  • Check every trigger’s Guid, Property, and Key carefully. A trigger that can never report (a mistyped Guid or Property, or a Key that never matches) stays unknown forever. Under All, or wherever an expression needs it through && or !, it silently prevents the macro from ever firing; an || branch around it can still fire on its other side. Under Any, the same mistake only left one trigger inert. The Available States page lists the valid properties and keys.
  • Value matching is exact and case sensitive. Boolean states report their value as True or False, so use that capitalisation in trigger Value fields that feed a condition.
  • One firing per transition. If the condition is already satisfied, further confirming events do not re-fire the macro. Design conditions around the moment the room enters the state, not around individual events.
  • If you are unsure how to express an automation as a condition, contact your Account Manager.