Appearance
Edge offline gateway
Run a small Edge Gateway on a computer at the plant when the internet link can drop. Devices on the LAN keep sending. The edge stores readings on disk and can raise simple threshold alarms locally. When the uplink returns, it forwards buffered telemetry to Autoconnecto.
This is not a second cloud and not a full local dashboard product. Device-side buffers on an ESP32 (firmware offline queue) are separate — see the Device SDK OfflineBuffer_mqtt example.
Where to get it
| Source | Use |
|---|---|
| Download Edge Gateway v0.1.1 (zip) | Install on a site PC or Linux SBC |
| In the app: Gateways | Short link to this page and the zip |
| Docs left menu: Edge offline gateway | This page |
The zip is the installable package (Node.js). The same source also lives in the Autoconnecto workspace under tools/edge-gateway/ for builders.
What you need
- An always-on PC or SBC on the plant LAN (Windows, Linux, or macOS)
- Node.js 18+
- Autoconnecto device tokens for the devices that will publish through the edge
- Optional: cloud MQTT host when you want store-and-forward to Autoconnecto (leave cloud off for offline-only lab)
Install (about ten minutes)
- Download the zip and unpack it on the site box.
- Open a terminal in the unzipped folder (it already contains
package.jsonandsrc/). - Run
npm install. - Copy
config.example.jsontoconfig.json. - Edit
config.json:devices[]— example id/label issite-sensor-1/ Site sensor 1; setdeviceTokenfrom Autoconnecto (Devices or Gateways)alarms[]— local thresholds (key, op, threshold)listen.mqttPort— lab default 18883 (change if the port is taken)cloud.enabled— keepfalseuntil you intentionally point at Autoconnecto or a lab broker
- Start:
npm start - Check
http://127.0.0.1:8090/healthz(or thehttpPortyou set).
Point devices at the edge
On each board or DTU that should use the edge, set the MQTT host to the edge box LAN IP and the MQTT port from config.json (default 18883, plain MQTT for the lab).
Publish telemetry on the usual topic shape:
devices/{deviceToken}/telemetry
with a flat JSON object (for example {"temperature":91,"humidity":40}).
Local alarms
Rules in config.json under alarms are profile-style thresholds only (greater/less than a number). They are written to the edge’s local alarm log (/alarms on the health port). They do not replace Autoconnecto profile alarm rules or the rule engine in the cloud. When both exist, say so on the plant so operators do not duplicate the same threshold blindly.
Cloud forward (optional)
When cloud.enabled is true, the edge flushes the disk queue to Autoconnecto MQTT using each device token. Use this only after a lab check. Wrong host or credentials can delay or duplicate traffic — keep cloud.enabled false until you are ready.
Related
- Gateways — hub devices in the Autoconnecto app
- Linux SBC quick start — device client on a Linux SBC (not this edge runtime)
- Alarm notification settings — mail, Telegram, mobile push
- Devices
