MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.42k forks source link

How to connect my existing IoT Hub to this solution? #37584

Closed deepakkumpala closed 5 years ago

deepakkumpala commented 5 years ago

I have devices in field and they send data to IoT Hub. I would like to use the capabilities of accelerators on this IoT Hub. How can I connect?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AshokPeddakotla-MSFT commented 5 years ago

@kudlatiger Thanks for the feedback! We are currently investigating and will update you shortly.

AshokPeddakotla-MSFT commented 5 years ago

@kudlatiger Please check Use an existing IoT hub with the Device Simulation solution accelerator and let us know if that helps.

dominicbetts commented 5 years ago

@kudlatiger - which solution accelerator(s) are you interested in using with your existing devices and hub? By default, the remote monitoring solution accelerator deploys a new IoT Hub - however the deployment is customizable if you make changes in the VM to modify the connection strings the Docker image uses. However, your particular scenario isn't documented. As an alternative, is it possible to reconfigure your devices to use a different IoT hub (i.e the hub that's deployed as part of the solution accelerator)?

deepakkumpala commented 5 years ago

Thanks @dominicbetts

No we can not change existing IoT hub.

Also, naming conventions of resources generated in solution accelerator is random and it violates our product naming conventions.

It would be great feature if we can plug in existing IoT Hubs to accelerators

ppathan commented 5 years ago

@kudlatiger As @dominicbetts suggested you can deploy the RM app and change the connection string to point to your IoT hub. This will be a manual step from the VM.

dominicbetts commented 5 years ago

@kudlatiger - I'm going to request that this issue is closed. Thanks for your interest in the Remote Monitoring solution accelerator. Feel free to reopen this issue or create a new one with any follow up questions.

please-close

deepakkumpala commented 5 years ago

@kudlatiger As @dominicbetts suggested you can deploy the RM app and change the connection string to point to your IoT hub. This will be a manual step from the VM.

Could u help me with steps?

dominicbetts commented 5 years ago

@kudlatiger - I have not fully tested these steps, but an outline of the process is as follows:

  1. Find the connection string of the IoT Hub you wish to use.
  2. In the Azure portal, find the resource group that contains the solution accelerator's resources.
  3. In this resource group, find the Device Provisioning Service instance. Add your IoT Hub to the list of "Linked IoT Hubs" and remove the IoT Hub that the solution accelerator deployment created.
  4. In the resource group, find the Key Vault instance. Add a new version of the iotHubConnectionString secret with the connection string for your IoT Hub.
  5. In the resource group, restart the Virtual Machine instance.
  6. The solution accelerator is now using your IoT Hub instance. When you've confirmed this you can delete the IoT Hub instance that the solution accelerator deployment created.
deepakkumpala commented 4 years ago

Thanks for detailed step, unfortunately i am trying these steps little late where as accelerator team seems to changed their resources. Now there is no DPS :(

Here are new set of resources got created when I create new "device simulator" from this link https://www.azureiotsolutions.com/Accelerators

image

Now, could u please help how do I link my existing IoT hub here?

Another challenge I face is, I get "Need admin approval" when I click the web app!

dominicbetts commented 4 years ago

The "device simulation" accelerator doesn't include an IoT Hub instance. The outline instructions above refer the the "remote monitoring" solution accelerator.

deepakkumpala commented 4 years ago

Okay, let me give a try now. Tonight somehow I want to make it work :)