| Crates.io | apcaccess |
| lib.rs | apcaccess |
| version | 0.2.0 |
| created_at | 2023-08-27 21:49:36.672576+00 |
| updated_at | 2024-10-16 15:50:20.124651+00 |
| description | A Rust implementation of apcaccess to get data from apcupsd. |
| homepage | https://github.com/JoeyEamigh/apcaccess-rs |
| repository | https://github.com/JoeyEamigh/apcaccess-rs.git |
| max_upload_size | |
| id | 956404 |
| size | 14,978 |
A Rust library allowing access to the data provided by apcupsd.
use apcaccess_rs::{APCAccess, APCAccessConfig};
let apc = APCAccess::new(Some(APCAccessConfig { ..Default::default() }));
let data = apc.fetch().unwrap(); // returns a hashmap of the data
You can see possible keys in the resources folder based on your UPS.
fetch() will panic if your IP address is not valid.