apcaccess

Crates.ioapcaccess
lib.rsapcaccess
version0.1.3
sourcesrc
created_at2023-08-27 21:49:36.672576
updated_at2023-08-30 18:56:25.928877
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,691
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: 4

cargo fmt