n8n-nodes-open-sesame
v0.1.0
Published
n8n trigger node for SESAME smart lock events via AWS IoT MQTT
Downloads
101
Maintainers
Readme
n8n-nodes-open-sesame
A custom n8n trigger node that detects SESAME smart lock (CANDY HOUSE) lock/unlock events in real time.
It subscribes to Sesame device shadow updates via AWS IoT MQTT over WebSocket, enabling instant detection of lock/unlock events.
Installation
- Open your n8n instance
- Go to Settings > Community Nodes
- Enter
n8n-nodes-open-sesameand click Install
Alternatively, install via CLI:
# In your n8n installation directory
npm install n8n-nodes-open-sesameSetup
1. Get Your Sesame Device UUID
Open the device settings in the Sesame app and find your UUID.
2. Configure Credentials in n8n
- Start n8n
- Go to Credentials > New > Sesame API
- Enter your device UUID(s) in Device UUID(s) (comma-separated for multiple devices)
3. Create a Workflow
- Add a Sesame Trigger node
- Select your Sesame API credential
- Choose an Event Filter:
All Events— both lock and unlockLocked Only— lock events onlyUnlocked Only— unlock events only
- Enable Emit Only On Change to trigger only when the state changes
- Connect downstream nodes (Slack, email, etc.)
Output Data
The trigger emits the following data:
{
"event": "locked",
"deviceUuid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"batteryVoltage": 5.92,
"batteryPercentage": 95,
"isBatteryCritical": false,
"position": 123,
"target": 0,
"isInLockRange": true,
"isInUnlockRange": false,
"timestamp": "2026-02-09T12:00:00.000Z",
"raw": {
"mechst": "e803..."
}
}Field Reference
| Field | Type | Description |
|---|---|---|
| event | "locked" | "unlocked" | Lock state |
| deviceUuid | string | Device UUID |
| batteryVoltage | number | Battery voltage (V) |
| batteryPercentage | number | Battery level (%) |
| isBatteryCritical | boolean | Low battery warning |
| position | number | Current lock position |
| target | number | Target position |
| timestamp | string | Event timestamp (ISO 8601) |
Slack Notification Example
Connect Sesame Trigger to a Slack node and use expressions like:
🔐 Sesame Lock Event
Event: {{ $json.event }}
Device: {{ $json.deviceUuid }}
Battery: {{ $json.batteryPercentage }}%
Time: {{ $json.timestamp }}Testing
MQTT Subscribe Test
You can verify the AWS IoT connection and topic subscription without n8n:
npm install
npx tsx test/subscribe.ts <DEVICE_UUID>The test runs through the following steps:
- Cognito Authentication — obtain temporary credentials
- MQTT Connection — WebSocket connection to the AWS IoT endpoint
- Topic Subscribe — subscribe to the device shadow topic
After a successful subscription, it enters a message-waiting state. Operating the lock via the Sesame app or physically will display lock state and battery information in real time. Press Ctrl+C to exit.
How It Works
- Obtains temporary credentials from AWS Cognito Identity Pool (unauthenticated public access)
- Subscribes to device shadow updates via AWS IoT MQTT over WebSocket
- Automatically refreshes credentials before expiration
- Parses the
mechstpayload to extract lock state and battery information
License
MIT
