Skip to content

Station: live weather-station display

@azohra/meteo.station reads live weather stations and shows their conditions on your own page, drawn by the package rather than embedded from a vendor iframe. It has five parts:

  • a wire contract, the one document shape every station is served in;
  • adapters that convert each vendor’s readings to that shape (four are built in, and you can write your own);
  • a feed handler you mount on your server, which serves every station as one feed over web-standard Request and Response;
  • a client data layer that polls the feed, with no framework dependency; and
  • two display bindings, React components and custom elements, which a parity suite keeps byte-identical.

The component gallery renders every custom element live on a synthetic season.

Station is independent of the forecast and Meteogram packages. Importing it loads no forecast, renderer, or SVG code. Each part is its own subpath:

import { parseStationFeedJson } from "@azohra/meteo.station";
import { createStationStore } from "@azohra/meteo.station/client";
import { createStationFeedHandler } from "@azohra/meteo.station/server";

Getting started walks through installing the package, mounting the handler, and rendering a live card.

  • Each station declares on the wire what it measures, and the components follow those declarations. A station without a thermometer says so, and a sensor that has gone dark reports null rather than zero.
  • A station whose upstream fails, or sends data that breaks the contract, shows as unavailable with a reason code. The other stations in the feed are unaffected.
  • The wire carries reason codes and degrees. The client chooses the words, units, and colours.
  • Wind-speed bands use the thresholds you pass in and the colours your theme sets.

The wire contract sets out these rules in full.

PageCovers
Getting startedInstall, mount the handler, render components, call the data layer
AdaptersHow adapters work, writing your own with defineStationAdapter, environment injection, caching, and polling etiquette. Each built-in vendor has its own page: WindNerd, Tempest, Campbell, Ecowitt
What your hardware showsWhat each vendor measures, and which components appear, degrade, or stay hidden as a result
Component galleryEvery custom element, rendered live on a synthetic season
ReactThe provider, hooks, thresholds, composition, and seeding the provider during server-side rendering
Custom elementsRegistering the elements, and when to use attributes or properties
Theming.meteo-root scoping, design tokens, dark mode, and @layer
Client dataThe layer beneath both bindings: how polling works, the stores, and how readings merge
ClimatologyA station’s whole archive summed by month, time slot, and wind sector, filtered in the browser without another request
Wire contractThe document shape, its semantics and evolution rules, the HTTP protocol, and freshness

JSON Schema for the station wire documents is in schema/, with annotated examples. It follows the schema-artifact convention that every package publishing wire documents uses.

Station was developed in its own repository before it moved here. Its earlier history is archived there.