Skip to content

Data Fetcher ​

The Data Fetcher lets SVITRIX automatically pull data from external HTTP/HTTPS APIs and display the results on the LED matrix — no smart home system required.

How It Works ​

  1. You configure one or more data sources, each pointing to an external API
  2. SVITRIX periodically fetches each source and extracts a value from the JSON response
  3. The extracted value is formatted and displayed as a custom app in the app loop

Web Interface ​

Navigate to http://[IP]/datafetcher in your browser to manage data sources through a visual interface. You can add, edit, and remove sources without writing any API calls.

Configuration ​

Each data source has the following settings:

SettingDescription
NameUnique identifier — becomes the app name shown in the loop
URLFull HTTP or HTTPS URL of the API endpoint
JSON PathDot-notation path to the value in the response (e.g., bitcoin.usd or data.0.price)
Display FormatOptional printf-style format for a single value (e.g., $%.0f for "$67432", %.1f°C for "23.5°C"). Allowed specifiers: %d %i %u %o %x %X %f %g %e %E %s with optional width and precision (1–2 digits each). Use %% for a literal % (e.g., %d%% → "85%").
IconOptional icon name from the ICONS folder
ColorOptional text color as hex #RRGGBB
IntervalPolling interval in seconds (minimum 60, default 900)
DurationDisplay duration in seconds (0 = use global timePerApp setting)
EnabledWhen disabled, the source is saved but not displayed in rotation

JSON Path ​

The JSON Path indicates where to find the value you want to extract from the API response. Use dot notation to navigate through the structure.

How to find the path ​

  1. Open the API URL in your browser
  2. Observe the JSON structure
  3. Write the path using dots to separate levels

Path examples ​

If the API returns:

json
{
  "rates": {
    "MXN": 17.45,
    "EUR": 0.92
  }
}

→ Path: rates.MXN → Result: 17.45

For arrays, use the numeric index:

json
{
  "data": [
    { "price": 67000 },
    { "price": 3400 }
  ]
}

→ Path: data.0.price → Result: 67000 (first element)


Display Format ​

The Display Format uses printf syntax to style the extracted value.

Quick reference ​

FormatExample outputDescription
$%.2f$17.45Currency with 2 decimals
$%.0f$67432Currency without decimals
%.1f°C23.5°COne decimal with unit
%d%%85%Integer with % symbol
%stextUnmodified text
(empty)17.45Raw value

Allowed specifiers ​

  • Numbers: %d %i (integers), %f %g %e (decimals)
  • Text: %s (string)
  • Literal %: %% (displays a single %)

Optional modifiers ​

  • Minimum width: %8d → " 42" (8 characters)
  • Decimal precision: %.2f → "3.14" (2 decimals)
  • Combined: %8.2f → " 3.14"

Icon ​

The Icon field accepts:

  • File name: name of an icon in the /ICONS/ folder (without extension)
  • LaMetric number: numeric ID from LaMetric Icon Gallery — the system looks for [number].gif in /ICONS/

Examples: bitcoin, 16437, weather

Tip: Download icons from the Icons section in the web interface before using them.


Examples ​

Bitcoin Price ​

  • Name: btc
  • URL: https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
  • JSON Path: bitcoin.usd
  • Format: $%.0f
  • Color: #F7931A
  • Interval: 300

USD/MXN Exchange Rate ​

  • Name: USDMXN
  • URL: https://open.er-api.com/v6/latest/USD
  • JSON Path: rates.MXN
  • Format: $%.2f
  • Color: #00AA00
  • Interval: 3600

Ethereum Price ​

  • Name: eth
  • URL: https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd
  • JSON Path: ethereum.usd
  • Format: $%.0f
  • Color: #627EEA
  • Interval: 300

GitHub Stars for a Repository ​

  • Name: stars
  • URL: https://api.github.com/repos/USER/REPO
  • JSON Path: stargazers_count
  • Format: %d ★
  • Color: #FFD700
  • Interval: 3600

Your Public IP ​

  • Name: myip
  • URL: https://api.ipify.org?format=json
  • JSON Path: ip
  • Format: %s
  • Interval: 86400

Public API Sources ​

These collections contain hundreds of free APIs compatible with SVITRIX:

ResourceURLDescription
Public APIshttps://github.com/public-apis/public-apis1400+ APIs in 50 categories, filterable by auth
API Listhttps://apilist.funSearch by topic and popularity
Free APIshttps://free-apis.github.ioCurated list of free APIs
No Auth APIshttps://mixedanalytics.com/blog/list-actually-free-open-no-auth-needed-apis/APIs without authentication
RapidAPI Freehttps://rapidapi.com/collection/list-of-free-apisWith examples and documentation

Compatibility Requirements ​

For an API to work with SVITRIX:

  • ✅ No authentication or API key in the URL (no custom headers)
  • ✅ JSON response under 4 KB
  • ✅ Extractable value with dot notation (data.value, items.0.price)
  • ✅ Public endpoint accessible from your network

Ideas by Category ​

CategorySuggested APIs
FinanceCoinGecko, ExchangeRate-API, Alpha Vantage
WeatherOpen-Meteo, WeatherAPI (already integrated)
MonitoringUptimeRobot, Pi-hole, Home Assistant
DevelopmentGitHub API, GitLab API
EntertainmentSpotify (with token), Twitch
Utilitiesipify, WorldTimeAPI

Enable / Disable Sources ​

You can temporarily disable a source without deleting it:

  • In the web interface, each source has an Enable/Disable button
  • Disabled sources remain saved but are not fetched or displayed
  • When re-enabling a source, it fetches immediately and returns to rotation
  • Useful for pausing sources during API maintenance or to reduce traffic

Limitations ​

  • Maximum 8 data sources simultaneously
  • API response must be under 4 KB
  • Only public APIs are supported (no custom authentication headers)
  • Minimum polling interval is 60 seconds
  • HTTPS is supported but without certificate validation

API ​

Data sources can also be managed via the HTTP API.