Ravi Solanki
Ravi Solanki

Reputation: 87

Azure IOT suites vs IOT hubs

what is difference between Azure Internet of things suites and Internet of things hubs and its usage? Please Tell me basics of how .NET works in Internet of things. Thanks for the help!

Upvotes: 6

Views: 2013

Answers (4)

neolursa
neolursa

Reputation: 432

Azure Iot Hub and Event Hubs are workloads that enable data ingestion to Microsoft Azure. So you may think of them as separate standalone modules on Azure.

IoT Suite, is an automation tool, that provisions multiple modules to provide a boiler plate for an end to end IoT solution. The modules include Stream Analytics, IoT Hub, Document DB, a custom Web App for device monitoring etc.

Below is some sample code for connecting a device in C#.

    // Define the connection string to connect to IoT Hub
private const string DeviceConnectionString = "<replace>";
static void Main(string[] args)
{
  // Create the IoT Hub Device Client instance
  DeviceClient deviceClient = DeviceClient.CreateFromConnectionString(DeviceConnectionString);

  // Send an event
  SendEvent(deviceClient).Wait();

  // Receive commands in the queue
  ReceiveCommands(deviceClient).Wait();

  Console.WriteLine("Exited!\n");
}
// Create a message and send it to IoT Hub.
static async Task SendEvent(DeviceClient deviceClient)
{
  string dataBuffer;
  dataBuffer = Guid.NewGuid().ToString();
  Message eventMessage = new Message(Encoding.UTF8.GetBytes(dataBuffer));
  await deviceClient.SendEventAsync(eventMessage);
}
// Receive messages from IoT Hub
static async Task ReceiveCommands(DeviceClient deviceClient)
{
  Console.WriteLine("\nDevice waiting for commands from IoTHub...\n");
  Message receivedMessage;
  string messageData;
  while (true)
  {
    receivedMessage = await deviceClient.ReceiveAsync(TimeSpan.FromSeconds(1));

    if (receivedMessage != null)
    {
      messageData = Encoding.ASCII.GetString(receivedMessage.GetBytes());
      Console.WriteLine("\t{0}> Received message: {1}", DateTime.Now.ToLocalTime(), messageData);
      await deviceClient.CompleteAsync(receivedMessage);
    }
  }
}

Hope this helps!

Mert

Upvotes: 0

wuerzelchen
wuerzelchen

Reputation: 252

Based on your answer below your question would be the approach like this:

IoTDevice -1-> IoT Hub -2-> StreamAnalytics -3-> DB -4-> ASP.Net (Shows Graph)
                   |             |
ASP.Net (Mgmt) -6--|             |-----5----> PowerBi (Shows Graph)

The Output for Nr.5 in Stream Analytics is just an option you could choose. So you don't need to develop your own Dashboard and would have a solution right away. You could also share this Dashboard with People.

Upvotes: 0

user793891
user793891

Reputation:

Azure IoT Suite is just an accelerator over IoT Hub. It provides complete applications using IoT Hub and other Azure services that you can customize. It can also be interesting as a learning tool since you get the source code for the Predictive Maintenance and the Remote Monitoring solutions.

You can of course build your own custom solution using IoT Hub and other Azure services.

Upvotes: 5

Gaurav Mantri
Gaurav Mantri

Reputation: 136136

Looking at the documentation here: https://azure.microsoft.com/en-in/documentation/articles/iot-suite-overview/, what I gather is that Azure IoT Suite is actually a combination of many services and one of the services (albeit the most important one) is Azure IoT Hub.

To me, Azure IoT Hub solves just one part of the problem which is to provide device-to-cloud and cloud-to-device messaging capabilities and acting as the gateway to the cloud and the other key IoT Suite services. So essentially think of this service as the service which facilitates communication between devices and the cloud. There are other services in Azure IoT Hub which deals with what you do with the data once it comes in the cloud. Other services enable you to store data at scale, develop and present analytics on that data.

Upvotes: 3

Related Questions