Plynth Sandbox

Plynth Sandbox

Plynth connects robots to buildings' doors and elevators, under each building owner's rules. This sandbox is a simulated building your robots' software can ride today, through the same API a real building uses.

Five minutes to your first ride

  1. Get a key. Design partners: open the sign-in link Plynth sent you, choose a password, and on your company's page take each robot's secret with Get Secret. It's shown once, with a file, plynth-sandbox.env, that holds the address, the robot ID and the secret.

Try it now

Get a key of your own for a day: one robot that rides the elevator and goes through the doors here. No sign-up, and nothing about you is kept. Drills, positions and help come with a company's own keys.

Or from a terminal: curl -X POST https://sandbox.plynth.build/docs/keys -H "Accept: application/json"

  1. Download the test kit. Python 3.9 or later, nothing to install.
curl -sO https://sandbox.plynth.build/docs/robot-kit.zip && unzip -q robot-kit.zip && cd robot-kit
  1. Check your key. It says whether the gateway accepts it, whose robot it is, whether your clock is right, and which doors and elevators the robot may use.
python3 -m plynth.hello --env ../plynth-sandbox.env
  1. Ride the elevator and go through the door. The conformance check runs a door passage, an elevator ride followed on the stream, refusals, notices and emergency drills, and says what passed.
python3 -m plynth.conformance --env ../plynth-sandbox.env --report conformance.json

Your first call in code

The kit's client signs for you. Load your key into the environment first, from inside robot-kit: set -a; . ../plynth-sandbox.env; set +a.

import os, uuid
from plynth.client import RobotClient

robot = RobotClient(os.environ["GATEWAY_URL"], os.environ["GATEWAY_ROBOT_ID"], os.environ["GATEWAY_ROBOT_SECRET"])
trip = str(uuid.uuid4())                  # a new ID for each trip; sending it again is safe
print(robot.request(trip, "door"))        # state OPEN_COMMANDED: go through
print(robot.report(trip, "passed"))       # state PASSED, done: true

In any other language, Signing requests has the exact recipe, a worked example to test against, and code in shell, Python, JavaScript and C++.

What's in the building

The building resets every night at 03:00 UTC. The sandbox has its limits, and what the simulation doesn't do.

Next

Your own keys

A robot ID and secret for each of your robots: your trips seen by your company alone, drills included. Plynth sets them up for design partners; ask the person who sent you here.