MQTT integrations

Presenter 1.2.6 and later: The separate Connections → Integrations view and Connection URLs control described below apply from this version. The existing protocol, permissions and licence requirements still apply.

Build an external service that follows Presenter, controls slides with explicit permission, or exchanges messages on your own topics. Persistent credentials have a one-time password and narrowly chosen permissions.

Local credentials require a paid Presenter Own, Flex or eligible legacy licence, including Presenter through Complete. They stay on that computer and do not require a cloud account. SundayAssist Cloud requires an active Complete subscription, sign-in, organisation membership and an owner or administrator role. An unpaid pilot does not qualify. If a Complete renewal payment fails, existing cloud credentials keep working for up to 14 days, but new cloud credentials cannot be created. If the Complete period ends without renewal, cloud access stops within 3 days.

Create credentials

  1. Open Connections → Integrations and choose Local or SundayAssist Cloud.
  2. Choose Create credentials and name the service. Enable View slides from this Presenter, Control this Presenter, or both; each adds its required reserved topics automatically. Read Presenter events is a separate monitoring permission. Open Custom topics (optional) only when you also need your own publish/subscribe topics; enter one per line and leave unused directions empty.
  3. Save the password immediately in the service’s secret store. Copy connection details includes it. The password is shown once and cannot be recovered later.
  4. Use a separate credential for each service. In Presenter, each credential permits up to 20 publish/subscribe permissions in total, including automatically added Presenter topics. Publishing and subscribing to the same topic count separately. Viewing and control together use 5 permissions, leaving 15 for custom topics; Read Presenter events uses 1 additional permission. Up to 20 credentials may be active per local installation, or per account and organisation in the cloud.

Connect to the right broker

Manage local and cloud credentials in Connections → Integrations. These choices select the broker used by your external service; they do not change the phone connection. Local integrations use the local broker. Cloud clients can exchange messages on their own topics independently of Presenter. To read Presenter events, view slides or send commands through the cloud, keep Presenter running and select Connections → Phone remote → Anywhere. If another mode is active, the cloud credentials panel links to Phone remote so you can change it explicitly.

Use MQTT 3.1.1 or 5. Copy the actual local address and bound ports shown by Presenter; the usual TCP port is 1883 and WebSocket port 9883, with fallback ports when busy. The local connection is unencrypted: keep it on a trusted network and never forward these ports to the internet. Cloud TLS uses port 8883; secure WebSocket uses port 443 and path /mqtt. Keep certificate verification enabled. Every simultaneous connection needs a unique client ID beginning with the assigned prefix.

In Connections → Integrations, open Connection URLs to copy the TCP and WebSocket addresses for the selected broker. The one-time credential result and Copy connection details include both addresses. Use mqtt:// or ws:// for the local broker and mqtts:// or wss:// for SundayAssist Cloud; the local broker does not provide TLS.

Local:
  mqtt://<presenter-lan-ip>:1883
  ws://<presenter-lan-ip>:9883/mqtt
Complete cloud:
  mqtts://mqtt.sundayassist.com:8883
  wss://mqtt.sundayassist.com/mqtt
username: <generated-username>
password: <shown-once-password>
clientId: <assigned-client-id-prefix>external-1

Choose custom topics

Publish permissions name exact topics. Subscribe permissions allow an exact topic or a final /# below a literal namespace, such as church/lyrics/#. The + wildcard, a bare #, empty levels, whitespace and $ are rejected. Your first namespace cannot be sundayassist, regardless of letter case. Explicit event-read, slide-view and Presenter-control permissions are the reserved exceptions.

Local permissions apply to that Presenter installation. Cloud topics are isolated within the organisation: use the same topic on both clients, without adding an organisation prefix. People in the same organisation with overlapping topic grants can exchange messages. Integration credentials cannot pair Remote, access its private deck/state protocol, or use AI, relay or Presenter-link. Only the explicit control permission grants the documented command topic; the viewing permission grants its preview-request topic. Other SundayAssist-owned publishing stays blocked. WorshipAssist musician features, sessions, catalogues, chords and invitations remain separate and are never authorised by these permissions. Custom publishing permits QoS 0 or 1, no retained flag and payloads up to 1 MiB.

Read Presenter events

In SundayAssist Cloud, Presenter sends this snapshot, including cue and section titles, only while a currently verified integration in the selected organisation can read this Presenter’s events. The integration may belong to another organisation member. Slide-view or control permission also includes reading the current event state for its chosen Presenter. A bare events root without /# does not subscribe to its descendants. Local events and lyrics reception keep their existing behaviour.

Presenter checks this permission at startup and normally every 30 seconds, including when Connections is closed. Changes on another device can take up to 60 seconds to stop new snapshots; a failed check cannot extend that time. After permission returns, Presenter sends the current state again even if the slide has not changed. On withdrawal, Presenter attempts to remove its retained snapshot only while the same connection and cloud authority are still valid. Cleanup cannot be guaranteed offline, after sign-out or after that authority is lost. This does not promise immediate removal from every broker or connected client.

