The Things Network
Connect a TTN application to HydroNode. Uplinks of your devices arrive through a webhook, and HydroNode can send downlinks back through the same webhook.
Register the device in TTN
- 1Open your applicationOpen console.thethings.network and select your application.
- 2Add the end deviceOpen End devices and press Add end device. Enter the JoinEUI, the DevEUI and the AppKey from the device firmware.
- 3Note the IDsComplete the registration and note the DevEUI and the Application ID.
Link the device to your sensor
Link the DevEUI to a sensor that is set to Outdoor, as described in Bind in HydroNode. Then add a payload layout for each fPort, see Decode payloads.
Send uplinks from TTN to HydroNode
One webhook per TTN application forwards the messages of all devices in it. HydroNode keeps the uplinks of devices you linked and rejects the others.
- 1Copy your webhook addressOpen Profile in HydroNode. Under LoRaWAN Webhook, reveal the Webhook URL and copy it. It contains your secret token, so keep it private.
- 2Add a custom webhookIn the TTN Console, open your application. Open Integrations, then Webhooks, press Add webhook and choose Custom webhook.
- 3Fill in the formEnter a Webhook ID such as hydronode. Set Webhook format to JSON and paste your address into Base URL. HydroNode needs no extra headers.
- 4Pick the messagesTurn on Uplink message. To send downlinks later, also turn on Downlink sent, Downlink ack, Downlink nack and Downlink failed. Leave every path field empty, so each message goes to your address unchanged.
- 5Save the webhookPress Save changes. TTN now sends every message of this application to HydroNode.
See the first uplink arrive
Open the sensor in HydroNode and open its console. Click the bar at the bottom of the page or press the backtick key. The Live tab shows every uplink as it arrives, with fPort, frame counter, decoded values and the result. In TTN you can send a test uplink with Simulate uplink on the page of the device.
| Result | Meaning | What to do |
|---|---|---|
| 202 | The values are stored. | Nothing. The device is connected. |
| 400 no-fport-config | There is no payload layout for this fPort. | Add the layout in the sensor settings. |
| 401 | The token in the address is not valid. | Copy the Webhook URL again. After a token rotation, update it in your network server. |
| 404 | No sensor in your account has this DevEUI. | Link the DevEUI in the sensor settings under Connection. |
More about the console: Device Console.
Let HydroNode send through TTN
Once your webhook has a downlink API key, TTN sends that key along with every message. HydroNode keeps it and uses it to queue downlinks for your devices. You never paste the key into HydroNode.
- 1Allow the key in HydroNodeOpen Profile. Under Downlinks, choose The Things Network and press Allow TTN key. HydroNode only keeps a key from TTN after you allowed it.
- 2Create an API key in TTNIn the TTN Console, open your application and then API keys, and press Add API key. Give it a name, choose Grant individual rights and tick Write downlink application traffic. Create the key and copy it, because TTN shows it only once.
- 3Add the key to your webhookOpen Integrations, then Webhooks, and pick your HydroNode webhook. Paste the key into Downlink API key and press Save changes. Make sure the four downlink messages from the webhook setup are turned on.
- 4Wait for the next uplinkThe key arrives with the next uplink of any device in this application. Your profile then shows Key received. Press Check now to look again.
- 5Test and turn onPress Test. When the test passed, turn on Send downlinks through TTN.
What you can send and how to follow it: Downlinks.
What TTN sends
{
"end_device_ids": {
"dev_eui": "a840411b2182cd44",
"application_ids": {
"application_id": "my-app"
}
},
"uplink_message": {
"f_port": 1,
"f_cnt": 9846,
"frm_payload": "AQH0AgBk",
"rx_metadata": [
{ "rssi": -85, "snr": 7.2 }
],
"received_at": "2026-07-21T11:24:34.027Z"
},
"received_at": "2026-07-21T11:24:39.500Z"
} HydroNode recognises a TTN message by end_device_ids.