Problem reading DO_SET_SERVO parameters in Lua script Body

Hi all,

I’m working on a Lua script for my Cube Orange+ autopilot. I want to read the parameters of a DO_SET_SERVO (MAV_CMD 183) command using Lua.

My approach is to check if the current mission command is DO_SET_SERVO like this:

local cmd_id = mission:get_current_do_cmd_id()

if cmd_id == 183 then
local command_time, param1, param2, param3, param4 = mission_receive()

if command_time then
    gcs:send_text(6, "PWM: " .. param2)
else
    gcs:send_text(6, "No mission_receive data yet")
end

end

Does not work. param2 is nil
Is mission_receive() capable of reading DO_SET_SERVO parameters when the command is sent manually? What is the correct way in Lua to catch live MAVLink DO_SET_SERVO commands?
Any advice would be greatly appreciated!

Thanks in advance!