Home / Products / PiEdge
Edge IoT · SQL rule engine · Zero dependencies

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.

high_temp_alert.sql
SELECT device, temperature
FROM   sensors/site/#
WHERE  temperature > 28
POST /rules → live, no restart
# windowed average, every 60 s
SELECT device, avg(pressure) AS p
FROM   line2/pressure
GROUP BY device, TumblingWindow(60)
0external dependencies to install
10,000event bounded queue, backpressure-safe
3roles out of the box: viewer, admin, superadmin
95automated tests
The problem

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.

PiEdge closes every one of these gaps.

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.

How it works

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.

  • mqtt
  • http_poll
  • file_tail

Write it in SQL

SELECT the fields, WHERE to filter out noise, and GROUP BY a tumbling or sliding window to aggregate over time.

  • SELECT / WHERE
  • windows

Compile to operators

The SQL compiles into filter, transform, throttle and window-aggregate operators, chained in order. There's no generated code to maintain.

  • no codegen
  • composable

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.

  • log
  • rest
  • mqtt
Three ways to run it

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.

System architecture

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
Ships with a dashboard

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
Users & roles · site.piedge.local
UserRoleCan
adminsuperadminmanage users
m.torresadmincreate & run rules
line2.dashboardviewerread-only
j.okaforviewerread-only

Admins create, start, stop and delete rules from the browser, with no SSH. Changes persist to the engine's state file.

Why teams choose PiEdge

Built for the box on the wall, not the datacenter.

CapabilityKafka / FlinkCloud IoT platformsPiEdge
Runs on a Raspberry Pi✗Agent only✓ Full engine
Dependencies to installJVM, clusterVendor SDK✓ None
Rule languageCustom DSL / codeProprietary format✓ SQL
Cloud account requiredNoUsually✓ Never
REST API + dashboardSeparate toolingCloud console only✓ Included
PricingCluster costPer message / device-hour✓ The hardware you own
Works fully offlineIf self-hosted✗✓
Optionally pairs with Sightlinq.

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.

Where PiEdge is deployed

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.

Platform capabilities

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.