Azure IoT Service Spike

Architecture of AirCares

Architecture of AirCares

Summary of the POC

Notes of the Spike

  1. Basic concepts: events, insight and action: https://docs.microsoft.com/en-us/azure/architecture/example-scenario/iot/introduction-to-solutions
  2. Create a IoT Hub: https://www.youtube.com/watch?v=A4TKvsLu2Yw
  3. Quick start of IoT Hub: https://docs.microsoft.com/en-us/azure/iot-develop/quickstart-send-telemetry-iot-hub?pivots=programming-language-nodejs
    1. Get connection string of the IoT Hub: az iot hub connection-string show –hub-name ${nameOfIoTHub}
    2. Run a simulated device:
      1. Create a device
      2. run https://github.com/Azure/azure-iot-sdk-node/tree/master/device/samples/pnp
    3. Listen the message sent from the simulated device: az iot hub monitor-events –output table –device-id ${nameOfDevice) –hub-name ${nameOfIoTHub}
  4. Create logic layer to process events from IoT Hub: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-iot-trigger?tabs=csharp
  5. Use Azure Function
  6. Send Cloud to device message:
    1. Overview: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messaging
    2. Details: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-node-node-c2d
    3. Notes: the connectonString for device and service can only be used for specific purpose correspondingly.
  7. Azure loggin system

Leave a Reply

Your email address will not be published. Required fields are marked *