PiEdge
From raw sensor stream to actionable signal, without leaving the device.
PiEdge filters, aggregates and routes sensor and IoT data locally, on an industrial PC, a Jetson, a Raspberry Pi or any edge box, before anything reaches the cloud. Rules are written in familiar SQL, not a new DSL. The engine, REST API, dashboard and authentication have zero external dependencies.
SELECT device, temperature FROM sensors/site/# WHERE temperature > 28
# windowed average, every 60 s SELECT device, avg(pressure) AS p FROM line2/pressure GROUP BY device, TumblingWindow(60)
Not every sensor reading needs a round trip to the cloud.
Most edge deployments pick one of two extremes: stream every raw reading to the cloud and pay for it, or bolt on a streaming platform built for a datacenter. Neither fits a single box bolted to a wall.
Every reading goes to the cloud
A hundred sensors reporting every second adds up in bandwidth, ingestion cost and pipelines that process 99% noise.
Decisions can't wait
A freezer drifting out of range or a pressure spike shouldn't wait on a cloud round trip before anyone is alerted.
Kafka and Flink aren't built for a Pi
They assume a cluster, a JVM and an ops team. A constrained edge box has none of those, and doesn't need them.
Vendor platforms want your account
Edge-to-cloud platforms assume a subscription and a cloud account, which rules them out for air-gapped and IP-sensitive sites.
Yet another rules language
Teams who know SQL shouldn't need a bespoke DSL just to say "alert me when temperature exceeds 28°C".
Every tweak is a redeploy
Hard-coded thresholds turn every tuning change into a rebuild and a redeploy to every device in the field.
One lightweight engine, SQL rules you can change without a redeploy, and a REST API and dashboard to manage it, all on the device with zero external dependencies.
One SQL statement. A running rule.
A rule is a source, a SQL-style query and one or more sinks. Write it, POST it to the running engine, and it's live.
Connect a stream
MQTT topics, polled HTTP endpoints, tailed log files or the built-in simulator, all publishing onto one bounded, thread-safe queue.
Write it in SQL
SELECT the fields, WHERE to filter out noise, and GROUP BY a tumbling or sliding window to aggregate over time.
Compile to operators
The SQL compiles into filter, transform, throttle and window-aggregate operators, chained in order. There's no generated code to maintain.
Route the result
Matches fan out to any combination of sinks: a log, an in-memory buffer the dashboard reads, a file, a REST callback or another MQTT topic.
YAML, CLI or REST. Whichever fits your stack.
Declarative YAML
piedge --config piedge.yml
Sources, sinks, rules, API and auth in one version-controlled file. Ideal for fleet deployments.
Command line
piedge --port 9081 --config piedge.yml
Flags override config at launch. The same binary powers every deployment mode.
REST API
POST /rules · PUT /rules/{id}/stop
Create, start, stop and delete rules on a live engine. Rules added over REST persist and survive a restart.
Sources in. Sinks out. Nothing in between.
One process, one bounded queue, and one dispatcher thread pushing events through every matching rule. No broker, no cluster, no separate database.
Ingestion layer
- One thread per source: MQTT, HTTP, file tail, simulator
- Bounded queue (maxsize 10,000), backpressure-safe
- New source types plug in without touching the engine
Processing layer
- Dispatcher routes events to every matching rule
- Filter, Transform, Throttle, WindowAggregate
- Per-rule processed and error counters
Output & control
- Log, memory, file, REST, MQTT and fan-out sinks
- REST API on the standard library, with no framework
- Cookie-session auth backed by a local user database
Sign in once. Everyone gets the right access.
A single-file dashboard talks to the same REST API you'd script against: live rule status, stream previews and engine logs, behind a login and three built-in roles.
- No hard-coded defaults: the first superadmin password is random and printed once
- Passwords hashed with PBKDF2-SHA256 at 260,000 iterations, with a per-user salt
- Five failed logins trigger a cooldown
- The last superadmin can't be deleted or demoted by mistake
- Light and dark modes, in one HTML file with no build step
| User | Role | Can |
|---|---|---|
| admin | superadmin | manage users |
| m.torres | admin | create & run rules |
| line2.dashboard | viewer | read-only |
| j.okafor | viewer | read-only |
Admins create, start, stop and delete rules from the browser, with no SSH. Changes persist to the engine's state file.
Built for the box on the wall, not the datacenter.
| Capability | Kafka / Flink | Cloud IoT platforms | PiEdge |
|---|---|---|---|
| Runs on a Raspberry Pi | ✗ | Agent only | ✓ Full engine |
| Dependencies to install | JVM, cluster | Vendor SDK | ✓ None |
| Rule language | Custom DSL / code | Proprietary format | ✓ SQL |
| Cloud account required | No | Usually | ✓ Never |
| REST API + dashboard | Separate tooling | Cloud console only | ✓ Included |
| Pricing | Cluster cost | Per message / device-hour | ✓ The hardware you own |
| Works fully offline | If self-hosted | ✗ | ✓ |
PiEdge stands on its own. If you run both, the same edge box can host Sightlinq inference and PiEdge side by side: Sightlinq publishes vision events to a local MQTT topic, and PiEdge rules filter and route them alongside sensor telemetry.
Any sensor. Any edge device.
Manufacturing telemetry
Temperature, humidity and pressure thresholds, with windowed averages that catch drift before a stoppage.
Cold chain
Instant local alerts the moment a unit drifts out of range.
HVAC & buildings
Occupancy-aware climate rules and equipment fault detection.
Fleet & vehicles
Harsh braking, engine fault codes and geofence breaches, handled onboard.
Agriculture
Soil moisture and irrigation thresholds on sites with patchy connectivity.
Energy & solar
Per-minute inverter windows, with anomaly rules that flag underperformance.
Water & utilities
Leak-rate detection from flow windows, computed at the meter.
Retail estates
Walk-in coolers and store conditions across many small sites.
Everything an edge rule engine needs. Nothing it doesn't.
Multiple source types
MQTT, HTTP polling, file tailing and a simulator, each on its own thread.
SQL-style rules
SELECT, WHERE and GROUP BY compile to a chain of composable operators.
Tumbling & sliding windows
Counts, averages and peaks over fixed or overlapping windows.
Built-in throttling
Rate-limit noisy sources per rule to protect callbacks and egress links.
Composable sinks
Fan out per rule, with a wrapper so one failing sink never blocks the rest.
Hot rule reload
Add, stop or remove rules without a restart. Dynamic rules persist to the state file.
Ready to put PiEdge on your edge devices?
Production-ready for manufacturing, cold chain, fleet, agriculture and beyond. Tell us about your sensors and we'll help you write the first rule.