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-api
itself does not work on docker, therefore, download theJava
backend seperately and run it. In addition, theemqx
version specified in thedockerfile
may 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 isadmin
and 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.example
into it. Then place aMapbox
public key, DJIapp id
, DJIapp key
, and DJIapp license
inside 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 services
and enter inhttp://<your_machines_ip>:3000/pilot
, then clickconnect
. -
On the site, click the refresh button to reload the device list. Then, click the
aircrafts
card to be taken to the drone's position on the map.