https://github.com/deebloo/yngvi
Read, decode, store and display weather data from Acurite weather stations.
https://github.com/deebloo/yngvi
acurite localweather sdr weather
Last synced: about 1 year ago
JSON representation
Read, decode, store and display weather data from Acurite weather stations.
- Host: GitHub
- URL: https://github.com/deebloo/yngvi
- Owner: deebloo
- Created: 2020-12-29T17:17:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T09:31:43.000Z (about 2 years ago)
- Last Synced: 2024-05-14T10:42:47.310Z (about 2 years ago)
- Topics: acurite, localweather, sdr, weather
- Language: Rust
- Homepage:
- Size: 4.47 MB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weather Station
Program for collecting and processing weather data.
HUGE THANKS TO [WEEWX](http://weewx.com/) FOR DECODING THE VARIOUS MESSAGES FROM THE ACURITE DISPLAY
### Install program
```bash
cargo install yngvi --features standalone
```
### Config
| Name | Description | Default |
| -------------------------- | ------------------------------------------------------------------------------------------------ | ------- |
| YNGVI_SRC | determines where to pull data from. ACURITE_DISPLAY, RTL_433, or FILE | DISPLAY |
| YNGVI_SRC_FILE_PATH | path to file with source readings | |
| YNGVI_DEST | INFLUXDB, STDOUT, WEBHOOK, or INMEMORY | STDOUT |
| YNGVI_DEST_INFLUXDB_URL | influxdb url | |
| YNGVI_DEST_INFLUXDB_ORG | influxdb org | |
| YNGVI_DEST_INFLUXDB_BUCKET | influxdb bucket | |
| YNGVI_DEST_INFLUXDB_TOKEN | auth token for influxdb | |
| YNGVI_DEST_WEBHOOK_URL | url for the webhook | |
| YNGVI_DEST_WEBHOOK_HEADERS | headers to add to the webhook request. Ex: YNGVI_DEST_WEBHOOK_HEADERS=Authorization:Bearer 12342 | |
## Create your own
Any data source can be defined as `Iterator` and all destinations are defined with the `Writer` trait. YNGVI comes with some prebuilt readers and writers but it should be straight forward to define new data sources and new destination without touching any of the core station logic. Give it a try!
```bash
cargo add yngvi
```
```rust
use yngvi::core::{Station, StdoutWriter, FileReader};
#[tokio::main]
async fn main() {
// create a new weather station
let mut station = Station::new();
// define where your source data will come from
let reader = FileReader::new("data/source.txt");
// define where your calculated data will be written to
let mut writer = StdoutWriter::new();
// start your station!
station.start(reader, writer).await
}
```