Trigger video capture operation locally on a tedge enabled raspi 5 via MQTT

Hi everyone,

I know this is probably a classic RTFM moment — but I’ve honestly been digging through the docs and still can’t get this to work, so I’m hoping for a quick pointer from someone who’s been there before :slightly_smiling_face:

I’m trying to trigger a Video Capture operation locally on a tedge enabled raspi 5 via MQTT so that the device records a short video and uploads it right afterward.

According to the documention of the vision-ai-thinedge-plugin to trigger to trigger a video capturing operation I should just create a operatioin of the c8y_VideoCapture type like so:

{
    "deviceId": "<cameraId>",
    "c8y_VideoCapture": {
      "framerate": 15.0,
      "duration": 10.0
    },
    "description": "Take a video"
}

At the moment I’m publishing this locally:

tedge mqtt pub 'te/device/ai_camera///cmd/video_capture' '{
  "deviceId: "ai_camera",
  "c8y_VideoCapture": {
    "framerate": 15.0,
    "duration": 10.0
  },
  "description": "Take a video"
}'

…but nothing happens — no recording, no upload, no visible feedback.

If I trigger this operation through the button displayed on the device managment detail page of the ai_camera it works perfectly.

Could someone briefly explain:

  • Which exact topic needs to be used to trigger the operation correctly?

  • Are there any additional steps required (e.g. operation mapping, SmartREST format, operation definitions, or plugin configuration)?

Any hints or minimal working example would be highly appreciated. Thanks in advance! :+1:

@benjamin.ruoff The video workflow requires both a valid camera ID and a valid Cumulocity operation ID. In your current request, the camera ID is provided, but the operation ID is missing. This is likely causing the workflow to fail due to a missing or unknown operation ID.

Hi @Vachaspati_Diwevedi2 thank you for your answer but where should I get this operation ID from?

According to Reuben’s explanation here:

the device does not need to provide or know any operation ID when triggering an operation locally. thin-edge handles the entire operation lifecycle internally.

As far as I understand it, since I want to trigger the operation locally via MQTT on thin-edge, without using the Cumulocity REST API, I should not need to provide an operation ID at all — that part should be fully managed by thin-edge + Cumulocity.

But after checking the c8y_VideoCapture.template and reading Reubens post, it also seems that the operation is expected to be triggered by publishing to

/devicecontrol/notifications

which I still need to try out.

Could you confirm that this interpretation is correct and maybe share a minimal working example of the exact MQTT payload required for c8y_VideoCapture?

Hi @benjamin.ruoff Your understanding is absolutely correct. The c8y_VideoCapture functionality in the Vision AI plugin is intentionally designed to require an operation ID for the workflow to run smoothly.

Could you please help me understand why you are trying to capture the video locally? Is there a specific customer use case behind this requirement? If so, it would be helpful if you could share more details.

Below find the sample request payload: (id must be a valid one)

{

"deviceId": "92147524528",
"deviceName": "ai_camera",
"id": "147590313",
"status": "PENDING",
"c8y_VideoCapture": {
    "duration": 10,
    "framerate": 15
},
"description": "Video Capture"

}