Doimus native plugin for Bold Smart Locks. A Bold Connect hub is required.
- Lock/unlock control via remote activation
- Auto-relock after device's activation timeout
- Bold Connect hub shown as switch (or lock via config)
- Automatic access token refresh
- Polls device list every 24h
Note: The recommended authentication method is the OAuth flow via the Doimus hub (see "OAuth Authentication Flow" above). The
accessToken/refreshTokenfields are only needed as a fallback for legacy setups.
| Field | Type | Default | Description |
|---|---|---|---|
accessToken |
string | — | Bold API access token (legacy fallback — use OAuth flow instead) |
refreshToken |
string | — | Bold API refresh token (legacy fallback — use OAuth flow instead) |
refreshURL |
string | built-in | Custom refresh URL (for custom auth backend) |
legacyAuthentication |
boolean | false |
Use legacy OAuth authentication |
showControllerAsLock |
boolean | false |
Show Bold Connect hub as lock instead of switch |
Locks expose:
| Capability | Description |
|---|---|
locked |
true = locked, false = unlocking |
active |
true while lock is activated/unlocked |
Bold Connect hubs expose:
| Capability | Description |
|---|---|
on |
true when activated |
This plugin uses OAuth2 to authenticate against the Bold API. The flow is brokered by the Doimus hub:
- User taps "Authenticate" on the plugin config screen in the mobile app.
- Mobile app calls hub →
GET /api/v1/auth/authorize-url?plugin_id=doimus-bold - Hub generates an OAuth authorize URL with
redirect_uri=https://doimus.com/callbackand a CSRFstatenonce. - System browser opens the Bold IdP authorization page.
- User logs in to their Bold account and grants access.
- Bold IdP redirects to
https://doimus.com/callback?code=xxx&state=yyy. - doimus.com/callback is a static page that immediately redirects to
doimus://auth/callback?code=xxx&state=yyyvia JavaScriptwindow.location.replace(). - Mobile app intercepts the
doimus://deep link and parses the auth code and state. - Mobile app calls hub →
POST /api/v1/auth/oauth/exchangewith{code, state}. - Hub validates the state nonce, exchanges the code with Bold's
/v2/oauth/token, and stores the encrypted tokens in SQLite. - Plugin sandbox receives tokens on next start via
api.getOAuthToken(). - Token refresh is handled transparently by the hub — the plugin never manages tokens directly.
The OAuth provider config lives in package.json under doimus.oauth:
| Field | Description |
|---|---|
authorization_url |
Bold IdP authorization page |
token_url |
Bold token exchange endpoint |
client_id |
Bold OAuth client ID |
client_secret |
Bold OAuth client secret |
redirect_uri |
Public HTTPS URL that forwards to doimus://auth/callback |
scopes |
OAuth scopes (empty = default) |
The plugin's resolveTokens() uses this priority:
api.getOAuthToken()— tokens injected by the hub (from the OAuth flow)accessToken/refreshTokenconfig fields — manual fallback for legacy setups
This plugin integrates with the Bold Smart Lock platform API. For reference when extending or debugging this plugin, see the official documentation:
Key endpoints used by this plugin:
| Endpoint | Method | Purpose |
|---|---|---|
/v1/effective-device-permissions |
GET | List accessible devices |
/v1/devices/{id}/remote-activation |
POST | Unlock/activate a lock |
/v2/oauth/token |
POST | OAuth token refresh (legacy flow) |
Authentication requirements per the official docs:
- Remote activation requires a
user-level session with theactivatescope - Tokens should be refreshed before expiration; always handle
401responses - Organization-level sessions can use API keys (Basic Auth) but cannot activate locks directly
This plugin is a port of homebridge-bold by Stefan Nienhuis. Thanks to Erik Nienhuis for reverse-engineering the Bold API.
MIT