Crates.io | nuki-rs |
lib.rs | nuki-rs |
version | 0.2.3 |
source | src |
created_at | 2024-01-02 23:07:16.832654 |
updated_at | 2024-01-04 12:52:35.239625 |
description | a rust implmentation for BLE API for Nuki Smart Lock |
homepage | |
repository | https://github.com/Kanksu/nuki-rs |
max_upload_size | |
id | 1086760 |
size | 45,973 |
Bluetooth API for Nuki Smartlock
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();
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();
see /example
.