Skip to content

v2.12.2

Latest

Choose a tag to compare

@noelportugal noelportugal released this 19 Jun 01:24

Bug fixes

Token auto-refresh now triggers on Wyze's current expired-token signal (#52)

The core getDeviceList path (and 5 other methods) only refreshed on the legacy AccessTokenError message. Wyze now returns "access token is error" / code 2001, so tokens silently went stale and calls returned undefined — the root cause of the recurring "wyze stopped working."

  • Single isTokenError() helper matches all shapes (AccessTokenError, code 2001, ErrNo 2001), routed through all 9 refresh-and-retry sites.
  • Fixed getEventList/getEventVideoURL retrying the wrong method after refresh.

Snapshot capture exits cleanly + skips TURN by default (#53)

One-shot frame captures used to hang for the full timeout window.

  • Cancelable, unref'd capture deadline (no more leaked setTimeout).
  • pc.close() is now awaited; captures default to relay: 'never' (direct/STUN only — no werift TURN keepalive timer). { relay: 'auto' } escape hatch for off-network capture.
  • Frames now return in ~3.5s and the process drains on its own — no process.exit hack needed.

26/26 tests green across Node 18/20/22.