Connecting your TTN app to Short Term Storage

Building a TTN application allows you to decode and view (temporarily) your data streams. However, to do something useful with the streams, you need to create one or more integrations. The TTN network offers short term (7 days) data storage which is useful for testing and debugging until you develop a long term solution.

Here are the steps I followed to utilize their data storage. NOTE: This is a short term solution, only useful for debugging.

  1. In your TTN console, click Applications.
  2. Click on your desired application.
    1. Click on the Integration tab
    2. Click on the “add integration” link
    3. Click on Data Storage
    4. Click on the “add integration” button
    5. Click on the “go to platform” link
    6. Swagger (their data storage platform) will appear in a new browser tab
  3. Return to the TTN application tab, click overview
    1. Scroll down to the access key
    2. Click the eye icon to reveal
    3. Click on the clipboard icon to copy to your clipboard
  4. Return to the Swagger tab
    1. Click the authorize button
    2. Paste the key code from the clipboard into the text box
    3. Click authorize. NOTE: You will need to do this each time you access the page.
  5. For each of the 3 APIs:
    • Click GET to see brief documentation of the API
    • Click “Try It Out” to see an example call and the return values
  6. Try /devices to see a list of your devices
  7. Try /query to see your most recent data stream

NOTES:

  1. You can use the above steps 3 thru 7 to view recent data, but the API is designed to be used by an external program that you will need to write to retrieve data from their storage.
  2. If Try It Out, returns a 401 error, you need to authorize following steps 3 & 4
  3. If Try It Out returns a 204 error, there is no data to return
  4. Michael’s flight software returns data in 3 separate packets. However, Data Storage returns all database elements for each packet, thus numerous values will be returned as null. This is unfortunate, but normal.

%d bloggers like this: