Azure / dps-keygen

Helper tool to deal with the device keys :closed_lock_with_key:
MIT License
24 stars 16 forks source link

Command to get the service connection string #5

Closed saikumaru closed 5 years ago

saikumaru commented 5 years ago

hi,

Can someone advice how do I get to see the underlying "Service Connection String" associated with the IoT hub, under which a particular device has been provisioned through IoT central?

I am able to create the "device connection string" fine, but need to know the above please.

Thanks and regards,

obastemur commented 5 years ago

The connection string you got is the connection string to iothub.

saikumaru commented 5 years ago

Pardon me, but aren't there two types of connection strings related to an IoT hub? Can you please let us know how to view both of these. I'd like to use this string at the cloud to send message to the device.

In short I need to accomplish C2D and would like to extract the suitable connection string for this purpose.

sandeeppujar commented 5 years ago

What type of C2D message do you need to send ? IoT Central supports Commands and Settings that are essentially the patterns to do C2D messages (documentation here)

paolerm commented 5 years ago

Currently we don't expose IoT hub connection string, the only way to send C2D message is using Commands and Setting.

saikumaru commented 5 years ago

Thank you very much for your replies. Would you know if there is any plans to do that in the near future, i.e. being able to trigger C2D device-methods? Or is there anyone we can reach out to know if this feature is in the pipeline? We have some interesting usecases, and this Saas should be a very good fit

sandeeppujar commented 5 years ago

We already support C2D device-methods (Commands). Here is the documentation for how to use Commands - https://docs.microsoft.com/en-us/azure/iot-central/tutorial-define-device-type#use-commands. We would love to help you with your scenarios, please don;t hesitate to reach out.

saikumaru commented 5 years ago

Thank you Sandeep, I am aware of commands and settings being a way to execute C2D.

But we need this programmatically done, i.e., send a C2D via Azure function or any backend application. Which is currently not possible for devices provisioned through IoT-central.

Thanks again.

sandeeppujar commented 5 years ago

Got it, just to confirm, would it work if you define a command or a setting in IoTCentral for a device and then potentially use an IoTCentral API to trigger this command/setting ?.

We have API/Programmatic access in our road map.

saikumaru commented 5 years ago

That's great! It would be a sufficiently good solution for what we would need, although with manual mapping of APIs of each device.

More elegantly, it would also help to have an API exposed at Device-set level too. With possibility of passing device-id as parameter.

Being optimistic here, how early could it be available?

sandeeppujar commented 5 years ago

Got it, let me get back to you on the timeline.

If you haven't already I suggest you post this on our user voice. That will help us bump up the priority :).

saikumaru commented 5 years ago

Thank you Sandeep!

I had it up on uservoice/feedback couple of days ago. Just bumped it up now with additional data.

https://feedback.azure.com/forums/911455-azure-iot-central/suggestions/36305668-allow-to-send-c2d-messages-from-function-and-ui

obastemur commented 5 years ago

Looks like we got this issue is answered. Closing for now