Crates.io | apcaccess |
lib.rs | apcaccess |
version | 0.1.3 |
source | src |
created_at | 2023-08-27 21:49:36.672576 |
updated_at | 2023-08-30 18:56:25.928877 |
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,691 |
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.