SensorPush Edge Agent for Veridian Cultivation Platform
Find a file
2026-01-05 23:43:16 -08:00
scripts feat: initial veridian-edge agent scaffold 2026-01-01 23:14:50 -08:00
src fix: Run on Bun and add Kasa dep 2026-01-05 23:43:16 -08:00
.gitignore feat: initial veridian-edge agent scaffold 2026-01-01 23:14:50 -08:00
bun.lock fix: Run on Bun and add Kasa dep 2026-01-05 23:43:16 -08:00
config.demo.json fix: Run on Bun and add Kasa dep 2026-01-05 23:43:16 -08:00
config.example.json feat: add alerting engine and heartbeat sender (v2.0) 2026-01-01 23:33:29 -08:00
package.json fix: Run on Bun and add Kasa dep 2026-01-05 23:43:16 -08:00
README.md feat: initial veridian-edge agent scaffold 2026-01-01 23:14:50 -08:00
tsconfig.json feat: initial veridian-edge agent scaffold 2026-01-01 23:14:50 -08:00

Veridian Edge Agent

SensorPush integration agent for the Veridian Cultivation Platform. Runs on Raspberry Pi or Ubuntu, polls SensorPush Cloud API, and syncs environmental readings to the Veridian backend.

Features

  • 🌡️ SensorPush Integration OAuth 2.0 authentication with automatic token refresh
  • 💾 Offline Resilience SQLite buffer for network outages
  • 🏥 Health Monitoring HTTP endpoints for health checks and Prometheus metrics
  • 🔄 Auto-Recovery Systemd service with watchdog

Quick Start

Prerequisites

  • Raspberry Pi 4 (2GB+ RAM) or Ubuntu 22.04+
  • SensorPush G1 WiFi Gateway
  • Bun 1.x runtime

Installation

# Clone repository
git clone https://git.runfoo.run/malty/veridian-edge.git
cd veridian-edge

# Run installer
sudo ./scripts/install.sh

Configuration

Edit /opt/veridian-edge/config.json:

{
  "facilityId": "your-facility-uuid",
  "backendUrl": "https://api.veridian.runfoo.run",
  "backendApiKey": "your-api-key",
  "sensorpush": {
    "email": "sensors@facility.com",
    "password": "your-password"
  },
  "sensorMappings": [
    {
      "sensorId": "123456.7890",
      "roomId": "room-uuid",
      "name": "Flower Room 1"
    }
  ]
}

Service Management

# Start service
sudo systemctl start veridian-edge

# Check status
sudo systemctl status veridian-edge

# View logs
journalctl -u veridian-edge -f

# Health check
curl http://localhost:3030/health

Development

# Install dependencies
bun install

# Run in development mode
bun run dev

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  SensorPush     │ ──▶ │  Veridian Edge   │ ──▶ │  Veridian API   │
│  Cloud API      │     │  Agent           │     │  Backend        │
└─────────────────┘     └────────┬─────────┘     └─────────────────┘
                                 │
                        ┌────────▼─────────┐
                        │  SQLite Buffer   │
                        │  (offline cache) │
                        └──────────────────┘

License

Proprietary - Veridian Cultivation Platform