mirror of
https://github.com/koush/scrypted.git
synced 2026-08-02 19:31:34 +01:00
* fix(alexa): v3 API compliance fixes, fan speed, and security panel control Bring the Alexa Smart Home integration in line with the current v3 API. Tier 1 (malformed responses / missing handlers): - BrightnessController: report brightness under the Alexa.BrightnessController namespace instead of Alexa.PowerController so Set/AdjustBrightness responses match the advertised capability. - SmartVision ObjectDetection: flatten the doubly-nested payload.events array. - SecurityPanelController: add Arm/Disarm directive handlers (previously advertised but unhandled, silently falling through to a fake success), wired to armSecuritySystem/disarmSecuritySystem. Enforce the spec rule rejecting a direct ARMED_AWAY -> other armed-state transition with AUTHORIZATION_REQUIRED. Drop the advertised FOUR_DIGIT_PIN authorization, which Scrypted cannot honor. - Auth failures now return an Alexa INVALID_AUTHORIZATION_CREDENTIAL ErrorResponse instead of a bare HTTP 500 that Alexa retries and surfaces as a generic skill error. API modernization: - EndpointHealth: downgrade to the documented v3.1 / connectivity-only shape and stop emitting the undocumented battery property (and 3.2 version), which risks the whole capability being rejected. - Fan: add Alexa.RangeController (Fan.Speed, 0-100%) for devices implementing the Fan interface, alongside the existing PowerController on/off. Cleanups: - addAccessToken: initialize event.endpoint as an object, not an array. - Hoist getArmState to a shared export instead of duplicating it. Bump version to 0.4.0. * fix(alexa): improve camera stream quality and connectivity Tune the WebRTC negotiation for Alexa camera sessions. - Resolution: raise the proxied stream cap from 720p to 1080p. The previous 1280x720 screen hint forced the transcoder into medium-resolution mode for every endpoint, so even an Echo Show 15 or Fire TV only received 720p. 1080p lets larger displays render sharply while the transcoder still clamps width and falls back to 720p when H.264 High can't be negotiated. We cap rather than send the uncapped source, since Alexa's directive carries no display hint and a 4K stream would waste bandwidth on smaller Echo devices. - Two-way audio: only advertise isFullDuplexAudioSupported when the camera implements the Intercom interface. Advertising full duplex on a one-way camera makes Alexa set up a return mic path that goes nowhere. - TURN: stop unconditionally disabling TURN, and expose a "Use TURN Servers" plugin setting (on by default). Alexa sessions are proxied and often cross NATs where a TURN relay is the only path that connects; combined with disabled trickle ICE (all candidates in the initial SDP), omitting the relay candidate left NAT-blocked sessions with no fallback. When enabled, TURN usage defers to the WebRTC plugin's own setting, matching the Google Home integration; disabling it force-disables TURN for Alexa sessions only. Bump version to 0.5.0.
48 lines
1.3 KiB
JSON
48 lines
1.3 KiB
JSON
{
|
|
"name": "@scrypted/alexa",
|
|
"version": "0.5.0",
|
|
"scripts": {
|
|
"scrypted-setup-project": "scrypted-setup-project",
|
|
"prescrypted-setup-project": "scrypted-package-json",
|
|
"build": "scrypted-webpack",
|
|
"prepublishOnly": "scrypted-changelog && NODE_ENV=production scrypted-webpack",
|
|
"prescrypted-vscode-launch": "scrypted-webpack",
|
|
"scrypted-vscode-launch": "scrypted-deploy-debug",
|
|
"scrypted-deploy-debug": "scrypted-deploy-debug",
|
|
"scrypted-debug": "scrypted-debug",
|
|
"scrypted-deploy": "scrypted-deploy",
|
|
"scrypted-changelog": "scrypted-changelog",
|
|
"scrypted-package-json": "scrypted-package-json",
|
|
"scrypted-readme": "scrypted-readme"
|
|
},
|
|
"keywords": [
|
|
"scrypted",
|
|
"plugin",
|
|
"alexa",
|
|
"amazon"
|
|
],
|
|
"scrypted": {
|
|
"name": "Alexa",
|
|
"type": "API",
|
|
"interfaces": [
|
|
"HttpRequestHandler",
|
|
"MixinProvider",
|
|
"Settings"
|
|
],
|
|
"pluginDependencies": [
|
|
"@scrypted/cloud",
|
|
"@scrypted/webrtc"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.3.4",
|
|
"uuid": "^9.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@scrypted/common": "../../common",
|
|
"@scrypted/sdk": "../../sdk",
|
|
"@types/debug": "^4.1.12",
|
|
"@types/node": "^22.13.11"
|
|
}
|
|
}
|