Sandbox
A copy of Ochio that runs on your computer, with a simulated site, drones and sensors behind the real API. Build and test your integration against it before it meets a real site.
What's in it
Everything but the hardware is real: the API, request signing, rules, the safety gate, missions, webhooks, the event log, reports and the MCP server. The drones, the people they find and the site's own sensors are simulated.
The demo site, Demo Depot, is a depot in open country:
| Zone | Kind | Sensor |
|---|---|---|
North fence north-fence | watch | north-fence-pir-01, a motion sensor |
East gate east-gate | watch | east-gate-cam-01, a camera |
Generator yard generator-yard | watch | generator-yard-door-01, a door contact |
Fuel farm fuel-farm | no-fly | none |
Two drones, drone-1 and drone-2, share a dock in the middle. Three rules decide what happens:
| Rule | When | Then |
|---|---|---|
perimeter-motion | A medium or higher alert on the north fence or at the east gate | Inspect, at once |
generator-yard-door | Any alert in the generator yard | Inspect, after a person approves |
silent-sensor | Any sensor stops checking in | Inspect, at once |
The simulated drones fly straight lines at 12 m/s and 40 m up. Their batteries drain in flight and charge on the dock, and their cameras see any simulated person within 60 m.
Run it
The sandbox runs on macOS and Linux. Ask us for a copy, then install uv once and start it from its folder. The first start takes about a minute and prints two API keys, operator and partner.
Then open http://127.0.0.1:8700 for the sandbox's dashboard, a live map of the site with eight ready-made checks, and http://127.0.0.1:8700/docs to call any endpoint from the browser.
| Option | Does |
|---|---|
--sim-speed 5 | Flies the drones 5 times faster (0.25 to 20). |
--port 8800 | Another port. Default 8700. |
--host 0.0.0.0 | Lets other machines connect. Turn test mode off when you do. |
--no-dev | Turns test mode off: every request needs a key. |
--fresh | Starts from nothing: new keys and an empty log. |
--quiet | Stops printing events in the terminal. |
brew install uv # once
cd ochio-core
uv run ochio-core # add --sim-speed 5 for faster dronesTools
Three helpers come with the sandbox. Run each in its own terminal, from the sandbox's folder.
| Tool | Does |
|---|---|
uv run ochio-receiver | Plays a partner system: subscribes to every event, checks each signature and prints one line per event. --events "mission.*,report.ready" narrows it; --fail 3 fails the first three deliveries so you can watch the retries. |
uv run ochio-sensor --id gate-sensor --lat 38.5005 --lon -97.9950 | Plays an outside sensor at the east gate: registers, checks in every 10 seconds, and on a key press sends a signed alert (m), cuts its power (s), sends a tampered alert (t) or quits (q). |
uv run ochio-replay export.ndjson --speed 10 | Sends the alerts and silences from an export into a fresh sandbox, repeats the approvals, denials and cancels people made, and compares the missions with the recording. |
Try these
| # | Try | What should happen |
|---|---|---|
| 1 | Motion and a person on the north fence | A drone launches at once, sees the person, flies home, and a report appears. |
| 2 | Cut the east gate camera's power | About 20 seconds later the camera is silent and a drone launches. |
| 3 | Open the generator yard door | The mission waits. Approve sends a drone; Deny ends it and leaves the alert open. |
| 4 | Send a drone into the fuel farm | From the API, the map and Claude alike: refused by outside_no_fly_zones. |
| 5 | The same alert twice, then version 2 | duplicate, then updated, and only one mission. |
| 6 | Run the receiver during check 1 | Every event prints as verified, ending with report.ready. |
| 7 | A tampered alert | 401 invalid_signature, and nothing is created. |
| 8 | Export, start fresh, replay | The same missions launch again. |
Sandbox controls
These endpoints drive the simulation, so you can test your integration's edge cases on demand. They exist only in test mode, and need the admin scope.
Simulate an alert
A simulated sensor sends an alert, through the same path as a signed one. Optionally, a simulated person appears about 35 m from the sensor, for the drone to find.
Bodymotion.high.false.The same answer as Send an alert, plus intruder.
curl -X POST "$OCHIO_URL/v1/dev/motion" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sensor_id": "generator-yard-door-01",
"type": "door_open",
"priority": "medium"
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/motion",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"sensor_id": "generator-yard-door-01",
"type": "door_open",
"priority": "medium"
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/motion`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
sensor_id: "generator-yard-door-01",
type: "door_open",
priority: "medium"
}),
});
console.log(res.status, await res.json());{
"result": "created",
"alert": {
"id": "alt_02fcb2845e3a",
"source": "generator-yard-door-01",
"source_alert_id": "bench_e0b6c003",
"version": 1,
"type": "door_open",
"priority": "medium",
"location": {
"lat": 38.4979,
"lon": -98.0047
},
"zone_id": "generator-yard",
"status": "responding",
"mission_id": "msn_7c755ad98d22",
"mission_history": [
"msn_7c755ad98d22"
],
"time": "2026-10-19T21:34:46.531Z",
"title": null,
"description": null,
"media_url": null,
"data": null,
"received_by": "sensor:generator-yard-door-01",
"dismissed_by": null,
"resolved_at": null,
"created_at": "2026-10-19T21:34:46.531Z",
"updated_at": "2026-10-19T21:34:46.531Z"
},
"mission": {
"id": "msn_7c755ad98d22",
"status": "pending_approval",
"vehicle_id": null
},
"rule": {
"rule_id": "generator-yard-door",
"outcome": "mission_created",
"mission_id": "msn_7c755ad98d22",
"mission_status": "pending_approval"
},
"intruder": null
}Cut or restore a sensor's power
Stops or restarts a simulated sensor's check-ins. With its power off, it turns silent once its check-ins expire.
Pathfalse cuts the power; true restores it.power, the sensor's status, and silent_after: when it will turn silent.
| Status | Code | When |
|---|---|---|
409 | not_simulated | The sensor is real. |
curl -X POST "$OCHIO_URL/v1/dev/sensors/east-gate-cam-01/power" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"on": false
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/sensors/east-gate-cam-01/power",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"on": False
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/sensors/east-gate-cam-01/power`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
on: false
}),
});
console.log(res.status, await res.json());{
"sensor_id": "east-gate-cam-01",
"power": "off",
"status": "online",
"silent_after": "2026-10-19T21:35:01.921Z"
}Place a simulated person
Puts a simulated person on the map for 15 minutes. A drone on scene or on patrol within 60 m sees them.
BodyPerson.201 with the person: id, position, zone_id, placed_at and expires_at (in Unix seconds).
curl -X POST "$OCHIO_URL/v1/dev/intruders" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lat": 38.5007,
"lon": -97.9953,
"label": "Person"
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/intruders",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"lat": 38.5007,
"lon": -97.9953,
"label": "Person"
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/intruders`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
lat: 38.5007,
lon: -97.9953,
label: "Person"
}),
});
console.log(res.status, await res.json());{
"id": "int_f5a3fe19",
"lat": 38.5007,
"lon": -97.9953,
"label": "Person",
"zone_id": "east-gate",
"placed_at": "2026-10-19T21:33:03.881Z",
"expires_at": 1792446483.8811839
}Clear simulated people
Removes every simulated person.
Returns{"removed": n}.
curl -X DELETE "$OCHIO_URL/v1/dev/intruders" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.delete(
f"{os.environ['OCHIO_URL']}/v1/dev/intruders",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/intruders`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"removed": 1
}Fault a vehicle
Makes a vehicle report a fault. A mission it's flying fails, and it flies home. /clear-fault repairs it; /battery sets its battery, as {"pct": 25}.
Simulated motor fault.The vehicle.
curl -X POST "$OCHIO_URL/v1/dev/vehicles/drone-2/fault" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Motor 3 overheating"
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/vehicles/drone-2/fault",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"message": "Motor 3 overheating"
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/vehicles/drone-2/fault`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "Motor 3 overheating"
}),
});
console.log(res.status, await res.json());{
"id": "drone-2",
"name": "Drone 2",
"type": "quadcopter",
"model": "Ochio quad (simulated)",
"adapter": "sim",
"capabilities": [
"camera",
"depth"
],
"home": {
"lat": 38.499,
"lon": -98.0007
},
"position": {
"lat": 38.499,
"lon": -98.0007,
"alt_m": 0.0
},
"heading_deg": 251.4,
"ground_speed_mps": 0.0,
"speed_mps": 12.0,
"range_m": 6000.0,
"battery_pct": 25.0,
"status": "fault",
"ready": false,
"charging": false,
"mission_id": null,
"fault": "Motor 3 overheating",
"created_at": "2026-10-19T21:30:10.072Z",
"updated_at": "2026-10-19T21:34:49.559Z"
}Change the simulation speed
Flies the drones faster or slower, 0.25 to 20 times. Cooldowns scale with it.
Body{"sim_speed": n}.
curl -X POST "$OCHIO_URL/v1/dev/sim-speed" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"speed": 5
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/sim-speed",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"speed": 5
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/sim-speed`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
speed: 5
}),
});
console.log(res.status, await res.json());{
"sim_speed": 5.0
}Send a tampered alert
Signs an alert as a sensor, changes the body after signing, and sends it to POST /v1/alerts, to show that Ochio refuses it.
north-fence-pir-01.What was signed and sent, Ochio's answer (401 invalid_signature), and whether an alert was created.
curl -X POST "$OCHIO_URL/v1/dev/tampered-alert" \
-H "Authorization: Bearer $OCHIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sensor_id": "north-fence-pir-01"
}'import os
import requests
r = requests.post(
f"{os.environ['OCHIO_URL']}/v1/dev/tampered-alert",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
json={
"sensor_id": "north-fence-pir-01"
},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/tampered-alert`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OCHIO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
sensor_id: "north-fence-pir-01"
}),
});
console.log(res.status, await res.json());{
"sent": "{\"id\": \"tamper_a56db0a5\", \"source\": \"north-fence-pir-01\", \"type\": \"motion\", \"priority\": \"critical\"}",
"signed": "{\"id\": \"tamper_a56db0a5\", \"source\": \"north-fence-pir-01\", \"type\": \"motion\", \"priority\": \"low\"}",
"status": 401,
"response": {
"error": {
"code": "invalid_signature",
"message": "The signature does not match the body. Nothing was recorded."
}
},
"alerts_before": 3,
"alerts_after": 3,
"alert_created": false
}Read or reset the simulation
GET /v1/dev/state returns the simulation speed, the simulated people, which sensors have power, and every event type. POST /v1/dev/reset clears alerts, missions, detections, reports and simulated people, and puts the fleet back on its dock, fully charged. POST /v1/dev/inject re-sends one exported event; the replay tool uses it.
The state; {"reset": true} for a reset.
curl "$OCHIO_URL/v1/dev/state" \
-H "Authorization: Bearer $OCHIO_API_KEY"import os
import requests
r = requests.get(
f"{os.environ['OCHIO_URL']}/v1/dev/state",
headers={"Authorization": f"Bearer {os.environ['OCHIO_API_KEY']}"},
)
print(r.status_code, r.json())const res = await fetch(`${process.env.OCHIO_URL}/v1/dev/state`, {
headers: { Authorization: `Bearer ${process.env.OCHIO_API_KEY}` },
});
console.log(res.status, await res.json());{
"sim_speed": 1.0,
"intruders": [
{
"id": "int_f5a3fe19",
"lat": 38.5007,
"lon": -97.9953,
"label": "Person",
"zone_id": "east-gate",
"placed_at": "2026-10-19T21:33:03.881Z",
"expires_at": 1792446483.8811839
}
],
"sensor_power": {
"north-fence-pir-01": true,
"east-gate-cam-01": true,
"generator-yard-door-01": true
},
"event_types": [
"alert.received",
"alert.updated",
"alert.resolved",
"alert.dismissed",
"sensor.registered",
"sensor.online",
"sensor.silent",
"sensor.recovered",
"sensor.removed",
"rule.suppressed",
"mission.created",
"mission.status_changed",
"vehicle.status_changed",
"detection.created",
"report.ready",
"webhook.test"
]
}