What is TTN? - green-ecolution/backend GitHub Wiki
The Things Network (TTN) is a global, open network designed for the Internet of Things (IoT). It is built on the LoRaWAN communication protocol, which allows devices to send small amounts of data across long distances using very little power. This makes it well-suited for remote sensors that need to run on batteries or energy harvesting for extended periods.
How TTN Works:
-
LoRaWAN Devices
Sensors in the field measure data such as soil humidity and temperature. -
Gateways
The sensors use LoRaWAN to transmit their data to nearby gateways. -
The Things Stack Cloud
The gateways forward all received data to The Things Stack Cloud—the cloud-based part of TTN that receives, processes, and manages the data.
The Things Stack Website -
Payload Decoding
In the cloud, a JavaScript "uplink payload formatter" decodes the raw sensor data into a structured JSON format. -
Data Availability
Once decoded, the data is published to an MQTT broker, making it accessible to external applications.
How TTN Integrates with Our System:
In our setup, The Things Stack Cloud acts as the main access point for sensor data. After it processes and decodes the incoming LoRaWAN signals, it publishes these decoded messages to an MQTT topic that our backend subscribes to.