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.

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
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

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