Outdoor safety card

Lightning and heat for people outdoors: the 30-minute all-clear countdown, a nearby-lightning watch and the WBGT heat level, filling the screen while lightning is in range.

Category: Weather. Tags: Alerts and status, Weather and environment, Countdowns and timers.

Previews

Outdoor safety
Canvas
Outdoor safety
Corner
Outdoor safety
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

Feed: screenrig.outdoorsafety/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Outdoor safety"maxLength: 40
sitestring""maxLength: 60The venue's name, when the feed carries none.
showstring"both""both", "lightning", "heat"Which hazards the card covers.
unitsstring"metric""metric", "imperial"Kilometres and degrees Celsius, or miles and degrees Fahrenheit.
radiusKmnumber16minimum: 1; maximum: 100Lightning range in kilometres: a strike inside it suspends outdoor activity (16 km is 10 miles).
watchKmnumber32minimum: 1; maximum: 200Strikes outside the range but inside this distance read Lightning nearby.
clearMinutesinteger30minimum: 5; maximum: 120Minutes without a strike in range before the all-clear.
takeoverbooleantrueFill the whole screen while lightning is in range.
wbgtLevelsarray[25.6,27.8,30,32.2]minItems: 4; maxItems: 4The WBGT values in degrees Celsius where the level rises from low to moderate, high, very high and extreme.
staleMinutesinteger10minimum: 1; maximum: 1440Readings older than this show as out of date; lightning data this old never reads All clear.
hour12booleanfalse

Dynamic properties

NameTypeDefaultValues and limitsDescription
strikesarray[]minItems: 0; maxItems: 200Recent strikes, an empty list meaning none. A feed (screenrig.outdoorsafety/v1) wins when present; the data store supplies the same rows otherwise.
strikes[].atstringmaxLength: 32; RequiredWhen the strike hit, ISO 8601.
strikes[].distanceKmnumberminimum: 0; maximum: 1000Distance from the site; a strike without one counts as in range.
lastStrikeAtstring""maxLength: 32The last strike in range, ISO 8601: the quick way to start the countdown by hand.
strikeDistanceKmnumber0minimum: 0; maximum: 1000How far that strike was, in kilometres. 0 means in range.
wbgtCnumber0minimum: 0; maximum: 50The WBGT reading in degrees Celsius. 0 means no reading.
temperatureCnumber0minimum: 0; maximum: 60Air temperature in degrees Celsius; with humidity it estimates WBGT when there is no reading. 0 means none.
humidityPctnumber0minimum: 0; maximum: 100Relative humidity in percent. 0 means none.
updatedstring""maxLength: 32When the readings were made, ISO 8601 (data store only; a feed carries fetchedAt). A set value marks lightning as reported.

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "outdoor-safety",
  "primitive": "card",
  "card": "outdoor-safety",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "outdoor-safety-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/outdoor-safety-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"strikes":[],"lastStrikeAt":"","strikeDistanceKm":0,"wbgtC":0,"temperatureC":0,"humidityPct":0,"updated":""}}'