Connecting lights and signs
What lights them
Each light or sign watches some machines, some areas (an area takes in the areas under it, and every machine in them), or the whole plant, and shows the events you pick from the modules your plant has. Worst wins.
| Event | Module | Shows |
|---|---|---|
| Emergency work order | Maintenance | Red on its machine while a critical work order is open |
| Work order open | Maintenance | Amber on its machine |
| PM coming due | Maintenance | Amber the day before and the day of; flashing once it's late |
| Work request waiting | Maintenance | Blue on its machine until it's triaged |
| Change in progress | Change management | Blue, in its area, from approval until it's implemented |
| Nonconformance open | Quality | Amber, in its area |
| Action overdue | Action tracking | Flashing amber, in its owner's area |
| Incident recorded | Safety & Training | Amber, in its area, for a day |
With nothing open, a machine is green and the plant is all clear. With the FloorCheck add-on, lights can watch lines too: checks due or late, holds, failed critical checks and stops.
Two ways to connect
| How | Use it when | What you set up |
|---|---|---|
| It checks an address | The light or display can fetch a web address every few seconds. Works from inside any plant network: the light only reaches out. | Copy its status address into the device. Ask every 5 to 10 seconds. |
| PlantOps sends to it | The light, or a small gateway in front of it, has an address reachable from the internet. | Its address, and the message it expects. Sent on each change and every 5 minutes. |
PlantOps never sends to an address inside a private network (10.x, 192.168.x, 172.16–31.x and the like), and it doesn't follow redirects. For a light inside the plant, use its status address.
What it's sent
The status address answers with this JSON, and it's what PlantOps sends when you leave the message empty:
{
"light": "Filler 2 beacon",
"color": "RED",
"flashing": false,
"message": "Filler 2 · Emergency: WO-1042 Nozzle 4 dripping",
"messages": ["Filler 2 · Emergency: WO-1042 Nozzle 4 dripping"],
"items": [{"message": "Filler 2 · Emergency: WO-1042 Nozzle 4 dripping", "color": "RED", "flashing": false}],
"watched": [{"name": "Filler 2", "color": "RED", "flashing": false, "message": "Filler 2 · Emergency: WO-1042 Nozzle 4 dripping"}],
"daysWithoutLostTime": 214,
"countsLostTime": true,
"at": "2026-11-13T16:20:00Z"
}
| Field | What it is |
|---|---|
color | RED, AMBER, BLUE, GREEN or OFF: the worst of what it watches. |
flashing | True for a late PM or an overdue action. |
message | The words for the worst one, one line. |
items | Everything needing attention, worst first, each in its own colour: what a sign scrolls. |
watched | Each machine (or line) on its own, for a receiver with one lamp per machine. |
daysWithoutLostTime | Days since the last lost-time injury (an injury with days away), for a counter; null with none recorded. |
countsLostTime | True when the plant records injuries (Safety & Training is on). |
A display that can't read JSON can ask for ?format=text instead: two lines, the colour and then the words.
Fitting your light
Most lights and signs expect their own format. Write the message (and, for a light set by its address, the address) with placeholders, and PlantOps fills them in, escaped for where they land: URL-encoded in the address, escaped for JSON, a form or XML in the body by its content type.
| Placeholder | Becomes |
|---|---|
{color} / {colour} | RED / red |
{flashing} | true or false |
{message} / {MESSAGE} | The words for the worst one / in capitals, for LED signs |
{messages} / {MESSAGES} | Everything needing attention, separated by ◆ / in capitals |
{days} | Days since the last lost-time injury, for a counter |
{light} / {at} | This light's name / when, as 2026-11-13T16:20:00Z |
A beacon set by its address, sent with GET:
https://gateway.example.com/beacon/filler-2?color={colour}&blink={flashing}
A counter at the door that takes JSON, sent with POST:
{"value": "{days}", "label": "days without a lost-time injury"}
Placeholders can go in the path or the query, never the host name.
Checking it came from PlantOps
Every request PlantOps sends carries three headers, and each light has its own signing secret (shown with the light):
X-Signal-Light: the light's id.X-Signal-Timestamp: seconds since 1970.X-Signal-Signature:sha256=and the hex HMAC-SHA256, with the secret, of the timestamp, a dot, the path and query as requested, a dot, and the body (empty for GET).
A receiver that can check it should, and should refuse a timestamp more than a few minutes old. A light that can't simply ignores the headers.
# Python
import hashlib, hmac, time
def from_plantops(secret, headers, path_and_query, body):
ts = headers["X-Signal-Timestamp"]
if abs(time.time() - int(ts)) > 300:
return False
signed = f"{ts}.{path_and_query}.{body}".encode()
want = "sha256=" + hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(want, headers["X-Signal-Signature"])
// Node
const crypto = require("crypto");
function fromPlantOps(secret, headers, pathAndQuery, body) {
const ts = headers["x-signal-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const want = "sha256=" + crypto.createHmac("sha256", secret).update(`${ts}.${pathAndQuery}.${body}`).digest("hex");
const got = headers["x-signal-signature"] || "";
return want.length === got.length && crypto.timingSafeEqual(Buffer.from(want), Buffer.from(got));
}
Screens and the safety counter
Every light can also be shown on any screen: Open on a screen beside it opens a page with no sign-in, the long secret in the address being the key. The whole screen is the light's colour with its words big enough to read across the floor. Add ?view=sign for a scrolling LED-style sign on a TV, or ?view=counter for the safety counter at the door: days since the last lost-time injury, counted from the incidents recorded in Safety & Training, so nobody has to change the numbers. It asks every few seconds, and after a minute without an answer it goes grey and says so. For the work order board in the shop, open PlantOps itself on the TV.
Machine QR signs
Under Maintenance, Machine signs, pick machines and print a QR sign for each, four to a page. Anyone scans it with a phone camera, and the report form opens with that machine already picked: no account or app. The report lands in Work requests for maintenance to triage, and the machine's light goes blue. The form must be switched on in Settings, where you also choose the networks it answers from.
Buttons and sensors
An andon button, a PLC fault or a sensor alarm can report a machine down. Each gets its own secret address under Buttons and sensors, for one machine, and opens a work request for maintenance to triage, or straight away an emergency work order.
curl -X POST 'https://yourplant.plantops.tech/api/v1/inbound/<address>'
curl -X POST 'https://yourplant.plantops.tech/api/v1/inbound/<address>' \
-H 'Content-Type: application/json' -d '{"message": "Nozzle 4 jammed"}'
- Always a POST. Fetching the address (a link preview, an email scanner) does nothing.
- Once while it's in hand. Nothing new is opened while the machine already has an emergency work order open, a request waiting, or a request turned into a work order that's still open, however it was reported: this button, another one, its QR sign or a person.
- A message is optional, from the query, a form or JSON (
message); without one it says the machine was reported down by the button. - The answer is a line a device can log:
{"ok": true, "result": "Opened request #42 for Filler 2"}. 404: no such address (or it's switched off). 405: it was a GET. 422: it couldn't be done, and the result says why. 429: within 2 seconds of the last call, so it was taken for a bounce and ignored.
Troubleshooting
- Test beside a light sends it what it shows now and says what the light answered. Recent sends lists the last few. Each button or sensor lists its Recent calls and what each did.
- "Couldn't connect" or "No answer": PlantOps can't reach the address from the internet. Check the address and that the gateway is reachable from outside, or use the status address instead.
- After 5 failed sends in a row, PlantOps tries every 10 minutes instead of every minute, until one gets through or the light is edited.
- A screen went grey: it hasn't had an answer for a minute. Check its network; it comes back on its own.
- A scanned sign says the form isn't available: switch the report form on in Settings, and check the phone is on one of the networks it answers from.
- New address and secret beside a light (or New address beside a button) replaces it at once, if it was shared too widely. The device needs the new one.
Still stuck? Write to sales@plantops.tech with the light's or button's name and what Test or Recent calls says.