The global COVID-19 pandemic of 2020 was not only a cultural disruption, but it also provided the start of a technological shift.  As streaming video and virtual meetings became ubiquitous, many remote workers found themselves acquiring new skills. Among them is this author, who utilized time at home to master the design and operation of real-time professional broadcast graphics using Ross XPression, a leading graphics platform used in numerous live television broadcasts worldwide.  

During that time Davis Instruments, a leading manufacturer of industrial-grade weather stations, known for their scientific precision, accuracy, and rugged reliability, released V2 of their API.  Following this important update, Davis released a new updated console featuring integrated WiFi for transmitting data to the WeatherLink cloud platform.  This update, compared to the older V1 API, introduced changes to how some of the older data is now presented.  For example, barometric pressure became expressed as floating-point values and wind direction was based on degrees of the compass—both of which can be modified to friendlier front-facing terminology through the use of XPression’s powerful Visual Logic tool.

The following guide outlines a method for leveraging Davis WeatherLink data to power broadcast graphics content within Ross XPression.


Section 1: Preparing WeatherLink

  • Sign up if you haven’t already at https://www.weatherlink.com or via your console and create your free account (sign in if you have)
  • In a web browser, with your WeatherLink account successfully authenticated, navigate to the account information section on the right side
  • Next, generate the API Key V2 (this will reveal your API Key for V2 as well as your API Secret)
  • Ensure your station is online and reporting data