Enable Read Presenter events and subscribe to sundayassist/integrations/v1/events/#, or narrow it to sundayassist/integrations/v1/events/<presenterId>/state. Presenter publishes a retained QoS 1 JSON snapshot with the following public contract. Titles are included; lyrics, notes, file paths, screenshots and account details are excluded. The cue or section may be null.

{
  "schemaVersion": 1,
  "eventId": "boot-id:42",
  "presenterId": "opaque-installation-id",
  "runId": "boot-id",
  "sequence": 42,
  "occurredAt": "2026-10-27T12:00:00Z",
  "type": "presenter.state",
  "state": {
    "presenting": true,
    "blanked": false,
    "phase": "active",
    "cue": {"id": "opaque-occurrence", "type": "lyrics", "title": "Welcome", "index": 0},
    "section": {"id": "opaque-section", "title": "Gathering", "index": 0},
    "position": {"subIndex": 0, "page": 0}
  }
}

Treat eventId as the deduplication key and order messages by sequence within the same runId. A Presenter restart creates a new run. Reconnecting may replay the same event. Cue and section IDs identify opaque occurrences; editing or reordering the deck can change them. Indices are zero-based; subIndex can be -1 for a default slide.

Changes are coalesced for up to 1 second, with a fresh snapshot normally every 15 seconds even if nothing changes. Read occurredAt and the MQTT retained indicator before acting. A retained snapshot can outlive a running Presenter and is not proof that it is online. This is the latest known state, not a complete event log or upcoming rundown.

Build your own slide viewer

Enable View slides from this Presenter for an external viewer app. It targets one installation and adds subscribe access to sundayassist/integrations/v1/viewer/<presenterId>/state plus its exact event-state topic, and publish access only to sundayassist/integrations/v1/viewer/<presenterId>/request. Viewing does not grant presentation commands; select both permissions if the same app needs viewing and control.

Read a fresh event state and request the current content with its runId. Send the following request every 10 seconds while viewing is wanted. A request activates a 30-second viewer lease only on the transport that received it; unused viewing does not continuously upload content to the cloud. Requests must be fresh and non-retained, just like commands. Stop requests when the viewer is closed.

client.publish(
  `sundayassist/integrations/v1/viewer/${presenterId}/request`,
  JSON.stringify({
    schemaVersion: 1,
    requestId: crypto.randomUUID(),
    runId: latestState.runId,
    issuedAtUnixMs: Date.now()
  }),
  { qos: 0, retain: false }
);

Presenter sends non-retained presenter.viewer snapshots, at most once per second, with a normal 15-second refresh and 45-second expiry. Reject expired data and older sequence values in the same runId; clear the preview after expiry or restart. The envelope is at most 512 KiB, with no chunks; supported image previews have a longest edge of at most 960 pixels.

{
  "schemaVersion": 1,
  "presenterId": "opaque-installation-id",
  "runId": "boot-id",
  "sequence": 7,
  "occurredAt": "2026-10-27T12:00:00Z",
  "expiresAt": "2026-10-27T12:00:45Z",
  "type": "presenter.viewer",
  "view": {"kind": "text", "text": "Current slide text"}
}

view.kind is black, blank, text, image or unsupported. Text contains only the currently projected lyrics stanza, Bible passage or live-text cue, with optional secondaryText and reference; it excludes chords. Images use imageMime (image/jpeg) and imageBase64 for the current image, PDF page or supported PowerPoint preview. reason is an unsupported-kind code. This is a current-content preview, not pixel-identical styling, screen capture, live video or audio. Video, audio, website, audience, QR/invitation and WorshipAssist cues are unsupported. Decks, notes, paths, URLs, pairing tokens and WorshipAssist data are not included.

Control this Presenter

Enable Control this Presenter only for a service you trust to operate the live presentation. It is off by default and targets this installation’s presenterId. Presenter automatically grants publish access to sundayassist/integrations/v1/commands/<presenterId>/control and subscribe access to sundayassist/integrations/v1/commands/<presenterId>/result plus its exact state topic. It grants no private Remote commands. To change the target or permissions, revoke the credential and create another.

Read a fresh state first and use its current runId. Publish a JSON command with a new UUID requestId, issuedAtUnixMs from the current Unix time in milliseconds, and schemaVersion: 1. The payload must be at most 4 KiB, have only the documented fields, and use QoS 0 or 1 with retain: false. Presenter rejects commands older than 10 seconds, more than 2 seconds in the future, from an earlier run, or beyond its rate/queue limits. It never executes a duplicate requestId again during its 30-second deduplication window; it may replay the previous result. Keep clocks synchronised; never automatically retry an uncertain command.

