Skip to main content

Server-side scenarios

A server-side scenario is stored and executed by AirNgin services rather than by firmware. Devices can trigger an existing server scenario and, where enabled, receive or interact with scenario state.

Difference from in-device scenarios

  • In-device scenarios are stored and executed locally by firmware.
  • Server-side scenarios are authoritative in the AirNgin cloud and the Device only requests actions or receives state.

Run a server scenario from a Device

Publish through:

projectCode/RunServerScenarioFromDevice

The payload identifies the server scenario to run according to the Project's authoritative scenario metadata.

A common use case is mapping a physical event—such as a wall button—to a server scenario selected in Dedicated Setting HTML.

Scenario state interaction

General Data is used for server scenario interaction rather than inventing dedicated MQTT topics for every sub-capability.

Publish requests through:

projectCode/SendGeneralData

Receive responses/updates through:

projectCode/ReceiveGeneralData/{deviceSerial}

The logical tag identifies the requested scenario action/state operation.

Server remains authoritative

Scenario status can include states such as:

  • Enable
  • Disable
  • SystemDisabled
  • PaymentDisabled

Firmware must not bypass server restrictions. If the server reports a scenario as disabled, the Device must not silently simulate the cloud scenario locally.

Access to server scenarios is permission-controlled. Selecting a scenario in a settings page does not itself grant authorization.