SensorPush Edge Agent for Veridian Cultivation Platform
| scripts | ||
| src | ||
| .gitignore | ||
| bun.lock | ||
| config.example.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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