Section 2: Obtain Your Station ID

  • Open Terminal (macOS)/Command Prompt (Windows)
  • Copy and paste this text (replacing the brackets with your own data previously obtained in section 1
    curl -X GET "https://api.weatherlink.com/v2/stations?api-key={YOUR API KEY HERE}" -H "X-Api-Secret: {YOUR API SECRET HERE}"
  • Hit return to run that command, the results of which should reveal your station ID
  • Take a note of that number; you’ll need it for the next section

Section 3: Getting XPression to Listen

  • Open up your DataLinq server (note: this is an additional paid license for any XPression systems)
  • Add a new RSS/HTTP DataLinq Configuration
  • On the settings tab, insert the following path as the URL (replacing the brackets with your own Station ID and API key)
    https://api.weatherlink.com/v2/current/{YOUR STATION ID HERE}?api-key={YOUR API KEY HERE}
  • Select Automatic for the Format
  • Davis API users are limited to 1,000 API calls per hour and 10 calls per second so you’ll want to change the Update Interval to be 5,000ms or higher.  See this documentation for further clarity: https://weatherlink.github.io/v2-api/rate-limits and https://weatherlink.github.io/v2-api/data-permissions (this will help you decide the correct timing for you, based on your subscription level)
  • You have the option of using Table Presets under Mode (the same value for the URL could be used and you could then name it Station 1 etc. on the Table Presets tab if you wish to do that)
  • Next, select the HTTP Config tab and at the bottom, click Add to add a Custom Header Parameter
  • Make the name: X-Api-Secret and then the value your API Secret
  • Click OK and XPression should now be all set to listen for the Davis WeatherLink data

Section 4: Assigning the Data to Your CGs

  • Open your XPression project and enter into the Layout mode (in case you have it set to open the sequencer by default)
  • Design your Viewport and stylize your Scene Fonts
  • Then when ready to assign the live data values, select the Data Source tab
  • Select DataLinq from the radial button
  • Click Set
  • That will launch an additional window where you will want to make sure you select the Davis listener you previously configured in section 3 from the available drop down menu for DataLinq
  • If you want the data to update live on the air each time the DataLinq server makes the call, check off Live Update under options (though it might be confusing to the presenter if the data were to change while they are referencing it mid-sentence over the air)
  • Then select Browse
  • Scroll Down and select the DataLinq Field that offers the matching value you want expressed as the text item within your CG
  • Click OK for each window and you’re all set; that item’s value is now linked to your CG, so anytime new data is refreshed via the WeatherLink connection using DataLinq, those values will update

Section 5: Tweaking the Results

  • Sometimes the raw data that comes in is not formatted in a viewer-friendly fashion, so to resolve that you may want to apply a little Visual Logic
  • Below are some sample modifications this author has created for his data

Replacing Decimals with Integers:

  • In Visual Logic Editor, go to Scene Objects and drag over the text block of the item you want to modify
  • Then select the Round function block located inside of the Math section and drag that onto your Visual Logic Editing area
  • Copy over another instance of the Scene Object you’re modifying (the text block)
  • Connect the blocks (nodes) from left (output) to right (input) and ensure the Visual Logic you’re applying is enabled
  • Name the tab under Properties if you wish to have multiple Visual Logic statements running on the same CG (this will keep your project’s design organized)

Changing the Pressure Trend from Floating-Point Values to Text-Based Phrases:

  • In Visual Logic Editor, go to Data Sources under Function Blocks and select DataLinq, dragging that onto your workspace
  • Set the source to be the Barometric 3 Hour Trend
  • Note the sensor ID
  • Under the Logic section you’ll need to drag out some Greater Than/Eq To, Smaller Than/Eq To, & And function blocks
  • Arrange them so that the order is as follows:
    1) >=
    2) >=
    3) <=
    4) >=
    5) <=
    6) <=
    7) >=
    8) <=
  • 1 & 8 will be standalone blocks
  • Place one of the And function blocks next to 2 & 3, 3 & 4, and 5 & 6
  • Doing that sets up the ranges for you 
    1 = Rising Rapidly
    2 + 3 = Rising Slowly
    4 + 5 = Steady
    6 + 7 = Falling Slowly
    8 = Falling Rapidly
  • Click on each and give it a helpful description as well as a base value; use this guide to set your base values looking up the proper Data Structure Type and Sensor Type based on the ID you noted earlier: https://weatherlink.github.io/v2-api/interactive-sensor-catalog
  • Once you find the correct notes, you may discover a table with the values/ranges needed for completing the Visual Logic statements

    Example: Rising Slowly would need >= 0.020 and <= 0.059

  • Next, connect the output to the Base + And inputs of the And function blocks for each grouping
  • The Logic boxes are basically true/false statements, so if true then they will display a 1 as the output value
  • If you go up to View it will help to check off and enable Show Block Values, which will help this to make sense
  • In the case of steady pressure, in order for that to be true, both function blocks feeding into the And function block will have to showcase a 1 (same for any other group you have now joined together with the And function block, effectively creating a limit to the range so that the true/false statement is correct and limited when just that condition is met)
  • Go ahead and link the DataLinq Data 1 output to each of the function blocks you set up, connecting them to the >= or <= input areas
  • Next, create 5 Add function blocks from the Math section
  • Connect the Outputs of the last function block for each of the 5 groupings you just finished setting up, to the inputs of the Add function blocks
  • Going down the line (this is why it’s important to keep your Visual Logic organized) add additional Outputs to the + inputs of the Add function blocks based on the numerical value you want to assign to represent each condition
    Use:
    1 = Rising Rapidly (Base)
    2 = Rising Slowly (Base +)
    3 = Steady (Base + +)
    4 = Falling Slowly (Base + + +)
    5 = Falling Rapidly (Base + + + +)
  • Add another Add function block and connect each of the previous Add Outputs to an Input on that one (use Base, too)
  • Next, drag over an Input Selector from the Selectors Function Blocks
  • Connect the Output of the previous Add to the Index input for the Input Selector
  • This is where you’ll assign the text values that will ultimately replace the numerical representation of the 3-hour pressure trend
  • Drag over and add 5 String Value function blocks from the Strings sub grouping
  • Name each based on the condition you want described (ie: Rising Rapidly, Rising Slowly, etc.) – you do this by selecting the function block and changing its value to the appropriate phrase
  • Click on the Input Selector function block and set the Index Offset to 1
  • Then connect the output of each String Value to the appropriate numerical input of the Input Selector (ie: 1 = Rising Rapidly, 2 = Rising Slowly, etc.)
  • Go to the Scene Objects area and add the block representing the text you want to replace with the phrase for the pressure trend
  • Connect the Out of the Input Selector function block to the Input of the Text block you just added, and your Visual Logic is complete
  • Add the scene to the sequencer and test your resulting data
  • Below is an example of the final Visual Logic build:

Changing the Wind Direction from Compass Degrees to Common Text-Based Directions:

  • This follows a similar set of steps as the pressure trend; see above for the step by step overview but notice the example of the Visual Logic depicted below
  • As a reference, here are some suggested range values
    346-15 = North
    16-35 = N/NE
    36-55 = NE
    56-75 = E/NE
    76-105 = East
    106-125 = E/SE
    126-145 = SE
    146-165 = S/SE
    166-195 = South
    196-215 = S/SW
    216-235 = SW
    236-255 = W/SW
    256-285 = West
    286-305= W/NW
    306-325 = NW
    326-345 = N/NW

Here’s a preview of the data produced through the aforementioned methods when incorporated into the broadcast design graphics package.


(Final Result On-Air via XPression Sequencer)

Categories:

Comments are closed