Terminal control example using DJI Cloud API. reference project https://github.com/pktiuk/DJI_Cloud_API_minimal.git Thank you for his sharing!
- Install dependencies:
pip install -r ./requirements.txt - Install docker and setup
emqx(MQTT server) --network- WSL:
docker run -d --name emqx --network host emqx:5.0.20 - Other:
docker run -d --name emqx --network host -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx:5.0.20 - open http://localhost:18083/ to setup admin account l:
adminp:public - create user account (I am not sure whether it is needed, you can use admin account)
- can run
source restart_docker.shto restart emqx MQTT server
- WSL:
- Connect your DJI Smart Controller to the same local network your PC is in (in case of laptop I recommend creating local hotspot).
- Set env variable
HOST_ADDR,USERNAME,PASSWORDinconfig.shand runsource config.shto application them - Set host in
couldhtml/login.htmland run./cloud_api_http.pyto start http server - Run
./multi_client_mqtt.pyto activate the multi machine control terminal
- Open DJI Pilot App
- Go to
Cloud Service->Other platforms - Write url
http://HOST_ADDR:5500/loginand connect - Press Login.