Controlling Cyclops
Use these endpoints to stop Cyclops when you do not need it, for example to free the companion computer's resources, and to start it again before flight. The home position spoof is also on this page.
GET
/api/v2/services/cyclops
Read whether Cyclops is running
POST
/api/v2/services/cyclops/start
Start Cyclops
POST
/api/v2/services/cyclops/stop
Stop Cyclops
POST
/api/v2/services/cyclops/restart
Restart Cyclops
POST
/api/gps/spoof (port 5000)
Send the home position to the flight controller
Read whether Cyclops is running
GET /api/v2/services/cyclops
curl http://192.168.218.100:5050/api/v2/services/cyclops{
"success": true,
"data": {
"name": "cyclops",
"active": true,
"enabled": true,
"sub_state": "running",
"health_status": "ok",
"health_error": null,
"health_fix": null
}
}active
true while Cyclops is running.
enabled
true if Cyclops starts automatically when the Cyclops computer boots.
sub_state
Detailed state, for example running, dead (stopped), or auto-restart.
health_status
ok when everything Cyclops needs to start is in place. prerequisites_missing when something is missing.
health_error, health_fix
What is missing and how to fix it, when health_status is not ok.
For the reason Cyclops is unhealthy while it runs, use vps_error in GET /api/v2/state.
Start, stop, or restart Cyclops
POST /api/v2/services/cyclops/start
POST /api/v2/services/cyclops/stop
POST /api/v2/services/cyclops/restart
No request body.
A stopped Cyclops stays stopped until you start it again or the Cyclops computer reboots. It starts automatically at the next boot. While it is stopped, vps_error in GET /api/v2/state is 20.
Stopping Cyclops frees most of the compute it uses. The camera stream keeps running, because Cyclops needs it to start again. A recording in progress also keeps running; stop it separately if you want to (see Recordings).
The call returns once the action is done. Set your HTTP client timeout to at least 90 seconds. After a start or restart, watch vps_error in GET /api/v2/state until it returns to 0.
Errors
400
Cyclops cannot start because something it needs is missing, for example the camera stream or the flight controller heartbeat. The error message includes a suggested fix.
403 or 500
The device could not change the state of Cyclops. Retry, then power cycle the Cyclops computer if it keeps failing.
Send the home position to the flight controller (port 5000)
POST /api/gps/spoof on port 5000
Cyclops reports the home position to the flight controller as its current position for a set time. This gives the flight controller a starting position on the ground, so it can arm without GPS. Use it only if your release requires it.
Before you call it:
Cyclops must be running.
A home position must be set. See Home position.
The flight controller must be connected.
Request body
duration_s
number
How long to send the home position, in seconds. Optional. Default 5.
This endpoint always returns HTTP 200. Check success. When it is false, error says why, for example:
Common reasons: Cyclops is not running, no home position is set, the aircraft is armed or airborne, or a spoof is already in progress.
Last updated
