6

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!

juvchan
  • 6,113
  • 2
  • 22
  • 35
Ravi Solanki
  • 87
  • 1
  • 9
  • 1
    What do you mean with "basics of how .NET works in IoT"? – wuerzelchen Mar 22 '16 at 09:33
  • How I can connect to IOT hubs using asp.net and perform devices management? – Ravi Solanki Mar 22 '16 at 11:52
  • You can manage your devices with this tool pretty easy: https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md Or you have the option to develop your own against the IoT Hub Api: https://azure.microsoft.com/en-gb/documentation/articles/iot-hub-sdks-summary/ What do you want to do with ASP.NET? I would recommend to use Stream Analytics to process your Stream of data, to some DB. And then use ASP.NET to show this data as u might already know it. – wuerzelchen Mar 22 '16 at 13:25
  • I want to show data of the connected devices in chart format. And also want to create device from asp.net and I that device should connect to my azure iot hub. – Ravi Solanki Mar 22 '16 at 13:46

4 Answers4

5

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.

CSharpRocks
  • 6,791
  • 1
  • 21
  • 27
3

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.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • As per myunderstanding by your answer is If I will create a Azure IOT suites with provisioned solution then it will create many services and one it service that is Azure IOT hub which will automatically create and I don't need to create that. Am I right? – Ravi Solanki Mar 22 '16 at 11:49
  • @RaviSolanki No, you need an IoT hub setup first (I think) – Jnr May 02 '17 at 13:31
0

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.

wuerzelchen
  • 252
  • 1
  • 11
0

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

neolursa
  • 432
  • 2
  • 6