Search code examples
watson-iot

Registering support for a custom device management extension in Node.js javascript


My goal is to define a new management extension in the Watson IoT Platform. I have read the following article:

https://console.ng.bluemix.net/docs/services/IoT/devices/device_mgmt/custom_actions.html

and have prepared my JSON document that describes the extension package. Using the curl tool, I also defined this extension within the IoT Platform and all is well. In order for a device to be able to receive such new management action commands, it appears that it must also publish a message stating what actions it is willing to support. See the section in the above document titled "Supporting custom device management actions". My problem is that my device is using the Node.js JavaScript libraries ... see https://github.com/ibm-watson-iot/iot-nodejs

Unfortunately, I can't see any mechanism or exposed API that would allow me to publish a message to MQTT topic "iotdevice-1/mgmt/manage" carrying the required payload.

If I were to hazard a guess, the exposed function called manage(lifetime, supportedDeviceActions, supportedFirmwareActions) would need an additional parameter that allows me to define the custom actions I am trying to add.


Solution

  • Looks like this is not currently in the client library, but was planned for a future enhancement. Thanks for submitting a pull request with file changes to include extensions in the Managed Device Client.