Demo to showcase connecting a drone to the Cloud API and viewing its real-time location on a map.
-
Follow the DJI Docker guide for setting up the backend / front end. However, the front-end will not be used.
In my case, the
dji-cloud-apiitself does not work on docker, therefore, download theJavabackend seperately and run it. In addition, theemqxversion specified in thedockerfilemay not work on M1 Macs, therefore, change the version tolatest -
Update all environment variables in the backend configuration with your
IP address, NOTlocalhost. By default, the MQTT username isadminand the password ispublic.Note: OSS will not be used, therefore, leave it all commented out.
-
Create a new file called
.env, copy and past the existing text from.env.exampleinto it. Then place aMapboxpublic key, DJIapp id, DJIapp key, and DJIapp licenseinside it. -
Run the containers (besides the
cloud-api-backend) and run this application withnpm run start -
On the controller, go to the
third-party cloud servicesand enter inhttp://<your_machines_ip>:3000/pilot, then clickconnect. -
On the site, click the refresh button to reload the device list. Then, click the
aircraftscard to be taken to the drone's position on the map.