adafruit_azureiot

Microsoft Azure IoT for CircuitPython

  • Author(s): Brent Rubell

Implementation Notes

Software and Dependencies:

class adafruit_azureiot.IOT_Hub(wifi_manager, iot_hub_name, sas_token, device_id)

Provides access to a Microsoft Azure IoT Hub. https://docs.microsoft.com/en-us/rest/api/iothub/

device_id

Returns the current device identifier

get_device()

Gets device information from the identity registry of an IoT Hub.

get_device_twin()

Returns the device’s device twin information in JSON format.

get_devices()

Enumerate devices from the identity registry of the IoT Hub.

get_hub_message()

Returns a message from a Microsoft Azure IoT Hub (Cloud-to-Device). Returns None if the message queue is empty. NOTE: HTTP Cloud-to-Device messages are throttled. Poll every 25+ minutes.

replace_device_twin(properties)

Replaces tags and desired properties of a device twin. :param str properties: Device Twin Properties.

send_device_message(message)

Sends a device-to-cloud message. :param string message: Message to send to Azure IoT.

update_device_twin(properties)

Updates tags and desired properties of the device’s device twin. :param str properties: Device Twin Properties (https://docs.microsoft.com/en-us/rest/api/iothub/service/updatetwin#twinproperties)