libtempest 0.1.0

Parsing libary for WeatherFlow Tempest data records
Documentation
  • Coverage
  • 21.19%
    25 out of 118 items documented2 out of 17 items with examples
  • Size
  • Source code size: 28.83 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 29s Average build duration of successful builds.
  • all releases: 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • davethiede/libtempest
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • davethiede

libtempest

A parser definition for weatherflow/tempest json records.

This library is the result of expanding a simple UDP packet monitor written to help diagnose connection issues with a WeatherFlow Tempest weather station. UDP packets from the hub contain JSON formatted strings. The same JSON format is used in the results from the cloud REST API.

All fields are specified as public to enable this library to be used as a connector for other services.

Example

use libtempest::Tempest;
use serde_json;
let buf = r#"
{
   "serial_number": "SK-00008453",
   "type":"evt_precip",
   "hub_sn": "HB-00000001",
   "evt":[1493322445]
}"#;
let rec: Tempest = serde_json::from_str(&buf).unwrap();
if let Tempest::EvtPrecip(x) = &rec {
    println!("{:?}", x);
    println!("{:?}", x.serial_number);
    println!("{:?}", x.evt);
    println!("{:?}", x.evt.epoch);
}

References

License: Apache-2.0