@jackietreeh0rn/homebridge-smartrent
v1.4.0
Published
Homebridge plugin for SmartRent installations
Maintainers
Readme
The most comprehensive SmartRent Homebridge integration to date, Homebridge Verified. Control your SmartRent devices with Apple Home: supporting 6 device types w/ real-time updates, battery monitoring, and advanced status reporting.
Supported Devices
| Device | HomeKit Service | Capabilities | | ----------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | 🔒 Locks | LockMechanism + Battery | Lock/unlockBattery levelLow battery alertsJam detectionAuto-lock timer | | 🌡️ Thermostats | Thermostat + Fan | Mode control (heat/cool/auto/aux heat)TemperatureHumidityFan modeReal-time operating state | | 💧 Leak Sensors | LeakSensor + Battery | Leak detectionBattery levelLow battery alerts | | 🔍 Motion Sensors | MotionSensor | Motion detectionReal-time updates | | 🔌 Switches | Switch | On/off control | | 💡 Dimmers | Lightbulb | On/off controlBrightness control |
All devices report online/offline status via the StatusActive characteristic.

Architecture
graph TD
Home["🏠 Apple Home"]
subgraph Homebridge
platform["<b>SmartRentPlatform</b><br>DynamicPlatformPlugin"]
accessories["<b>Accessories</b><br>Lock · Thermostat · Leak<br>Motion · Switch · Dimmer"]
end
subgraph SmartRent Cloud
rest["<b>REST API</b><br>control.smartrent.com/api/v3"]
ws["<b>WebSocket</b><br>Phoenix protocol<br>real-time state updates"]
auth["<b>OAuth + TOTP</b><br>authentication/sessions"]
end
Home <-->|"HomeKit"| accessories
platform --> accessories
platform -->|"device discovery<br>state commands"| rest
platform <-->|"heartbeat 30s<br>attribute events"| ws
platform -->|"email/password<br>+ optional 2FA"| auth
auth --> rest
auth --> wsFeatures
- Real-time updates — WebSocket connection with Phoenix heartbeat for instant state changes across all devices
- 6 device types — Locks, thermostats, leak sensors, motion sensors, switches, and dimmers
- Accurate HVAC status — Uses the thermostat's actual operating state (heating/cooling/idle), not just the target mode
- Lock jam detection — Detects and reports lock jams via SmartRent notification events
- Battery monitoring — Battery level and low-battery alerts for locks and leak sensors
- Device online/offline status — Reports device reachability for all device types
- Two-factor authentication — Full TOTP support for secured SmartRent accounts
- Auto-lock — Configurable timer to automatically re-lock after unlocking
- Per-device toggles — Enable or disable any device type independently via config
Installation
Install Homebridge, add it to Apple Home, then install and configure Homebridge SmartRent.
Recommended
Open the Homebridge UI.
Open the Plugins tab, search for
homebridge-smartrent, and install the plugin.Log in to SmartRent through the settings panel, and optionally set your unit name.
Manual
Install the plugin using NPM:
npm i -g @jackietreeh0rn/homebridge-smartrentConfigure the SmartRent platform in
~/.homebridge/config.jsonas shown inconfig.example.json.Start Homebridge:
homebridge -D
Configuration
| Property | Type | Default | Description |
| ------------------------- | ------- | ------------ | ---------------------------------------------------------------------------------------------------- |
| email | string | required | SmartRent account email |
| password | string | required | SmartRent account password |
| tfaSecret | string | | 32-character TOTP seed for two-factor authentication |
| unitName | string | | Unit name — only needed if you have multiple units. Find it in the SmartRent app under the More tab. |
| enableLocks | boolean | true | Enable lock accessories |
| enableThermostats | boolean | true | Enable thermostat accessories |
| enableLeakSensors | boolean | true | Enable leak sensor accessories |
| enableMotionSensors | boolean | true | Enable motion sensor accessories |
| enableSwitches | boolean | true | Enable switch accessories |
| enableSwitchMultiLevels | boolean | true | Enable dimmer/multilevel switch accessories |
| enableAutoLock | boolean | false | Automatically re-lock after unlocking |
| autoLockDelayInMinutes | integer | 5 | Minutes to wait before auto-locking |
| excludeDevices | array | | List of SmartRent device IDs to exclude from HomeKit. Device IDs are shown in logs at startup. |
| lowBatteryThreshold | integer | 20 | Battery percentage at or below which devices report low battery status (5–50) |
| temperatureUnit | string | fahrenheit | Temperature display unit for thermostats (fahrenheit or celsius) |
| verboseLogging | boolean | false | Enable verbose debug logging for troubleshooting |
Development
Prerequisites
- Node.js 18.20.4+, 20.18.0+, 22.10.0+, or 24.0.0+
- Homebridge 1.8.0+ or 2.0.0-beta+
Setup
npm install
npm run build
npm linkWatch Mode
Automatically recompiles and restarts Homebridge on source changes:
npm run watchThis runs a local Homebridge instance in debug mode using the config at ./test/hbConfig/. Stop any other Homebridge instances first to avoid port conflicts. The watch behavior can be adjusted in nodemon.json.
Linting & Formatting
npm run lint # check for lint errors
npm run lint:fix # auto-fix lint errors
npm run prettier # check formatting
npm run format # auto-fix formattingCommits must follow Conventional Commits — enforced by pre-commit hooks via commitlint and husky.
Troubleshooting
If you run into issues, check the Homebridge troubleshooting wiki first. If the problem persists, open an issue with as much detail as possible.
Contributing
See CONTRIBUTING.md for guidelines on bug reports, feature requests, and code contributions.
Useful Resources
Read the full write-up: Homebridge SmartRent & Blink — covers setup, configuration, and integration details for both plugins.
License
GNU GENERAL PUBLIC LICENSE, Version 3
Disclaimer
This project is not endorsed by, directly affiliated with, maintained, authorized, or sponsored by SmartRent Technologies, Inc or Apple Inc. All product and company names are the registered trademarks of their original owners. The use of any trade name or trademark is for identification and reference purposes only and does not imply any association with the trademark holder of their product brand.
