Factora Academy

Public catalogs for FactoraERP IoT and FactoraERP

Academy · IoT.Factora · Technical · 22 min

Register, token, HTTP and MQTT

Lab against a sandbox factory. Do not use shared demo-food tokens in production.

Lab 1 — ingest

Use a sandbox factory created in ops, not the public demo-food plant, when practising token rotate.

HTTP

  1. Sign in as plant admin.
  2. Registry → add device code LAB-TEMP, type temperature, unit °C.
  3. Copy ingest token.
  4. 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"}'
  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.

Check understanding

Progress is stored in this browser only. Passing is 70%.

1. MQTT username is
2. Port 1883 is documented as MQTT TLS.