This project provides a local server replacement for the Sense sleep tracking device, enabling continued functionality through HomeKit integration via Homebridge.
- Local Server: An Express.js server that mimics the original Sense API
- Homebridge Plugin: Modified version of homebridge-sense to work with the local server
- DNS Redirect: Redirects device API requests to the local server
- Node.js v16 or later
- Homebridge
- Sense sleep tracking device
- DNS server (to redirect API requests)
- Clone this repository
- Install dependencies:
npm install- Install the Homebridge plugin:
npm install -g homebridge-sense-local- Configure your DNS server to redirect Sense API requests to the local server:
- hello-sense.com -> localhost:3000
- api.hello.is -> localhost:3000
- time.hello.is -> localhost:3000
Add this to your Homebridge configuration:
{
"platforms": [
{
"name": "Sense Device",
"email": "demo@example.com",
"password": "demo123",
"updateInterval": 10,
"platform": "SenseLocal"
}
]
}- Start the local server:
npm run server- Ensure Homebridge is running with the plugin installed
- The Sense device should automatically connect to the local server
POST /v2/devices/sense/register: Device registrationPOST /v2/devices/sense/:device_id/data: Sensor data submissionGET /v2/devices/sense/:device_id/sensors: Get latest sensor dataGET /v2/devices/sense/:device_id: Get device informationGET /v2/devices: List all registered devices
src/server: Local API server implementationhomebridge: Homebridge plugin