Skip to main content

A library for connecting to remote Robots running TritiumOS

Project description

tritium_remote

A library for interacting with Tritium systems. Hosted docs are here (require login).

  • Connects to a running Tritium system via the Gateway node, initially by WebSocket only
  • Uses GraphQL to send commands and request data

Implemented in Rust but with bindings to

  • Python

This library is currently only published and tested on linux. However the rust crate ought to work on other platforms.

This is only to be used on a trusted local network. The Tritium system will be accessed over LAN without encryption.

APIs

Sequence playback

  • Start & stop sequence

Scripting

  • Start & stop scripts
  • Send and receive arbitrary messages via bidirectional byte stream

Running Examples

The Rust and Python examples use the TRITIUM_AUTH_TOKEN environment variable to get the JWT access token they need.

Pending a proper UI for generating tokens, the best way for now is...

  1. Log into the Tritium cloud UI
  2. Connect to your locally-running system
  3. Go to the "Scripts" page
  4. Select the API Keys tab
  5. Click "CREATE AN API KEY"
$ export TRITIUM_AUTH_TOKEN={paste x-tritium-auth contents here}
$ cd tritium-remote/examples/system_info
$ cargo run

Generated GraphQL Code

Rust structures are generated from the GraphQL schemas using graphql-client

Install graphql-client with:

$ cargo install graphql_client_cli

Then to generate Rust code for the playSequence mutation as an example, in the repository root:

$ cd tritium-remote
$ graphql-client generate --schema-path graphql/schemas/tritium.graphql --output-directory src/graphql/mutations graphql/mutations/play_sequence.graphql

License

This project is licensed under either of

at your option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tritium_remote-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

tritium_remote-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tritium_remote-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tritium_remote-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tritium_remote-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page