azure-iot-hub python 软件包在过去 2 年里没有任何更新,并且依赖于已弃用的 azure-uamqp-python,该软件包无法在 Python 3.12+ 上的 Mac ARM 和 Linux ARM 等系统上构建。
那么,有什么替代方案可以替代吗?
参考: https://github.com/ansible-collections/azure/pull/1512
编辑: 目前我对此没有问题。我正在寻找替代方案,以防可能从 Ansible 集合中删除此包。
以下步骤概述了如何使用 Azure CLI 命令设置 Azure IoT 中心和管理设备:
az login
az iot hub create --name <hub_name> --resource-group <resource_group_name> --sku S1
创建设备:
az iot hub device-identity create --hub-name <hub_name> --device-id <device_id>
列出设备:
az iot hub device-identity list --hub-name <hub_name>
az iot hub device-twin show --device-id <device_id> --hub-name <hub_name>
请参阅此文档以使用 Azure CLI 获取和更新设备孪生属性。
更新设备孪生:
az iot hub device-twin update --device-id
[--add]
[--auth-type {key, login}]
[--desired]
[--etag]
[--force-string]
[--hub-name]
[--login]
[--remove]
[--resource-group]
[--set]
[--tags]