首页 > 解决方案 > 如何允许 AWS IOT python SDK 与多个“事物”通信

问题描述

我可以Thing通过下载AWS connection kit. 遵循以下步骤;

从 AWS account > Services > AWS IOT > onboard > Get started > 点击get started,选择 Linux VM 和 Python SDK,点击 NEXT;

之后的第一步是Choose a thing,我只能选择单个事物。这意味着我将获得的连接套件只能与那个单一的东西交谈。有什么方法可以让我的 python 脚本通过提供 ARN 端点来发布和订阅多个东西的单一证书?

myAWSIoTMQTTClient.publish("arn:aws:iot:us-east-2:xxxxxxxxxxxx:thing/Thing1", "topic_1", "Hello thing 1")
myAWSIoTMQTTClient.publish("arn:aws:iot:us-east-2:xxxxxxxxxxxx:thing/Thing2", "topic_1", "Hello thing 2")
myAWSIoTMQTTClient.publish("arn:aws:iot:us-east-2:xxxxxxxxxxxx:thing/Thing3", "topic_1", "Hello thing 3")

标签: pythonamazon-web-servicesiotaws-iot

解决方案


推荐阅读