Knowledge Hub

Factora Academy

Building your first LoRaWAN network

Factora quick start guide

Register a gateway and a sensor, decode the payload, and show it in Factora.

Introduction

Who this is for. People building their first LoRaWAN network on Factora in the EU868 region.

This guide is for a plant admin and a platform owner who want one sensor on a dashboard. You will create the factory account, register a gateway and a sensor, add a codec, connect MQTT, then open Plant dashboards and Alerts. Region details other than EU868 are not covered here. Hardware brands are not named, because the same steps fit any LoRaWAN gateway and sensor.

LoRaWAN architecture

One reading crosses four parts. Each part has one job.

One job for each part
  1. SensorMeasures one thing and sends a short encrypted radio message.
  2. GatewayHears the radio message and forwards it. It cannot read the payload.
  3. Network serverChecks, decrypts, and decodes the message at lns.factoraiot.com.
  4. FactoraStores the reading, draws Plant dashboards, and raises Alerts.

Step 0. Get your Factora account

A person does not sign themselves up. A platform owner creates the factory, then hands out a login.

  1. Sign in to the ops console as a platform owner. A platform viewer can look, and cannot create a factory.
  2. Choose + Add factory. The screen title is Create a factory.
  3. Pick an industry template. Enter the company name and the plant or site name.
  4. Under Advanced · ERP connection, leave the ERP system on Not now unless you already have those codes.
  5. Choose Create factory. Copy the one-time passwords before you leave the confirmation. The starter usernames are admin, maintenance, and operator. Each person changes that password at first sign-in.
  6. Open the plant login. Enter Factory code, Username, and Password, then choose Sign in.
  7. Open Settings, then Team, and turn on Require MFA for all team members when this site should require an authenticator.
Create a factory review
Create a factory, on the review step before Create factory.

Step 1. Register a gateway

The radio gateway is registered in the network server. Factora only stores a row so the plant can show a heartbeat.

  1. In the network server admin at lns.factoraiot.com (office network, not the plant login), add the gateway under this factory.
  2. On the gateway, set the server to wss://lns.factoraiot.com:3001. The gateway opens that connection. Do not open an inbound port on the factory router.
  3. Confirm the network server shows the gateway online before you add sensors.
  4. In the plant, open Gateways and data. The page title is Industrial connectivity.
  5. Under Gateway, enter a stable code and choose Register gateway. Add the place it is installed when you name it.
Industrial connectivity
Industrial connectivity. Register gateway is on this page.

Step 2. Register a sensor

The join keys live in the network server. The Factora device is the measurement you will plot.

  1. In the network server, in this factory's application, add the device with DevEUI and JoinEUI.
  2. Set the AppKey for OTAA. The sensor must use the same three values. The AppKey is not sent over the air.
  3. Power the sensor and wait until the network server shows a join, then an uplink.
  4. In the plant, the menu label is Sensor registry. The page title is Device registry, and the form title is Register sensor.
  5. Choose a parameter, then enter Code, Name, and Area. Min threshold and Max threshold are optional. They create a low rule and a high rule.
  6. Choose Create device. If an ingest token appears, copy it now. A LoRaWAN sensor does not use that token.
Device registry
Device registry. Register sensor asks for a code, a name, an area, and optional thresholds.

Step 3. Add a data converter

A codec turns the sensor's bytes into JSON. Factora reads a number from that JSON. It does not run the codec.

  1. On the network server device profile, attach a codec named for the measurement, such as temperature or energy.
  2. The codec must return JSON. Put the number you will chart on a field such as temperature inside object.
  3. Send one uplink and confirm the network server shows that field in the decoded object.
  4. Note the path you will need in Factora. A temperature field is usually object.temperature.
Screenshot — Coming soon. There is no codec screen in Factora.

Step 4. Integrate with Factora over MQTT

The network server publishes each uplink. The Factora worker subscribes and writes a reading.

  1. On Industrial connectivity, under Connector, set Type to MQTT.
  2. Enter a Name for this site.
  3. Set Broker / endpoint to mqtt://mosquitto:1883. That name works on the server network. It is not an address on the internet.
  4. Set Topic / node / register pattern to application/<application id>/device/+/event/up. Use the application id from the network server.
  5. Enter Password / secret, then choose Save connector. The secret is stored encrypted and is not shown again.
  6. Under Map external source → FactoraERP device, choose the connector, set External id to the uplink topic for one sensor, choose the FactoraERP device, and choose Activate mapping.
Connector form on Industrial connectivity
Industrial connectivity. Connector and Map external source → FactoraERP device are on this page.

Step 5. Open dashboards and alerts

A stored reading shows on the device, on Plant dashboards, and, when a limit is crossed, on Alerts.

  1. Open Plant dashboards. The views are Overview, Production, Sensors, and Energy.
  2. Open the device in Device registry and confirm the last value matches the decoded uplink.
  3. Open Alerts. Acknowledge marks an open alert. Resolve closes it. Maintenance can also create a work order from an alert.
  4. On Alerts, Alert rules is where an admin writes a sentence: when a sensor is above, below, or outside a value for some minutes, notify a role.
  5. Open Settings, then Plant. Set Telemetry to Live mode (gateway ingest) when charts should follow the gateway. Demo mode keeps drawing sample charts.
Plant dashboards
Plant dashboards. Alerts is the next screen for limits and Alert rules.