Lab 1 — ingest
Use a sandbox factory created in ops, not the public demo-food plant, when practising token rotate.
HTTP
- Sign in as plant admin.
- Registry → add device code
LAB-TEMP, type temperature, unit °C. - Copy ingest token.
- Send:
curl -X POST https://iot.factoraerp.com/api/ingest \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": 4.2, "messageId": "lab-1"}'
- Confirm the reading on the device page. Repeat the same
messageId— count must not double.
MQTT
Broker: iot.factoraerp.com:1883 (no TLS claimed).
mqtt pub -h iot.factoraerp.com -p 1883 \
-u LAB-TEMP -P '<token>' \
-t factora/<slug>/devices/LAB-TEMP/telemetry \
-m '{"value": 9.4, "messageId": "lab-mqtt-1"}'
Wrong factory slug in the topic is rejected. Wrong password is rejected.
Paused factory: plant login fails; do not expect ingest as a “feature” for paused tenants.
