TTN Forum: proxy TTN uplink
@avbentem
code:
data:privatelast updated:1 year ago
@avbentem/
TTN Forum: proxy TTN uplink

Usage

Log in to Pipedream, create a copy of this workflow, and then:

  1. In the parameters of the decodeAndForward step, enter a value for the Target URL and (optionally) the Authorization header that is set in the TTN integration. (These parameters are private to your copy. Alternatively, change the code to use environment variables, say const targetUrl = process.env.TTN_PROXY_TARGETURL along with defining those variables.)

    If the target URL is easy to guess, then also enhance the code to add some security!

  2. Adjust the decodeAndForward step to decode and enhance the payload, for whatever your target server needs.

  3. Deploy the copied workflow to get a unique webhook URL.

  4. In TTN Console, set up the application's HTTP Integration to use that URL, and optionally set a value for the Authorization header.

If your application has many devices, then check Pipedream's limits. Otherwise, if your device adheres to TTN's Fair Acces Policy, you should be fine but you might want to keep an eye on your daily quota usage. Processing in TTN and Pipedream won't be fast enough to schedule or replace a downlink, if you expect that to be transmitted in RX1 or RX2 of the current uplink.