Skip to main content

mrg-iot

IoT testbed experiment automation for the Sphere / Merge Testbed platform.

PyPI version Python versions License: MIT Code style: black

mrg-iot exp deploy: the experiment, its hardware and an attached XDC in one command

mrg-iot is a command-line tool for running IoT experiments on the Merge Testbed without chaining mergetb and ssh calls together by hand. It creates the experiment and its device model, allocates the hardware, sets up and attaches an XDC, and tunnels to the experiment's camera streams, file server and control channel. From there you can send device commands, download what the devices produced, and release everything when you're done. If a deployment fails, it removes whatever it had already allocated.

Documentation

User documentation is on the SPHERE docs site. This README only covers installing the package.

Guide What's in it
IoT Devices Key concepts, how the pieces fit together, and the device catalog.
Installation Installing mrg-iot and the optional media tools.
Quickstart Install, then drive a real device in a few commands.
Using mrg-iot Account setup, experiments, device commands, camera streams, files and teardown.
Troubleshooting & FAQ Common errors, their causes and fixes.

The full device list is at devices.iot.sphere-testbed.net.

Run mrg-iot --help, or --help on any subcommand, for the full list of flags and their defaults.

Requirements

Requirement Notes
Python 3.9+ 3.9 through 3.12 are supported; CI tests on 3.12.
A Merge Testbed account With access to at least one IoT project (neuiot, iotbeta or iotdev). See Create a SPHERE account.
Network access To the gRPC portal (grpc.sphere-testbed.net:443) and the SSH jump host (jump.sphere-testbed.net:2022).
VLC / ffmpeg / Wireshark Optional. VLC is used by stream open, ffmpeg by stream push and Wireshark by stream capture. None can be installed with pip; see Media tools.

Installation

We recommend pipx, which installs mrg-iot into its own environment and puts it on your PATH:

pipx install mrg-iot

You can also install it into a regular virtual environment:

python3 -m venv .venv && source .venv/bin/activate
pip install mrg-iot

Check that it worked:

mrg-iot --version
mrg-iot --help

If you get mrg-iot: command not found, pipx's install directory (~/.local/bin) probably isn't on your PATH. Run pipx ensurepath and open a new shell.

On macOS, portal calls can fail with certificate verify failed because the system Python often has no usable CA bundle. Set these to fix it:

export SSL_CERT_FILE="$(python -m certifi)"
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE"

Quick start

mrg-iot login                                        # cached in ~/.mrg-iot/session.json
mrg-iot devices list --available                     # devices free to reserve
mrg-iot exp deploy myexp --devices s-echodot-1       # create and deploy the experiment
mrg-iot cmd run "s-echodot-1 click_button" -e myexp  # send a device command
mrg-iot file download -e myexp                       # download captured files
mrg-iot exp undeploy myexp                           # release everything

Most names have defaults: the experiment is named after your username, the XDC is <experiment>xdc, the realization is realiot, and the project is neuiot (or your first project if you aren't in neuiot). So mrg-iot exp deploy --devices s-echodot-1 works by itself, and none of the commands above prompt for input.

For an interactive version, mrg-iot run deploys an experiment, opens the spiot_ctl > prompt, and asks whether to undeploy when you type exit.

The Quickstart goes through the same commands with example output, and Using mrg-iot covers everything else.

License

MIT © Sphere / NEU IoT Testbed contributors

Metadata

Release files for mrg-iot 1.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mrg-iot 1.5.7
File Size Uploaded Provenance Actions
mrg_iot-1.5.7.tar.gz 261.1 kB Without provenance Details for mrg_iot-1.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mrg-iot 1.5.7
File Interpreter ABI Platform Actions
mrg_iot-1.5.7-py3-none-any.whl Python 3 none any Details for mrg_iot-1.5.7-py3-none-any.whl

Total release size: 449.0 kB

Release files / mrg_iot-1.5.7.tar.gz

Download URL mrg_iot-1.5.7.tar.gz
Size 261.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a51b1c33339273ef4670a0860eb5d8771d6633b0ea0c04b84d3c0dfd06f53083
BLAKE2b-256 checksum
How to use checksums
6a3e47759ef2c59aa174c38a56637a79676f7281470a1e23ade9d16cfa05136a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / mrg_iot-1.5.7-py3-none-any.whl

Download URL mrg_iot-1.5.7-py3-none-any.whl
Size 187.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c40a3b9f2d56befff777acfaac594cb5a66510f0910a866a0b568e17abc49d30
BLAKE2b-256 checksum
How to use checksums
bdd5784dba0c38078cd6c5db699c11632602543239d369c1a7827cdf484e72ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Security for mrg-iot 1.5.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page