Skip to content

Writing an Ingester

An ingester is a Python service that connects to a data source, decodes readings into a standard format, and writes them to ClickHouse via the shared wesense-ingester-core library.

How Ingesters Work

All ingesters follow the same pattern:

  1. Connect to a data source (MQTT, HTTP webhook, REST API, WebSocket)
  2. Decode source-specific payloads into standard Python dicts
  3. Pass to core — geocoding, deduplication, batching, and storage are all handled by wesense-ingester-core

Getting Started

The Standard Reading Dict

Existing Ingesters as Examples

IngesterData SourceComplexity
wesense-ingester-wesenseMQTT + TTN webhookMedium — protobuf decode, LoRa metadata
wesense-ingester-meshtasticMQTTMedium — protobuf + AES decrypt
wesense-ingester-homeassistantREST + WebSocketSimple — JSON, loop prevention
wesense-ingester-govaq-nzREST (Hilltop API)Simple — XML/JSON government data

Testing

Deployment

All WeSense data is free and open, forever.