Get started
This page walks you through installing the library and running a minimal connect-and-stream example. For a step-by-step flow, see the Quick start guide.
What is it?
The library is a TypeScript client for the Web Bluetooth API that connects to force-sensing hangboards, dynamometers, plates, and LED system boards used by climbers. It supports devices such as:
- Hangboards: Griptonite Motherboard, Climbro, mySmartBoard
- Dynamometers: Tindeq Progressor, PitchSix Force Board, Frez Dyno, Weiheng WH-C06
- Scales / force plates: Entralpi
- LED system boards: Kilter Board, Tension Board, Grasshopper Board, Decoy Board, Touchstone Board, So iLL Board
- Other: NSD PB-700BT (gyroscopic hand exerciser)
The library is available in multiple flavors:
| Platform | Package | Use case |
|---|---|---|
| Web | @hangtime/grip-connect | Browsers using the Web Bluetooth API |
| Capacitor | @hangtime/grip-connect-capacitor | Hybrid mobile apps (iOS/Android) |
| React Native | @hangtime/grip-connect-react-native | Native mobile apps (Expo / RN) |
| Runtime | @hangtime/grip-connect-runtime | Node.js, Bun, or Deno programmatic adapter |
| CLI | @hangtime/grip-connect-cli | Ready-made command-line tool for scanning, streaming, and exporting data |
See Browser support for Web Bluetooth requirements and Platforms for platform-specific setup.
Prerequisites
- Web: Chrome, Edge, or Opera; HTTPS or localhost; connection must start from a user gesture (e.g. button click).
- Capacitor / React Native: Physical device (BLE does not work in simulators); native BLE plugin configured.
- Runtime / CLI: Node.js, Bun, or Deno; machine with Bluetooth and a supported device in range.
Installation
Install the package for your target platform.
npm install @hangtime/grip-connectnpm install @hangtime/grip-connect-capacitornpm install @hangtime/grip-connect-react-nativenpm install @hangtime/grip-connect-runtimenpm install -g @hangtime/grip-connect-cliPackages are also available on JSR.
Using from CDN
You can load the library via unpkg without a build step. Use the latest ESM bundle:
<script type="importmap">
{
"imports": {
"@hangtime/grip-connect": "https://unpkg.com/@hangtime/grip-connect@latest?module"
}
}
</script>
<script type="module">
import { Motherboard } from "@hangtime/grip-connect"
const device = new Motherboard()
// ...
</script>Or import the URL directly in a module script:
<script type="module">
import { Motherboard } from "https://unpkg.com/@hangtime/grip-connect@latest?module"
const device = new Motherboard()
// ...
</script>Pin a version
Replace @latest with a specific version (e.g. @1.2.3) in production to avoid unexpected updates.
Minimal example (Web)
After installing @hangtime/grip-connect, import the device class you need and connect.
import { Motherboard } from "@hangtime/grip-connect"
const device = new Motherboard()
// Optional: handle real-time data, for pounds: device.notify((data) => {}, "lbs")
motherboard.notify((data) => {
// { unit, timestamp, current, peak, mean, distribution? }
console.log(data)
})
// Optional: detect when user is pulling
device.active((isActive) => console.log("Active:", isActive), { threshold: 2.5, duration: 1000 })
document.querySelector("#connect").addEventListener("click", async () => {
await device.connect(
async () => {
const battery = await device.battery()
console.log("Battery:", battery)
await device.stream(30000) // stream for 30 seconds
device.disconnect()
},
(err) => console.error(err.message),
)
})<button id="connect" type="button">Connect Motherboard</button>HTTPS and user gesture
Web Bluetooth requires a secure context (HTTPS or localhost) and a user gesture (e.g. click) to start the connection. See Browser support.
Next: Quick start guide for a step-by-step flow, or Devices for device-specific APIs.