How digitalshoestringsolutions/sm_sensingdc works
Shoestring Sensing Service runs on a Raspberry Pi, reading locally attached sensors and publishing measurements over MQTT. TOML configuration selects interfaces, devices, calculations, pipelines, sampling strategies, and output mappings. The principal flow is configuration → measurement process → sampling strategy and sensing stacks → formatted messages → MQTT wrapper → broker. The graph includes the documented sensor, interface, calculation, and sampling subsystems; several implementation links are omitted because their wiring lies in unsampled source.
Main entry points: measure.py Measurement process · sensing_stack.py Sensing stack · main.py Process supervisor · mqtt_out.py MQTT wrapper
Components 16
Service orchestration
- Config loader
code/utilities/config_manager.py - Process supervisor
code/main.py - Measurement process
code/measure.py
Sensor acquisition
- Sensing stack
code/core/sensing_stack.py - Sensor drivers
code/core/device_modules - Hardware interfaces
code/core/interface_modules
Measurement processing
- Sampling strategies
code/core/measurement_modules/gen_sample.py - Calculation pipeline
code/core/pipeline.py - Calculations
code/core/calculation_modules - Sampling errors
code/core/exceptions.py
Output delivery
- Message formatting
code/core/output.py - ZMQ transport
- MQTT wrapper
code/mqtt_out.py
Other components
- Solution config
- Attached sensors
- MQTT broker
Connections 16
- Solution config → Config loader: provides TOML
- Config loader → Process supervisor: returns config
code/main.py - Process supervisor → Measurement process: starts process
code/main.py - Process supervisor → MQTT wrapper: starts process
code/main.py - Measurement process → Sampling strategies: runs loop
code/measure.py - Sampling strategies → Sensing stack: executes stacks
code/core/measurement_modules/gen_sample.py - Sensing stack → Sensor drivers: samples device
- Sensor drivers → Hardware interfaces: uses interface
- Hardware interfaces → Attached sensors: communicates with
- Sensing stack → Calculation pipeline: executes pipeline
code/core/sensing_stack.py - Calculation pipeline → Calculations: runs calculations
code/core/pipeline.py - Sensing stack → Sampling errors: raises sampling errors
code/core/sensing_stack.py - Measurement process → Message formatting: formats results
code/measure.py - Measurement process → ZMQ transport: sends messages
code/measure.py - ZMQ transport → MQTT wrapper: forwards messages
- MQTT wrapper → MQTT broker: publishes MQTT
code/mqtt_out.py