tplinker 0.1.0

Interface to TPLink smart devices such as HS100, HS110 and LB110
Documentation

TPLinker

A rust library to query and control TPLink smart plugs and smart lights.

Inspired and influenced by pyHS100 and hs100api.

Work in progress

Usage

Discovery:

use tplinker::discovery::discover;

fn main() {
  for (addr, device) in discover().unwrap() {
    let sysinfo = device.sysinfo();
    println!("{}\t{}\t{}", addr, sysinfo.alias, sysinfo.hw_type);
  }
}

Devices

let plug = HS100::new("192.1.1.10:9999")?;
plug.is_on()
plug.switch_on()