gloveboxes / Connecting-Particle-Photon-to-Azure-IoT-Hub

Connect Particle Argon or Photon directly to Azure IoT Hub and enjoy device to cloud, cloud to device messaging and direct method support
MIT License
9 stars 1 forks source link

Support for creating device and getting device connection string #1

Open skipfire opened 5 years ago

skipfire commented 5 years ago

Using the example I was up and running in no time, however it only works for 1 device that I manually create, how does this scale out? If I load my application onto a Particle it really needs to be able to send a message to the IoT Hub to create the device, or if it already exists get the device specific connection string. How does all that happen?

le-james commented 4 years ago

Hey skipfire,

Did you get the command portion of the example to work using callbackDirectMethod? I followed the example exactly but when I hit run button on Azure IoT Central side to turn on the led I get an error. Did the example code work your you? Publishing telemetry works perfectly but not the command from cloud to device.

Regarding your question, it would suck to manually create devices when scaling up the number of devices. I haven't found anything that would automatically create a device on Azure IoT Central besides: https://blog.particle.io/integrate-particle-with-azure-iot-central/. But this is only unidirectional communication, device to Azure IoT Central only.

skipfire commented 4 years ago

I never got the callback working consistently, it seemed like it would work randomly with a very low success rate (less than 1%).

I never found a way to handle the device registration part either, so I stopped using it.

le-james commented 4 years ago

If you don't mind me asking what other options did you look into besides this?

skipfire commented 4 years ago

None, I ended using the link from Particle Cloud which handled the missing functionality, it just doesn't allow for cloud to device messages. Eventually we abandoned trying to use particle for the project.