#nuki #smart-home #action #private-key #smartlock

nuki-rs

a rust implmentation for BLE API for Nuki Smart Lock

6 releases

0.2.3 Jan 4, 2024
0.2.2 Jan 3, 2024
0.1.1 Jan 2, 2024

#232 in Authentication

Download history 54/week @ 2023-12-31 1/week @ 2024-01-07 2/week @ 2024-02-11 127/week @ 2024-02-18 1/week @ 2024-02-25 14/week @ 2024-03-10 1/week @ 2024-03-17 90/week @ 2024-03-31

105 downloads per month

MIT license

45KB
963 lines

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.

Dependencies

~26–64MB
~761K SLoC