0

I am using node red (node-red-contrib-azure-iot-hub) to register the new devices on Azure IoT Hub. The 'Azure IoT Hub Registry' node allows to register new IoT device. I want to set a Parent Device for the new device that I am creating. However, I am not sure what parameter I should use to set the parent for this new IoT device. Please help.

1 Answers1

1

I guess you are talking about creating a new downstream device in scenarios where parent device is Edge device?

If so, the property is called 'deviceScope' that should be set. Currently, SDK does not support this(it is in a preview, so not yet released).

This is the commit for C# SDK, so I would assume that in order to have full support you have to wait a little bit more.

kgalic
  • 2,441
  • 1
  • 9
  • 21
  • 1
    You are correct, this is currently a public preview feature and it is only supported in the C# public preview branch. We will add this functionality to the Node SDK soon. With that said, node-red-contrib-azure-iot-hub is a community project and we do not control the release schedule. – Yi Zhong - MSFT Apr 16 '19 at 17:01
  • Great, can you or the author please mark it as an answer in that case? Thanks! – kgalic Apr 16 '19 at 17:41
  • Thank you for your answers and explanation. I am living with the following constraints. I have a gateway that I have represented as Edge device. I have further downstream devices that will connect to Azure through the gateway. I would need to add these downstream devices as 'IoT devices' to the platform. My gateway communicates over MQTT and I dont have a luxury to make a change to the gateway code. Will appreciate if you can suggest a work around. – Abdul Allana Apr 17 '19 at 04:35
  • Can you please suggest what could be the possible value-format for the 'deviceScope'. I tried '' and also '"ms-azure-iot-edge://. However, in both the cases it fails to create the device. – Abdul Allana Apr 17 '19 at 04:45
  • How did you create the device? Can you share the code? I would advise avoiding creating a device identity from the device itself. That is a serious security issue. Either do it through the cloud, or by using DPS(the best option). I am also hoping that DPS will provide a mechanism to resolve that, as it is advertised with 'zero-touch' provisioning, but till then I think it is not clear how this would/should be used. – kgalic Apr 19 '19 at 20:29
  • I am using node red (node-red-contrib-azure-iot-hub) to register the new devices on Azure IoT Hub. The 'Azure IoT Hub Registry' node allows to register new IoT device. I got to know that node-red-contrib-azure-iot-hub is third party component and doesn't yet support to set the parent for this new IoT device. Thank you all for your help. – Abdul Allana Apr 23 '19 at 11:02
  • Great. Can you please mark my comment above as an answer? Thanks! – kgalic Apr 23 '19 at 11:06