const message = {
  schemaVersion: 1,
  requestId: crypto.randomUUID(),
  runId: latestState.runId,
  issuedAtUnixMs: Date.now(),
  cmd: "advance"
};
client.publish(
  `sundayassist/integrations/v1/commands/${presenterId}/control`,
  JSON.stringify(message),
  { qos: 1, retain: false }
);

Supported cmd values are present, stop, advance, back, nextItem, prevItem, setBlank, goto, setPage and setStanza. setBlank requires blanked: true or blanked: false and is not a toggle. goto requires zero-based deckIndex and may include zero-based subIndex. setPage requires one-based page; setStanza requires zero-based stanzaIndex. Other commands take no extra fields.

Match results by requestId, runId and cmd. A result has type: "presenter.command.result", schemaVersion, presenterId, requestId, runId, occurredAt, cmd, status and code. status: "executed" with code: "ok" means the command handler returned; the later state snapshot is authoritative for what is displayed. status: "rejected" supplies a reason code. Broker PUBACK is not Presenter confirmation. Results are not retained; other authorised controllers for the same target may also receive them. A timeout means the outcome is unknown: check Presenter before trying again.

Try the Node.js slide control pad

Download the working example or open the interactive preview. With Node.js 22 or later, try Previous, Next, Start, Stop and Blank/Show output against simulated slides without a broker or licence:

unzip mqtt-showcase.zip
cd mqtt-showcase
npm ci
npm run demo

For real control, create credentials with Control this Presenter. Copy .env.example to .env and fill the generated broker URL, username, password, client-ID prefix and required PRESENTER_ID installation UUID. Run npm start and open http://127.0.0.1:4188. The example never chooses a Presenter automatically. Credentials stay in Node; the browser receives projected state over Server-Sent Events and sends button requests to the local Node server. It disables controls without fresh state, waits up to 8 seconds for a matching Presenter result, and never retries automatically. The card updates only from observed state. Keep .env private. The sample binds to loopback and is a local development server, not a shared hosted service.

For Node-RED, connect an MQTT in node to the copied broker address. Enter the generated username, password and a unique client ID with the assigned prefix; enable certificate-verified TLS for cloud. Set the event topic above and QoS 1, then connect JSON → debug. Read msg.payload.state.cue.title, check msg.payload.occurredAt, and deduplicate msg.payload.eventId before triggering an action. See the official MQTT.js reference and Node-RED MQTT cookbook.

In .env, choose only the permissions you granted; the Node server never silently adds a viewer or control topic:

ModeENABLE_CONTROLENABLE_VIEWER
Viewer onlyfalsetrue
Controller onlytruefalse
Bothtruetrue

The default example is controller-only. Enable the viewing option in Presenter and set ENABLE_VIEWER=true for a current-content preview; set ENABLE_CONTROL=false for a viewer without controls. Show slide preview demonstrates this with simulated content in the static preview. Viewing requests, projected fields and expiry are handled by Node; MQTT secrets remain server-side.

Receive live text

For local live text, give the external service publish access to church/lyrics/slide. In Connections → Phone remote → Same Wi-Fi, set Lyrics topic to church/lyrics/slide. Add Live streaming lyrics from the library to your deck and present that cue. Publish plain UTF-8 text, not a JSON wrapper, from the service to the local broker.

For Complete cloud live text, create a separate credential in the same organisation with only subscribe access to church/lyrics/slide. Choose Own server in Presenter, enter wss://mqtt.sundayassist.com/mqtt plus those credentials and the same Lyrics topic, then save and test. The local phone connection remains available. Selecting Own server uses this manual connection instead of automatic Anywhere; integration credentials do not provide cloud Remote access.

Replace, revoke and handle interruptions

Local and cloud credentials, including their control permission, survive Presenter restarts and updates with the same username and password. Presenter stores a password-verification hash; keep the once-shown secret in your service. A restart changes runId, not the credentials: reconnect, read a fresh state and use that new runId for commands. These are MQTT credentials, separate from a SundayAssist account session or JWT.

Replace password invalidates the old connection details and shows new ones once; update every client using that credential. Revoke permanently disables it. Local credentials persist across Presenter restarts; passwords have no scheduled expiry. Paid access and permissions remain enforced. You can still list and revoke credentials after paid access ends.

Cloud eligibility and active connections are checked about every 30 seconds. Revocation is not instantaneous; a policy-service interruption can delay disconnection by a few minutes. Cloud clients must reconnect at least hourly using the same current password. Enable automatic reconnect and resubscription. QoS 1 can duplicate messages; network loss, maintenance and failover can interrupt delivery. Make side effects safe to repeat and keep prepared local content available. TLS protects the network connection, not end-to-end message content.

Changing a credential’s target or permissions requires revoking it and creating another; password replacement keeps those choices.