简体   繁体   English

智能家居操作中 StatusReport 特征的问题

[英]Problem with StatusReport trait in Smart Home Actions

I have a Security System with traits action.devices.traits.ArmDisarm and action.devices.traits.StatusReport and some other sensors: WaterLeak Sensor , Door Sensor...我有一个具有特征action.devices.traits.ArmDisarmaction.devices.traits.StatusReport和其他一些传感器的安全系统: WaterLeak SensorDoor Sensor ...

I report some errors about other devices with StatusReport state. For example: when the door sensor detects that the door is open, the security system must give deviceOpen error.我用StatusReport state报告了一些关于其他设备的错误。例如:当门传感器检测到门打开时,安全系统必须给出deviceOpen错误。

When I say, "Is my security system ok?"当我说, “我的安全系统还好吗?” , my server's response to the query intent is the JSON below, but Google Assistant says that he couldn't reach my action ( Unexpected error happened ). ,我的服务器对查询意图的响应是下面的 JSON,但是 Google Assistant 说他无法达到我的操作(发生意外错误)。

Is there anything wrong with this response?这个回应有什么问题吗?

{
  "requestId": "10417064006786362499",
  "payload": {
    "devices": {
      "3rL3QL7Kq2HrQjs53Y7o": {
        "isArmed": true,
        "currentStatusReport": [
          {
            "blocking": true,
            "deviceTarget": "4BCIpzBWpgLA24mMI7r2",
            "priority": 0,
            "statusCode": "deviceOpen"
          },
          {
            "blocking": true,
            "deviceTarget": "MxRCd6ERRSWzYzyNTE8S",
            "priority": 0,
            "statusCode": "waterLeakDetected"
          }
        ],
        "status": "EXCEPTIONS",
        "online": true
      }
    }
  }
}

In Firebase Console there are no errors.在 Firebase 控制台中没有错误。

Logs in Firebase Console登录Firebase控制台

Your response to the query intent looks right, but there might be an error in other parts of the process.您对查询意图的响应看起来是正确的,但流程的其他部分可能存在错误。 You can follow the Troubleshooting Guide to see how your failed intent is counted in the Smart Home metrics and what are the details on your logs.您可以按照故障排除指南查看智能家居指标中如何计算失败的意图以及日志中的详细信息。 (Firebase logs only gives info about your server. The logging mentioned in the guide (Google Cloud Logging) is a different and more comprehensive for the intent handling) (Firebase 日志仅提供有关您的服务器的信息。指南中提到的日志记录(Google Cloud Logging)与意图处理不同且更全面)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM