apcaccess

Crates.ioapcaccess
lib.rsapcaccess
version0.2.0
sourcesrc
created_at2023-08-27 21:49:36.672576
updated_at2024-10-16 15:50:20.124651
descriptionA Rust implementation of apcaccess to get data from apcupsd.
homepagehttps://github.com/JoeyEamigh/apcaccess-rs
repositoryhttps://github.com/JoeyEamigh/apcaccess-rs.git
max_upload_size
id956404
size14,978
Joey Eamigh (JoeyEamigh)

documentation

https://github.com/JoeyEamigh/apcaccess-rs

README

apcaccess-rs

A Rust library allowing access to the data provided by apcupsd.

Usage

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.

Commit count: 9

cargo fmt