A Rust client for the NOAA Weather Wire Service Open Interface.

Overview

nwws-oi

A Rust client for the NOAA Weather Wire Service Open Interface.

NWWS-OI is one of several platforms through which the National Weather Service distributes text products. The NWS operates two XMPP servers which push text products in realtime to clients over the Internet as they are published.

Features

  • #![forbid(unsafe_code)]
  • Pure Rust
  • Async (using Tokio)

Example

let mut stream = nwws_oi::Stream::new((username, password));

while let Some(event) = stream.next().await {
    match event {
        StreamEvent::ConnectionState(state) => {}
        StreamEvent::Error(error) => {},
        StreamEvent::Message(message) => {},
    }
}

Quickstart

  1. Sign up
  2. Receive credentials from the NWS by email
$ export NWWS_USERNAME=x    # <-- change
$ export NWWS_PASSWORD=y    # <-- change
$ cargo run --example print
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/examples/print`
[2022-02-04T01:04:56Z INFO  nwws_oi] connecting to nwws-oi.weather.gov
[2022-02-04T01:04:59Z INFO  nwws_oi] connected to NWWS-OI [email protected]/uuid/cda49512-b62a-46e9-87a4-1e1dd12b910b and joined channel [email protected]/x/uuid/cda49512-b62a-46e9-87a4-1e1dd12b910b
[2022-02-04T01:05:00Z INFO  print] received Message {
        ttaaii: "SXUS74",
        cccc: "KOUN",
        awips_id: Some(
            "REROKC",
        ),
        issue: 2022-02-04T00:47:00+00:00,
        id: "14425.22326",
        delay_stamp: Some(
            2022-02-04T01:05:32.484+00:00,
        ),
        message: "\n109\nSXUS74 KOUN 040104\nREROKC\n\nRECORD EVENT REPORT\nNATIONAL WEATHER SERVICE NORMAN OK\n0647 PM CST THU FEB 03 2022\n\n...RECORD DAILY MAXIMUM SNOWFALL SET AT OKLAHOMA CITY...\n\nA RECORD SNOWFALL OF 3.3 INCHES HAS FALLEN SO FAR AT WILL ROGERS \nWORLD AIRPORT OKLAHOMA CITY.  THIS BREAKS THE OLD RECORD OF 1.0 SET \nON THIS DATE IN 1913. SNOW IS STILL FALLING IN OKLAHOMA CITY AT THIS \nTIME OF THIS ISSUANCE. ANOTHER REPORT WILL BE ISSUED WITH THE END OF \nTHE DAY SNOWFALL TOTALS.\n\n$$\n",
    }
[2022-02-04T01:05:02Z INFO  print] received Message {
        ttaaii: "WOUS99",
        cccc: "KNCF",
        awips_id: None,
        issue: 2022-02-04T01:05:00+00:00,
        id: "14425.22327",
        delay_stamp: None,
        message: "\n110\nWOUS99 KNCF 040105\n@pil\nTHIS IS A COMMUNICATIONS TEST MESSAGE ORIGINATING FROM THE ANCF\nSYSTEM IN SILVER SPRING.  IT IS SET TO TRANSMIT EVERY MINUTE\n24 HOURS PER DAY, SEVEN DAYS PER WEEK, VIA A CRON JOB ON THE\nCS1F-ANCF.ER SERVER.  IT IS SENT TO NCF WHERE IT IS ROUTED\nEITHER VIA SBN OR WAN TO ALL AWIPS SITES. THIS PRODUCT IS USED\nFOR PERFORMANCE MEASUREMENTS AND WILL BE RECEIVED\nOVER THE WAN (NCFHPTNCF) OR SBN (NCFWTSNCF and NCFTSTNCF) BY ALL SITES.\n",
    }
You might also like...
Web service generating images of Japanese (Riichi) Mahjong hands.
Web service generating images of Japanese (Riichi) Mahjong hands.

chombo-gen ChomboGen is a web service that allows to generate images of Japanese (Riichi) Mahjong hands. The hands are provided in a text format and a

Memory.lol - a tiny web service that provides historical information about social media accounts

memory.lol Overview This project is a tiny web service that provides historical information about social media accounts. It can currently be used to l

Satoru keeper service 🦀.
Satoru keeper service 🦀.

Satoru keeper service 🦀 📝 Description The keeper is an offchain service for Satoru protocol. It is responsible for: Watching the user initiated acti

A little command-line script written in Rust to interface with Discord webhooks.

Rust Discord Webhook Agent This is a little "script" I wrote for practice with Rust and asynchronous operations within Rust. Getting started Clone thi

A rusty interface to llama.cpp for rust

llama-cpp-rs Higher level API for the llama-cpp-sys library here: https://github.com/shadowmint/llama-cpp-sys/ A full end-to-end example can be found

GGML bindings that aim to be idiomatic Rust rather than directly corresponding to the C/C++ interface

rusty-ggml GGML bindings that aim to be idiomatic Rust rather than directly corresponding to the C/C++ interface. GG-what? See: https://github.com/gge

This is a simple Telegram bot with interface to Firefly III to process and store simple transactions.
This is a simple Telegram bot with interface to Firefly III to process and store simple transactions.

Firefly Telegram Bot Fireflies are free, so beautiful. (Les lucioles sont libres, donc belles.) ― Charles de Leusse, Les Contes de la nuit This is a s

01 Solana program application interface.

01 abi The abi is a repository for interfacing with the 01 program either through a rust client or through CPIs from another Solana program. Program A

cqlsh-rs is a command-line interface for interacting with Cassandra using CQL

cqlsh-rs is a command-line interface for interacting with Cassandra using CQL (the Cassandra Query Language). Originally shipped with every Cassandra package and implemented in Python 2, this tool is reimplemented in Rust.

Comments
  • Update xmpp-rs dependencies

    Update xmpp-rs dependencies

    Some components of the xmpp-rs workspace had breakages in published crates, which would then break the build of nwws-oi. These breakages have since been fixed, as far as I can tell.

    This PR updates the xmpp-parsers and tokio-xmpp dependencies, and relaxes the version constraint for tokio.

    opened by budrick 4
RusQTTbom takes weather data from the Bureau of Meteorology (BOM) and publishes that data via MQTT messages.

RusQTTbom RusQTTbom collects weather data from the Bureau of Meterology (BOM) then publishes said data locally via MQTT messages. BOM weather data is

Athenars 7 Jan 13, 2023
CLI command for retrieving weather details.

rusty-forecast rusty-forecast is a Linux CLI command for retrieving weather details. INSTALLATION git clone https://github.com/husseinhareb/rusty-fo

Hussein Hareb 10 May 27, 2024
Meteor Client Installer - Installer to automate the install of Fabric and Meteor Client

This is an installer that automates the install of Meteor and Fabric

Jake Priddle 3 Jun 23, 2021
A discord bot that safely executes whatever rust you throw at it. Remote code execution as a service

RustBot Bot is still under development and not ready for production use RustBot is a discord bot that executes whatever rust code you throw at it. In

Conner Bradley 7 Jan 3, 2022
A rust library for toornament.com service

A rust library for toornament.com service

Victor Polevoy 3 May 30, 2022
LaaS: Life as a Service

LaaS: Life as a Service $ curl life-as-a-service.herokuapp.com/-1x0~0x0~1x0 0x-1~0x0~0x1 let previous = '0x-1~0x0~0x1' for (let i = 0; i < 5; i++) {

Brandon Smith 5 Nov 1, 2021
Web service for Firefox Suggest

Merino A service to provide address bar suggestions to Firefox. For more details, see the service docs. About the Name This project drives an importan

Mozilla Services 27 Sep 23, 2022
RuES - Expression Evaluation as Service

RuES is a minimal JMES expression evaluation side-car, that uses JMESPath, and it can handle arbitrary JSON. Which effectively makes it general purpose logical expression evaluation engine, just like some Python libraries that used to evaluate logical expression. This in turn can allow you implement complex stuff like Rule engine, RBAC, or Policy engines etc.

Zohaib Sibte Hassan 14 Jan 3, 2022
Runit service management wrappers

void-svtools Basic wrappers for managing services for runit,

Isaac Hung 1 Aug 3, 2022
Matrix Bot for Bitcoin Push Notification Service

BPNS Matrix Bot Description Matrix Bot for Bitcoin Push Notification Service. Requirements Rust (1.57.0+) BPNS Server Matrix account Build cargo build

BPNS 0 Mar 14, 2022