Skip to content

Sensor Onboarding Overview

Spaxiom supports multiple sensor ingestion paths. This guide maps the common onboarding flows and links to protocol-specific, step-by-step setup guides.

Supported Sensor Paths

Physical Sensor ──► Protocol ──► Spaxiom Sensor ──► Pattern/Agent
               (MQTT/GPIO/CSV)    (Python class)     (INTENT events)

You can onboard sensors in two ways:

  1. Python Runtime (SDK-first)
  2. Use the sensor classes directly in your script.
  3. Best for prototyping and local workflows.

  4. Spaxiom Edge (API/UI)

  5. Register sensors via /api/sensors or the web UI.
  6. Best for edge deployments.

Common Sensor Protocol Guides

Minimum Dependencies

Protocol Package Notes
MQTT paho-mqtt Required for MQTTSensor (spaxiom/adaptors/mqtt_sensor.py)
GPIO gpiozero Linux only; required for GPIODigitalSensor (spaxiom/adaptors/gpio_sensor.py)
YAML config pyyaml Required for load_sensors_from_yaml (spaxiom/config.py)

Edge Sensor Registration (Quick Reference)

The Edge API accepts generic sensor metadata:

curl -X POST http://localhost:8080/api/sensors \
  -H "Content-Type: application/json" \
  -d '{
    "name": "sensor_name",
    "sensor_type": "random",
    "location": [0, 0, 0],
    "config": {},
    "enabled": true
  }'

Supported types are defined in spaxiom/edge/sensor_registry.py (e.g. random, toggling, gpio_digital, mqtt, file, sim_analog, sim_binary).