Basics
This chapter covers everything an OST module can do without driving any INDI device — which already amounts to the bulk of the framework: the data model (properties and elements), how to react to a write, how to build or alter this model dynamically, the available element types, grids and graphs, lists of values, persistence as profiles, and how two modules collaborate (master/slave).
Each page is built around a real, minimal example module from the ost/ostmodules repository — free to read, load, and modify.
- Anatomy of a module
Basemodule vs IndiModule, the .h/.cpp/.json triplet, the initialize() function, the event chain
- The smallest module — properties and elements
Declaring a property and its elements in JSON: the hello module
- Reacting to a user write
directedit, autoupdate, and how to extract a written value when the framework doesn't apply it for you
- Creating properties dynamically, in C++
Building a property and its elements in code, at instantiation or on demand, without a JSON file
- The type catalog
All element types, read-only vs read/write, mixing types within a property, directedit SV vs SA
- Server-side updates
Evolving a value without a user action, organizing the display with devcat/group, isolating frequently-updated properties
- The three switch-coordination rules
OneOfMany (radio), AtMostOne (optional radio), Any (independent) — fully declarative
- Lists of values
The three scopes of a list of values (element, module, controller) and the constrained setting
- Profiles
hasprofile:true — named configuration save/load, fully automatic
- Grids and graphs
push()/clearGrid(), generic CRUD on the client side, and a graph as a plain visualization of a grid
- Master/slave relationship
One module commanding another: declareFamily, otherModuleSetValue, onOtherModuleEvent
- Building and integrating your module
Two ways to maintain your module: standalone, or integrated into the ost/ostmodules repository