OptionaloptionsOrClient: BoksClientOptions | BoksClientRetrieves the cached hardware info.
Retrieves the current Master Key (hex string).
ExperimentalBonds with the scale.
Connects to the Boks device and retrieves version information.
Converts a code type (Single <-> Multi).
The PIN code to convert.
The target type (Single or Multi).
Requests the number of active codes.
An object containing the count of master codes and other codes.
Creates a new master code at the specified index.
Creates a new multi-use code.
Creates a new single-use code.
Deletes a master code at the specified index.
Deletes a multi-use code.
Deletes a single-use code.
Disconnects from the Boks device.
Edits a master code at the specified index.
The index of the master code (0-9).
The new PIN code.
Fetches the full history from the Boks device.
OptionaltimeoutMs: numberTimeout between two history packets.
ExperimentalForgets the scale bonding.
Reads the current battery level (standard Bluetooth characteristic).
Battery level (0-100) or undefined if unreliable.
Reads detailed battery statistics (custom Boks characteristic).
Battery stats object or undefined if unreliable.
Requests the current status of the door (open or closed).
True if the door is open, false if closed.
Requests the number of logs stored in the device.
The number of logs.
ExperimentalGets raw sensor data from the scale.
ExperimentalGets the weight from the scale.
Initializes a factory-fresh Boks device with a Master Key seed. ⚠️ This operation is theoretical and risky. Use with caution.
The 32-byte seed for the Master Key (hex string or Uint8Array).
OptionalonProgress: (progress: number) => voidCallback for progress updates (0-100%).
True if initialization was successful.
Subscribes to all incoming packets.
Function called for every parsed packet received.
A function to unsubscribe.
Opens the door using the provided PIN code.
The PIN code to use.
True if the door opened successfully, false if the PIN was invalid.
Reactivates a disabled code.
The PIN code to reactivate.
Reboots the Boks device.
Regenerates the master key (Provisioning).
The new 32-byte master key (as hex string or Uint8Array).
OptionalonProgress: (progress: number) => voidCallback for progress updates (0-100%).
True if regeneration was successful, false otherwise.
Registers a specific NFC tag by its UID. Requires HW >= 4.0 and SW >= 4.3.3. Uses the derived Config Key.
The UID of the NFC tag (hex string, optional colons).
True if registered successfully, false if the tag already exists.
Starts an NFC tag scan sequence. Requires HW >= 4.0 and SW >= 4.3.3.
Timeout in milliseconds for the scan operation.
A promise resolving to an NfcScanResult containing the tagId and a register method.
Sets a configuration parameter.
The configuration parameters (type and value).
Sets the Master Key and derives the Config Key, or sets Config Key directly.
The 32-byte Master Key or 4-byte Config Key (as hex string or Uint8Array).
ExperimentalTares the scale.
If true, tares as empty. If false, tares as loaded.
Triggers a battery test on the device.
Unregisters a specific NFC tag by its UID. Requires HW >= 4.0 and SW >= 4.3.3. Uses the derived Config Key.
The UID of the NFC tag (hex string, optional colons).
True if unregistered successfully.
High-level controller for Boks devices. Manages version-specific logic, feature flags, and complex workflows.