support device profile operation #2921
Labels
idea
ideas/opportunities/feature requests which need to be further investigated before implementation
theme:profile
Device Profile
Milestone
Is your feature request related to a problem? Please describe.
Add support for the Cumulocity IoT device profiles feature which enable deploying firmware, software and configuration in one single operation, though each of the items are optional.
Describe the solution you'd like
The following are the requirements for the device profile feature:
thin-edge.io is to implemented an abstraction over the Cumulocity device profile interface
The device_profile capability should be published on the following topic:
topic
payload
The tedge-mapper-c8y, should translate the thin-edge.io
device_profile
capability toc8y_DeviceProfile
when publishing the Cumulocity "Supported Operations" 114 message.the tedge-mapper-c8y should map the Cumulocity SmartREST template, 527 to the following local thin-edge.io command topic:
thin-edge.io workflows should be used to handle the processing of the device profile and reusing the existing
firmware_update
,software_update
andconfig_update
workflows to process each part of the device profileit should be possible to influence the processing order of the device profile by customizing the device_profile workflow
the current device profile should be stored so it can be checked after after the device_profile command has been acknowledged (similar way to how the current firmware name/version is tracked)
Describe alternatives you've considered
Additional context
Device Profile Flow
The Cumulocity IoT device profile flow is as follows, though be sure to read the official documentation.
Receive the
c8y_DeviceProfile
operation via thec8y/devicecontrol/notifications
topicConvert the payload to an abstracted payload (TBD) and publish to the local te topic:
Set the operation to executing
Publish a 121 SmartREST message to Cumulocity indicating that the device profile has been received and is in the process of being executed (in addition to the normal operation status transition!)
topic
payload
Note The
[profile_id]
is optional, though it would be better to be explicit if the profile_id is available (it is part of the Cumulocity operation payload)Processing the different parts of the device profile
Publish a 121 SmartREST message that the device profile has been executed
Set the operation to SUCCESSFUL or FAILED
If one part of the device profile fails, then the whole operation should be set to
FAILED
.Cumulocity Device Profile Payload
An example Cumulocity IoT
c8y_DeviceProfile
payload is shown below:Out of scope
The text was updated successfully, but these errors were encountered: