External sensors

Docs Documentation

External sensors

Let a door bell, a button box, a building system or a script tell your screens what just happened, and let a rule react within seconds.

Something outside Wunderframe often knows first: the front door bell rang, the queue is twelve people long, the fire panel went off, the hall is open. An external sensor is how that system tells your screens. You give it a name, it gets its own address and key, and any rule on a stage or a block can then react: when Front door fired in the last 2 minutes, show the welcome.

No collections, refs or field mapping to learn. You name the sensor, the outside system posts to it, and the rule picker lists it by name.

The sensor list

Your workspace keeps one list of sensors under Settings → External sensors. Each row shows the name, whether it is an event or a state, when it last fired (with a dot while it still counts as fresh), whether the newest reading came through the cloud or the local network, where it reaches, and the last characters of its key. Every rule picker, the Live board and the API read this same list, so a sensor means the same thing everywhere.

While a sensor holds, the Live board shows it on the stage tile and in the stage sheet, for example Front door · 12 s ago. It updates the moment a reading arrives.

Events and states

When you make a sensor, you choose what it tells:

  • That something happened (an event): a bell, a button, a goal. A firing counts for a few minutes (2 unless you change it), and rules ask fired in the last … minutes. You decide how many readings to keep.
  • What something reads now (a state): a queue length, open or closed, a room temperature. It keeps one reading, the newest, and rules ask reads a value or reads at least a number.

A sensor can carry readings, like length as a number or status as text. A state sensor needs at least one. Readings land in an ordinary collection under Data, so a Live list or a ticker can show them too.

Make a sensor

  1. Name it

    Open Settings → External sensors and press New sensor. Give it a name your team will recognize in a rule, like Front door or Queue, and choose what it tells.

  2. Add readings if it has any

    Use Add a reading for each value it sends, as text or a number. A bell needs none.

  3. Save the key

    Press Make the sensor. Its key is shown once, together with a ready-made curl line. Copy it into the system that will send readings, then press Done, I saved them.

Send a reading

A reading is one HTTPS request to the sensor's address, with its key. An empty body is a firing; a state sensor sends its values. The server stamps the time itself, and screens see the reading within a second or two.

A reading with the sensor's key
curl -X POST https://www.wunderframe.com/api/v1/sensors/queue/readings \
  -H "Authorization: Bearer wfv.<id>.<secret>" \
  -H "Content-Type: application/json" \
  -d '{"id":"rd_20261031_0001","values":{"length":12}}'

The answer is 202 with the time the server stored. Values are kept as text, and fields the sensor does not know are dropped. A sensor accepts up to 60 readings a minute. In the sensor's details, Send a test reading fires it from the app, so you can watch a rule react before any hardware is wired.

A system that already has a workspace API key can also send readings with it, as long as the key has the sensors scope. See the API reference.

Reading ids

Give each reading an id of 8 to 64 letters, digits, _ or -. If the same id arrives twice within 48 hours, it is stored once. That makes retries safe: a relay that is not sure its first try went through can simply send again. It also lets one reading travel both over the local network and through the cloud and still count once.

Signed webhooks

Some relays and webhook services can't set an Authorization header. For those, tick Also accept signed webhooks on the sensor. You get a webhook signing key, shown once. The sender then adds a Wf-Signature header, in the same style Stripe and GitHub use, and names the sensor with ?id= in the address (the details show the full address).

The signature header
Wf-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(signing key, t + "." + raw body)>

The time must be within 5 minutes of ours. Rotate key makes a new sensor key and a new signing key at once. The old ones stop working right away, and the new ones are shown once.

Where a sensor reaches

Under Where it reaches, a sensor reaches All screens of the workspace, or Only some stages, groups or screens: pick stages, stage groups and walls, or single screens. Rules on a screen outside its reach treat the sensor as quiet, so the lobby's door bell never changes the screens in Hall B.

Every reading is still stored and shows under Data, wherever it reaches. Reach only decides which screens' rules react.

Use it in a rule

In a stage's rules or a block's Rules tab, pick External sensor, then the sensor and what it should say: fired in the last … minutes, reads or reads at least. For blocks there are three ready-made rules: Show while a sensor fires, Hide while a sensor fires and Change the background while a sensor fires. In a preview, Fire a sensor in the Time & sensors bar tries it without a real reading. See Screens that change themselves.

Readings over the local network

When the door relay and the screens share a venue network, the relay can post a reading straight to a screen. The screen reacts at once, even while the venue's internet is down, and passes the reading to the cloud once it is back. The cloud stays the normal path; the local network is a shortcut and a backup.

  • Off until you switch it on, per sensor: Screens accept this sensor on the local network.
  • Readings only. A screen never takes content, settings, commands or files this way.
  • Local network only. A screen listens on its private addresses and refuses anything from outside them.
  • Signed per screen. Each screen has its own key for each sensor that reaches it, never the sensor's key. A request also carries a time and the reading id, so a copied request can't be played again.
  1. Switch it on

    Edit the sensor and tick Screens accept this sensor on the local network. Leave Pass it on to the other screens of a group on if the screens form a group or a wall.

  2. Find the screens

    The sensor's details list the screens it reaches with their addresses on the local network, and a signed curl example for one screen, with <KEY> where that screen's key goes.

  3. Let the sending system fetch its keys

    The system that sends readings asks GET /api/v1/sensors/<key>/endpoints with the sensor's key. The answer lists each screen's address and its local key, group leaders first. It keeps that answer and can work with the internet down.

A local reading, to one screen
POST http://<screen address>:47772/wf/v1/sensors/readings
Content-Type: application/json
X-WF-Kid: <the screen's kid>
X-WF-Timestamp: <unix milliseconds>
X-WF-Signature: v1=<hex HMAC-SHA256(screen key, canonical)>

{"sensor":"<sensor id>","id":"rd_20261031_0001","values":{"length":12}}

canonical = "wf-local:v1\nPOST\n/wf/v1/sensors/readings\n" + timestamp + "\n" + id + "\n" + hex(sha256(body))

The screen answers 202 when it took the reading, and a short JSON reason when it did not: not from the local network, unknown sensor, wrong key, a time more than 30 seconds off, a reading id it already saw, or too many readings at once.

Groups and walls. Send once, to the group's leader (listed first). The screen that took it passes it to the other screens of the group over the same local link they already use to stay in step, so the whole wall changes together. If the leader just changed, any screen of the group passes it on just the same.

Reset local keys (press it twice) gives every screen new local keys. The sending system then fetches the endpoints again. Rotating the sensor's key resets them too.

Wiring up something unusual, like a turnstile, a PLC or a scoreboard? Tell us at hello@maravillalabs.com. We're glad to help you get the first reading through.