Py ToloMEO¶
Py ToloMEO is a Python framework for building microservices that run on a ToloMEO edge device.
Quick Links¶
-
Create a sensor plugin and service, run it, and watch its NATS output.
-
Subclass
PluginBase, define commands, and hook into the lifecycle. -
Add firmware updates to a service and walk through the update flow.
-
Set up the configuration file, NATS connection, and plugin options.
-
Look up every OTA command, payload, reply and status event.
-
Follow every state and transition of a firmware update.
-
Browse the services, plugins, and helpers generated from the source.
-
See how services, plugins, messaging, and tasks fit together.
Tutorials¶
Complete workflows that end with a working result. Start here if you are new to Py ToloMEO.
| Tutorial | Covers |
|---|---|
| Build Your First Service | A sensor plugin and service that publish data and answer a command over NATS |
| Add OTA Support | Add an OTA plugin to a service and walk through the update FSM |
How-to Guides¶
Recipes for one task each.
| Guide | Covers |
|---|---|
| Configure a Service | Broker URL, credentials, TLS, heartbeat, plugin options and environment variables |
| Implement a Sensor Plugin | Subclass SensorPlugin, declare metrics, push readings |
| Implement a Custom Plugin | Subclass PluginBase, define commands and lifecycle hooks |
| Trigger OTA via NATS | NATS command recipes for the full update lifecycle |
| Trigger OTA via HTTP | HTTP/curl command recipes |
Reference¶
Technical facts, for lookup.
| Reference | Covers |
|---|---|
| Configuration File | Configuration file format, search paths, and every key |
| OTA Commands | All commands, payloads, replies and status events |
| OTA State Machine | States, transitions, checkpointing and startup recovery |
| SenML Format | SenML record fields, message structure, examples |
| Python API | Services, plugins, OTA, commands, metrics, configuration, and tasks APIs |
Explanation¶
Why Py ToloMEO is designed the way it is.
| Explanation | Covers |
|---|---|
| Architecture | Service, plugin, messaging and task layers |
| Plugin System | Lifecycle, Meta declarations, hooks and mixins |
| OTA Mechanism | FSM rationale, checkpoint persistence, power-loss recovery |
| NATS Messaging | Why NATS, subject naming, SenML, announcements and validation |