azureiotazure-iot-hub

Can Azure IOT hub be used to read(Get) data from some devices?


In my case I have 1000+ of devices that stores activity inside. I need to send a http get request to this device to get those data in csv or json format and save it in a storage hosted on azure. Cab IOT hub require data using get request and can it be scheduled to read daily/weekly? What other azure services would you suggest to facilitated this scheduled reads?


Solution

  • You have not mentioned which the Azure IoT Hub scale tier is used. Basically there are two price groups such as Basic and Standard with a significant different cost and capabilities. The Basic tier offers only services for one-way communications between the devices and Azure IoT Hub.

    Based on that, the following scenarios can be used for your business case:

    1. Basic Tier (non event-driven solution) The device periodically pushes telemetry and non-telemetry messages based on the needs to the Azure IoT Hub, where the non-telemetry messages are routed to the Azure Function via the Service Bus Queue/Topic. Responsibility for this non-telemetry pipe is to persist a real device state in the database. Note, that the 6M messages will cost only $50/month. The back-end application can any time to query this database for devices state.

    2. Standard Tier (event-driven solution)* In this scenario you can use a Device Twin of the Azure IoT Hub to enable storing a real-device state in the cloud backend (described by @HelenLo). The device can be triggered by C2D message, changing a desired property, invoking a method or based on the device edge trigger to the action for updating a state (reported properties).

      The Azure IoT Hub has a capabilities to run your scheduled jobs for multiple devices.

      In this solution, the back-end application can call any time a job for ExportDevicesAsync to the blob storage, see more details here. Note, that the 6M messages will cost $250/month.

    As you can see the above each scenario needs to build a different device logic model based on the communications capabilities between the devices and Azure IoT Hub and back. Note, there are some limitations for these communications, see more details here.