CameraStream 特性不接受 PIN 验证

CameraStream trait doesn't accept PIN verification

我构建了一个通过后端连接到 Google 智能家居的摄像头设备。相机支持两个特征:StartStop 和 CameraStream。一切正常。然后我按照 doc.

中的描述通过 PIN 添加了二级用户验证

令我惊讶的是,PIN 验证流程适用于 StartStop 特征,但不适用于 CameraStream 特征。这是 CameraStream 特征的流程:

用户:“好的Google,开始在 Chromcast 上播放我的相机。”

后台服务器请求:

{"inputs":[{"context":{"locale_country":"US","locale_language":"en"},"intent":"action.devices.EXECUTE","payload":{"commands":[{"devices":[{"id":"5Nj7kxkKtKvafh9vIIrh"}],"execution":[{"command":"action.devices.commands.GetCameraStream","params":{"StreamToChromecast":true,"SupportedStreamProtocols":["progressive_mp4","hls","dash","smooth_stream"]}}]}]}}],"requestId":"3521441653474018354"}

来自后台服务器的响应:

{"requestId":"3521441653474018354","payload":{"commands":[{"ids":["5Nj7kxkKtKvafh9vIIrh"],"status":"ERROR","errorCode":"challengeNeeded","challengeNeeded":{"type":"pinNeeded"}}]}}

Google小助手:“抱歉,XY目前似乎不可用”。

相同的顺序非常适用于特征 StartStop:Assistant 要求输入 PIN,然后执行 start/stop 操作。当我从 CameraStream 特性中删除 PIN 验证时,它也可以正常工作。 docs claims那个

Secondary user verification is supported for all device traits

但在我看来,PIN 验证不适用于 CameraStream 特性。有任何想法吗?谢谢。

编辑: 我正在添加同步响应:

{"requestId":"418316574813841981","payload":{"agentUserId":"X0ylRhM6yrOG1rVJ9RoPEz12FOR2","devices":[{"id":"5Nj7kxkKtKvafh9vIIrh","type":"action.devices.types.CAMERA","traits":["action.devices.traits.StartStop","action.devices.traits.CameraStream"],"name":{"name":"Camera1"},"willReportState":false,"attributes":{"pausable":false,"cameraStreamSupportedProtocols":["hls"],"cameraStreamNeedAuthToken":false},"deviceInfo":{"manufacturer":"ALIGATOR","model":"S4090","hwVersion":"8.1.0","swVersion":"2.4.3"}}]}}

我使用通用的 Cast 接收器。

CameraStream 特征的二级用户验证已经完成,现在 运行。目前,与 Google 智能助理兼容的所有设备和特征都可以进行二级用户验证。有关如何解决启用辅助用户验证的更多信息,请参见 here