【发布时间】:2019-11-20 13:34:00
【问题描述】:
我有一个设备,它是 Azure IoT 中心的 mqtt 客户端,并希望通知设备有关该设备的设备孪生中的更改/更新。
我已经从设备成功连接并更新了 device-twin 中的 reported 值,但是当我更改某些在 Azure shell (https://shell.azure.com/) 的 device-twin 中desired 属性,使用如下命令:
az iot hub device-twin update -n <myIotHubBame> -d <myDeviceId> --set properties.desired='{"foo":"bar"}'
在我尝试订阅 $iothub/twin/res/# 和 devices/<myDeviceId>/messages/devicebound/# 的设备上,但在从 Azure shell 发出 az 命令后没有收到任何消息。
我还尝试使用 Data Source = Twin Change Events 和 Endpoint = event 设置 message route,但在设备。
有人对如何在设备孪生中的属性发生更改时向设备发出通知有任何建议吗?
【问题讨论】:
标签: azure mqtt azure-iot-hub