AWS Lambda middleware — Yealink desk phone DSS key unlocks front door via LenelS2 Elements API
Find a file
Adam Moussa 8eb93536ad Add display settings to door-unlock template and update README
- Backlight dims to level 1 after 5 min, never fully sleeps
- Screensaver and power saving disabled
- README updated with T54W references and SP template manual steps
2026-04-22 20:01:09 -04:00
bin Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
lambda Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
lib Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
.gitignore Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
cdk.json Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
door-unlock-plan.md Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
package-lock.json Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
package.json Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
README.md Add display settings to door-unlock template and update README 2026-04-22 20:01:09 -04:00
tsconfig.json Add door unlock API — Yealink DSS key triggers LenelS2 Elements TemporaryUnlock via API Gateway + Lambda 2026-04-22 14:36:55 -04:00
yealinkT54W-door-unlock-with-sp.ph.xml Add 3CX provisioning templates for Yealink T54W with door unlock key 2026-04-22 19:43:26 -04:00
yealinkT54W-door-unlock.ph.xml Add display settings to door-unlock template and update README 2026-04-22 20:01:09 -04:00

Sea Haven Door Unlock API

AWS Lambda middleware that allows a Yealink T54W desk phone to unlock the front door controlled by LenelS2 Elements. Press a DSS key on the phone, and the door unlocks.

Yealink T54W → HTTPS GET → API Gateway → Lambda → LenelS2 Elements API → Door Unlocks

Architecture

  • API Gateway (HTTP API) — single GET /unlock endpoint with throttling (5 burst / 2 sustained req/sec)
  • Lambda (Node.js 20.x) — validates a shared auth token, calls the Elements TemporaryUnlock command
  • SSM Parameter Store — stores the Elements API key, auth token, and door device ID
  • Custom Domain — doorunlock.seahaven.com via Route 53 + ACM wildcard cert

SSM Parameters

Parameter Type Description
/seahaven/door-unlock/elements-api-key SecureString LenelS2 Elements API key
/seahaven/door-unlock/auth-token SecureString Shared secret embedded in the Yealink DSS key URL
/seahaven/door-unlock/door-id String Elements device ID for the front door reader

Deployment

npm install
npx cdk deploy

Phone Configuration

Configure a DSS key on the Yealink T54W (via phone web UI or 3CX):

  • Type: URL
  • Label: Unlock Door
  • Value: https://doorunlock.seahaven.com/unlock?token=<auth-token-value>

3CX Provisioning Templates

Two custom 3CX templates for the Yealink T54W are included. Both have the door unlock URL hardcoded on line key 2.

Template Line Key 2 Keys 3-5 Display
yealinkT54W-door-unlock.ph.xml Unlock Door Managed by 3CX BLF Dim after 5 min, never sleep
yealinkT54W-door-unlock-with-sp.ph.xml Unlock Door Shared Parking SP1-3 Needs manual changes (see below)

Manual changes needed for the SP template

Apply these display/power settings to yealinkT54W-door-unlock-with-sp.ph.xml:

  • Line 2336: phone_setting.inactive_backlight_level = → phone_setting.inactive_backlight_level = 1
  • Line 2339: phone_setting.backlight_time = %%blktime%% → phone_setting.backlight_time = 300
  • Line 2435: screensaver.type= 1 → screensaver.type= 0
  • Line 2445: screensaver.type= 1 → screensaver.type= 0
  • Line 22028: features.power_saving.enable = 1 → features.power_saving.enable = 0
  • Line 22046: screensaver.wait_time= %%scrsavertime%% → screensaver.wait_time= 0