Skip to main content

Events and commands

The events that move a Device (a Hub or a Module) between its statuses, and the commands a user can send. This page is a reference: for how the statuses fit together, with diagrams, see Device lifecycle.

  • An event is a fact: it already happened. "Device Paired" means the Device is now Paired.
  • A command is a request: it can be refused. "Pair Device" asks for a Device to be paired, and is refused if that isn't allowed.

A command that succeeds leads to an event. For example, the Pair Device command leads to Pairing Started, and later Device Paired or Pairing Failed.

Proposed names

All names on this page are (proposed): they aren't part of the Glossary yet, and may change before the API is built.

Events​

Grouped by the Device Status field they change. The Rules column points to the lifecycle rules the event follows.

Pairing Status​

See Pairing Status in the lifecycle.

EventChangesRaised byRules
Device DetectedPairing → UnpairedHub software (Module) or API (Hub)12, 13
Pairing StartedPairing → PairingAPI, after the Pair Device command3
Device PairedPairing → Paired; Connection starts at ConnectingHub software1, 2
Pairing FailedPairing → UnpairedHub software–
Device DismissedLeaves the lifecycleAPI, after the Dismiss Device command–
Device RemovedLeaves the lifecycleAPI, after the Remove Device command8

Connection Status​

See Connection Status in the lifecycle.

EventChangesRaised byRules
Device ConnectedConnection → ConnectedHub software or API–
Device Went StaleConnection → StaleStaleness Policy (Telemetry)6
Reading RecordedConnection Stale → ConnectedTelemetry6
Device DisconnectedConnection → DisconnectedAPI (link lost) or Hub software (Module unplugged)4, 5
Connection Timed OutConnection → DisconnectedAPI–
Reconnect StartedConnection → ConnectingHub software or API4

Fault​

See Fault in the lifecycle.

EventChangesRaised byRules
Fault Raised / Fault ClearedAdds or clears one Fault CodeHub software (the Device reports it)7, 11

Hub placement​

See Hub placement in the lifecycle.

EventChangesRaised byRules
Hub PlacedThe Hub's SpaceAPI, after the Place Hub command–

Commands​

CommandWho sends itRefused whenLeads toRules
Pair DeviceUserThe Device isn't Unpaired, or it's a Module whose Hub isn't PairedPairing Started3
Dismiss DeviceUserThe Device isn't UnpairedDevice Dismissed–
Remove DeviceUserThe Device isn't PairedDevice Removed8, 10
Place HubUserThe Hub isn't Paired, or the Space is in a Site the user doesn't ownHub Placed–

Only a Site's owner can send these commands for its Devices. Accounts the Site is shared with can only view it.