nuki-rs

Crates.ionuki-rs
lib.rsnuki-rs
version0.2.3
sourcesrc
created_at2024-01-02 23:07:16.832654
updated_at2024-01-04 12:52:35.239625
descriptiona rust implmentation for BLE API for Nuki Smart Lock
homepage
repositoryhttps://github.com/Kanksu/nuki-rs
max_upload_size
id1086760
size45,973
(Kanksu)

documentation

README

nuki-rs

Crates.io Version docs.rs Crates.io License Crates.io Total Downloads

Bluetooth API for Nuki Smartlock

Usage

Pair

let mut nuki = NukiSmartLock::discover_pairable().await.unwrap();
nuki.pair("TestUser").await.unwrap();

// Save the credentials to file.
// The file contains the MAC adresse and the private key. 
nuki.save(&String::from("nuki-credentials.json")).unwrap();

Perform actions

The following actions can be performed: Perform one of the following actions:

  • Unlock,

  • Lock,

  • Unlatch,

  • LockAndGo,

  • LockAnGoUnlatch,

  • FullLock,

  • FobAction1,

  • FobAction2,

  • FobAction3

// Perfom unlock
use nuki_command::LockAction;

let nuki = NukiSmartLock::load(&String::from("nuki-credentials.json")).unwrap();
nuki.perform_lock_action(LockAction::Unlock, "TestUser").unwrap();

Example

see /example.

Commit count: 0

cargo fmt