The Herb Hub platform relies on a robust pipeline for collecting sensor information and distributing that telemetry across its infrastructure. At the heart of this process lies an automated mechanism designed to capture snapshots from various sensors, format them into standard JSON payloads, and securely deliver them via a message bus architecture using RabbitMQ. This system ensures that data flows reliably from edge devices to central processing nodes without manual intervention.

The harvesting workflow begins with a dedicated shell script responsible for orchestrating the collection event. Before any data is transmitted, the environment validates its configuration by checking for necessary credentials and ensuring all required scripts are present and executable within their designated directories. This validation step prevents unauthorized access attempts or accidental exposure of sensitive information during routine operations. Once validated, the system initiates a secure connection to the RabbitMQ API endpoint located at herbhub365.com.

The core functionality involves generating a snapshot file containing sensor readings in JSON format. The system then prepares this data for transmission by constructing authentication headers using Base64 encoding of user credentials and password combinations. This encoded information is attached to HTTP requests alongside standard content-type definitions, ensuring that every message sent over the network carries appropriate security context. The payload undergoes a final validation check against strict JSON formatting rules before being queued for delivery, guaranteeing data integrity throughout the transfer process.

Data transmission occurs through a structured interaction with RabbitMQ queues and exchanges configured specifically for sensor telemetry. The system defines routing keys that match queue names to ensure messages reach their intended destinations within specific virtual hosts. Messages are marked as durable and persistent unless explicitly set otherwise, allowing them to survive temporary network interruptions or service restarts without data loss. Each published message includes metadata such as content type specifications and delivery modes that govern how consuming services handle the incoming telemetry streams.

The architecture supports optional persistence of snapshot files after successful publication based on configurable flags within the environment variables. When enabled, copies are retained in designated output paths for audit purposes or offline analysis while maintaining a clean operational state by defaulting to temporary storage locations during active collection cycles. This approach balances data availability with resource management, ensuring that historical records remain accessible without cluttering primary working directories unnecessarily.

This message bus integration forms the backbone of Herb Hub’s real-time monitoring capabilities. By leveraging RabbitMQ as an intermediary layer between sensor sources and downstream analytics engines, the platform achieves high throughput and decoupled system design patterns essential for scalable IoT deployments. The combination of rigorous pre-flight checks, secure authentication protocols, and reliable queue management ensures that harvested data reaches its destination accurately and promptly regardless of network volatility or infrastructure changes.

Pipeline Architecture

Edge devices Soil moisture ADS1115 ADC Temperature DS18B20 Relay control Waveshare board Light / humidity Env sensors Collection layer Raspberry Pi 3B — harvest script Env validation → JSON snapshot → Base64 auth → HTTP publish HTTPS Message bus RabbitMQ @ herbhub365.com Exchanges → routing keys → durable queues Consumers Blog poster Ollama LLM posts Analytics engine Trend analysis Snapshot archive Audit / offline Configurable via env flag