【问题标题】:on_message is not working in pythonon_message 在 python 中不起作用
【发布时间】:2016-06-29 15:57:20
【问题描述】:

我正在使用 aws iot 并能够通过 shell 脚本获取终端更新的影子状态。但我能够获取 root@raspberrypi:~# ./aws_subscribe.py 与结果代码 0 以及 aws 连接iot home 我不同步错误 和i am following this blog

【问题讨论】:

    标签: aws-iot


    【解决方案1】:

    AWS 控制台上的“Shadow status”字段仅显示“reported”和“desired”状态是否相同,对功能没有影响。

    这是一个将状态显示为不同步的示例:

    {
      "reported": {
        "locked": true
      },
      "desired": {
        "locked": false
      }
    }
    

    本示例将它们显示为同步的位置。

    {
      "reported": {
        "locked": true
      },
      "desired": {
        "locked": true
      }
    }
    

    这就是它的全部内容。您可以通过发送以下 JSON 来完全删除“所需”状态,如果您这样做,它将始终显示为同步。

    {
      "desired": null
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-10
      • 2021-02-25
      • 2021-02-12
      • 2022-01-04
      • 2018-10-14
      • 1970-01-01
      • 1970-01-01
      • 2021-03-11
      相关资源
      最近更新 更多