FlightHub Sync

Follow

Comments

9 comments

  • Matias Herreros

    Hi. I've been trying to configure my AWS Cloud OSS in Flighthub2. I noticed two things:

    1. The screenshots used in this document are not up to date.
    2. After completing the "Storage Location" field with all the necessary data, I get the following error: 
      >>>> err:  Error: Request failed with status code 400
      url:  /manage/api/v1/organizations/HIDDEN_ID/c2c/solution/media_data_direct_trans 【post】
      code
      : 200610
      codeMessage: "Request failed. Try again later"
      data: Array(5)
      0:{}
      1:{}
      2:{}
      3:{}
      4:{}

    The inputed data follows exactly the JSON format described in this document:

    {
    "access_key_id":"AWS ACCESS KEY ID",
    "access_key_secret":"AWS SECRET KEY",
    "bucket":"BUCKET NAME",
    "region":"us-east-1",
    "arn":"ROLE ARN",
    "role_session_name":"SESSION NAME",
    "provider":"aws"
    }

    Could you provide more information regarding the "Storage Location" JSON? Is the format correct? The ARN needed is the one of the Role or the one of the Bucket?

    Could you provide documentation regarding the error code and message? I couldn't find documentation associated with this online.

    Thanks,

     

    0
    Comment actions Permalink
  • JacekKosciesza

    Hi Matias. I've written an article about it: DJI FlightHub Sync: Media File Direct Transfer to AWS. Maybe you will find it useful.

    2
    Comment actions Permalink
  • Matias Herreros

    Hi Jacek, thank you for sharing your article. It is updated and very well detailed!

    1
    Comment actions Permalink
  • Alex Hall

    JacekKosciesza thaks for putting this, as we have been working on this also.

    How has your testing gone? Can you confirm this is only currently working for DJI dock and no drones like Mavic 3? this is really annoying as we use both for or worklows, yet as usual DJI provide half-baked solution..

    Have you experimented with the RTMP streaming? we are finding a latency of over 12 seconds, its really bad...

    1
    Comment actions Permalink
  • JacekKosciesza

    Hi Alex Hall,

    Can you confirm this is only currently working for DJI dock and no drones like Mavic 3?

    Yes, it works with Dock, but I couldn't make it work with my Mavic 3E. I sent question about it to the DJI with a list of several issues/questions/suggestions) e.g.

    1. FlightHub Sync not triggered with Mavic 3E or when pilot switched to a manual mode during flight
    2. Missing notification (it happened once or twice)
    3. Uploaded file count (some inconsistency in notifications for "expected_file_count" vs "uploaded_file_count)
    4. File uploaded notification (I get some notification about uploaded KMZ files, but structure of this notification seems to be incorrect e.g. I don't get "notify_type" or "notify_time" like for other notifications)
    5. Incomplete notification (sometimes files are uploaded to S3 bucket, but list of the files is not present in notification, I just get one entry in the files array which is "Remote-Control")
    6. Suggestions about API improvements: e.g. missing date_time filed when file was created (instead of only having it in the file name, but without milliseconds), not clear file_type and sub_file_type (usually it's 10, 1 or 0)

    DJI never responded to those questions.

    Have you experimented with the RTMP streaming?

    Yes, I'm currently working on livestreaming feature, so yeah I experimented with stream forwarding and telemetry.

    BTW: in both cases I would have suggestion to the DJI to make it work using secure protocols (using TLS) + more advanced auth e.g. using certificates + fully customizable stream forwarding URL, because I couldn't make it work directly with AWS services like IVS and IoT Core and I had to use some proxy services.

    we are finding a latency of over 12 seconds, its really bad...

    From my experience (with my Mavic 3E, architecture like: DJI -> NGINX proxy -> Amazon IVS) latency was around 6 seconds I think. But yeah, it would be great if they would support lower latency protocols like WebRTC or SRT.

    Jacek

     

     

     

    1
    Comment actions Permalink
  • Alex Hall

    Hi Jacek, so you tested KMZ upload to flight hub from your own OSS bucket?
    One thought I had, if we are exporting KMZ files created by third party mission planner to go direct to flight hub, if we find that we have to reupload the same file again (due to parameter changes in the KMZ) but KMZ file name stays the same, how does flight hub deal with duplicate file name? Can it overwrite the original?

    But also another point- how does one define under which project the uploaded KMZ files are allocated? I.e once uploaded to FH, how are they then viewed?

    Any experience you have on this greatly appreciated.

    Also re image sync, is it still true it’s only working with the Docks only? Or do you know now if it’s also working with Mavic 3 / M30 etc?

    Alex

    0
    Comment actions Permalink
  • Mateus Martins Correa

    Hello JacekKosciesza

    Have you succeed to solve the following issue :

    "

    Incomplete notification (sometimes files are uploaded to S3 bucket, but list of the files is not present in notification, I just get one entry in the files array which is "Remote-Control")

    "

    ?

    Have a great day.

    2
    Comment actions Permalink
  • Juan Salas

    Hello Mateus Martins Correa,

    Where you able to find a solution to this issue?

    0
    Comment actions Permalink
  • JacekKosciesza

    Hi Mateus Martins Correa, Juan Salas

    I created a workaround for that problem.

    Files are still uploaded to S3 bucket, so the idea is simple - find those is S3 and create that missing list of files yourself. You can do that using task ID, which is in notification (that task ID is part of the object key in S3 bucket). Reality is of course more complicated, because AFAIK AWS SDK v3 doesn't have a way to filter/find objects this way - you would have to list all objects and filter it yourself, which is not very scalable. Solution is to create your own index of files, which you can easily query. I use Amazon S3 Event Notifications for that, together with SQS (to process it in batches), Lambda function and DynamoDB (where I create index: PK is task ID, SK is object key from S3, plus I store size just in case).

    There is a catch however:

    Amazon S3 event notifications are designed to be delivered at least once. Typically, event notifications are delivered in seconds but can sometimes take a minute or longer.

    That means that potentially you will get notification from the DJI before your DynamoDB index is fully created. That's why I postpone processing by 15 minutes using EventBridge Scheduler.

    Rest of the workaround is relatively simple - Lambda is triggered by EventBridge Scheduler with original notification from the DJI as input/event. I build that missing list of files by querying DynamoDB (PK equal task ID) and proceed normally.

    This is not the only issue with FlightHub Sync. I'll try to describe other problems which we are facing in a separate comment.

    I hope it will help you,

    Jacek

    0
    Comment actions Permalink

Please sign in to leave a comment.

close