Add ability to download historical data within the app or web interface

@alexanderholsteinson @nintanga1 @sunny @thegumnut

You can get all the historical data that tempestwx.com uses in one API response from the following URL:

https://swd.weatherflow.com/swd/rest/stats/device/[device_id]?callback=jQuery&api_key=[key]&build=75&token=[token]&_=[timeframe_in_epoch]

Instructions:

Put in your device ID where the placeholder [device_id] is. (Without the “[” and “]” symbols.)

Put your API key in where the [key] placeholder is.

You can put a variety of numbers in build, but I use 75.

Put your token in the [token] placeholder.

Put the timeframe in the [timeframe_in_epoch] placeholder.
The timeframe I used was 1694390374997.
You can find out about Epoch time format at https://www.epochconverter.com/.

You may have to use a jQuery ID like: 22409535901957469501_1694390374996, I didn’t need one.

How do I Get my API Key, Token, or other data?

Click on the :small_red_triangle_down: triangle on each of these to see how to get different data:

Get your API Key

To get your tempest API key,

  1. Navigate to https://tempestwx.com in a browser.

  2. In the top navigation bar, click on the “Settings” tab

  3. Scroll down to the “More” section and click on “Data Authorizations”:

    image

  4. If you have no API key, click the “Create Token” button:

    image
    Create your token following the instructions and continue these steps.

  5. You will see the tokens here:

    image

    Copy the API Key and keep it for future use. Never share your API Key!

Get your API Token

To get your API token, things are a bit more complicated. You will need a web request monitoring program or extension like uBlock Origin to complete the next steps.

  1. If you do not have uBlock Origin in your browser, follow these steps:

Chrome:

If you are using Google Chrome browser, navigate to https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm and click “Add to Chrome”:

image

Firefox:

If you are using Firefox Browser, navigate to
uBlock Origin – Get this Extension for 🦊 Firefox (en-US) and click “Add to Firefox”:

image

Opera:

If you are using Opera, navigate to
uBlock Origin extension - Opera add-ons and click “Add to Opera”:

image

  1. Now that you have uBlock Origin, click on the uBlock shield in the upper right of your browser (if you did not pin the extension, then click the extensions cube/puzzle-piece icon to see it):

image

  1. The uBlock menu appears, and you should see the uBlock logger icon. Click it to open the request logger:

image

image

  1. Now navigate to https://tempestwx.com/ and open the uBlock logger.

  2. You should see a bunch of requests that tempestwx.com makes. Leave them alone. There are penalties for tampering with a website’s private data. Click the “History” Tab of tempestwx.com.

  3. Filter the uBlock logger content by typing “stats/device” into the uBlock logger filter; you should see one result:

  1. Click the view arrow to view the data:

image

  1. A new tab should open in your browser:

You can see the historical data in the tab.
9. Click the open arrow in the uBlock tab to open the URL in your browser (In the upper-right of the tab):

image

The tab should open and display the historical data. You can use the URL for any historical data purposes you need:

image

And… As far as getting your token is concerned:

The token is included in the URL after "&token="

Get your station ID

To get your station ID, you can:

  1. Navigate to tempestwx.com and click the “Settings” tab.

  2. Click in the address bar in your browser; you can see your station ID after “/station/”:

image

In Conclusion

You can fairly easily get historical data from the tempest API, but it requires your token, API key, and station ID. You can find more about the Tempest API usage at this URL:


Was this helpful? If not, I won't make more responses like this in the future.
  • Yes, it was helpful
  • No, it was not helpful
  • No, it was irrelevant
  • No, it was inaccurate
  • I don’t really care
0 voters

If this didn’t help you, make sure you also see Lux4rd0’s response above:

When you reply, please mention me as Best_codes.
Thanks for your time,

Best_codes

2 Likes