Include 3rd party device with custom MQTT payload using SmartRest

Hey colleagues,

I have devices that I want to include to cumulocity that are already able to receive/subscribe and send/publish device management data via MQTT. However, those MQTT messages are not conformant to cumulocity’s templates. I am wandering if there is a way to include them.

E.g. in order to set firmware on the device, with the device sdk the payload would need to be something like this:
“115,firmwarename,firmwareversion,firmwareurl”

But my device expects something like this:
“someID,type=firmware,name=fileNameOfFirmware,download=https,Url=someUrl”

So how can I add kind of custom MQTT templates to cumulocity so that the action of “set firmware” which is originally related to the template 115 triggers a custom MQTT payload?

I assume that this is a problem that many people already had to face, but unfortunately I could not find any hint so far

Thanks and BR

Hi Stephan,

I assume you are talking about specifying metainformation about the current firmware on the Cumulocity device representation for your registered device. If this is the case you can create custom SmartREST templates to extend the existing set of built-in static templates. Custom templates can either be created via MQTT or in the Cumulocity Device Management application.

Information about creating a custom template via MQTT can be found here. If you want to create custom templates in the Device Management application have a look here. I would suggest to have a look first at the Device Management application and how you can create custom templates using the UI as it is a bit easier compared to directly jump into creating custom templates using MQTT.

If you need an example just tell me and I can provide one.

Best regards
Christian

This topic was automatically closed after 1083 days. New replies are no longer allowed.