Skip to content

Py ToloMEO Py ToloMEO

Py ToloMEO is a Python framework for building microservices on the ToloMEO Edge platform. It provides standardized services, plugins, and messaging patterns for developing, deploying, and managing microservices that communicate with the ToloMEO cloud over NATS.

The services interface with the ToloMEO Edge agent. The agent is the one capable to send and receive messages and commands to and from the cloud.

  • Build Your First Service

    Create a sensor plugin and service, run it, and watch its NATS output.

  • Implement a Custom Plugin

    Subclass PluginBase, define commands, and hook into the lifecycle.

  • Add OTA Support

    Add firmware updates to a service and walk through the update flow.

  • Configuration

    Set up the configuration file, NATS connection, and plugin options.

  • OTA Commands

    Look up every OTA command, payload, and status value.

  • OTA State Machine

    Follow every state and transition of a firmware update.

  • Python API

    Browse the services, plugins, and helpers generated from the source.

  • Architecture

    See how services, plugins, messaging, and tasks fit together.

Tutorials

Step-by-step guides that walk through a complete workflow and end with a working result. Start here if you are new to Py ToloMEO.

Tutorial Description
Build Your First Service Create a sensor plugin and service, run it, observe NATS output
Add OTA Support Add an OTA plugin to a service and walk through the update FSM

How-to Guides

Step-by-step instructions for specific tasks. Assumes a working Python environment.

Guide Description
Configure NATS Server URL, credentials, environment variables
Implement a Sensor Plugin Subclass SensorPlugin, define metrics, push data
Implement a Custom Plugin Subclass PluginBase, define commands and lifecycle hooks
Trigger OTA via NATS NATS command recipes for the full OTA update lifecycle
Trigger OTA via HTTP HTTP/curl command recipes

Reference

Complete technical specifications, designed for lookup.

Reference Covers
Configuration Configuration file format, search paths, and every key
OTA Commands All commands, payload schemas, event message format, status values
OTA State Machine All states, all transitions, FSM diagram, error recovery
SenML Format SenML record fields, message structure, examples
Python API Services, plugins, OTA, commands, metrics, configuration, and tasks APIs

Explanation

Design rationale for non-obvious choices.

Explanation Topic
Architecture Layer separation, service/plugin/messaging/task composition
Plugin System Lifecycle, Meta class pattern, metaclass-based registration
OTA Mechanism FSM rationale, checkpoint persistence, power-loss recovery
NATS Messaging Why NATS, topic naming convention, SenML rationale