Skip to content
Back to Knowledge Base

What are Edge Apps?

Applies to CoCoCo platform v1.0.0-rc.31. Checked against the Edge Apps pages and the edge app runtime definition of that version.

An Edge App is a small Lua program that you define once for your whole instance and then install on one or more Controllers, so that it runs on site, next to your machines.

A Controller sits in your own network. Code that runs there can reach things the cloud cannot reach directly, for example a local MQTT broker, an OPC UA server, SNMP or Modbus devices, files on a local disk, or a command-line tool on that computer.

In the Edge App editor you assemble an app from building blocks:

Building blockWhat it does
ScheduleRun Lua on a cron schedule.
File tailRun Lua per appended line of a log file.
File appears / File disappearsRun Lua when a file is created in or removed from a directory.
MQTT broker / MQTT subscriptionConnect to a broker, subscribe to topics and run Lua per message.
OPC UA endpointConnect to an OPC UA server and run Lua per NodeId update.
SNMP devicePoll OIDs (v2c or v3) and run Lua per response.
Modbus portPoll holding/input/coil registers via TCP or RTU.
Exec commandDeclare a command-line program that Lua may call.
HTTP routeServe an HTTP endpoint on the Controller.
RPC handlerExpose a function that can be called from the cloud.
VariableDeclare a setting that can differ per Controller.
Shared code / LibraryReusable Lua code for the app’s handlers.

From its Lua code, an Edge App can send events and GraphQL mutations to the platform, write to its configured MQTT brokers and OPC UA endpoints, keep small values in its own storage, and write log lines.

Every Edge App has a version number and a lifecycle status:

  • Draft: the working copy. Only a draft can be edited and saved. A draft is not sent to any Controller.
  • Published: frozen. Clicking Publish on a draft asks for confirmation, freezes that version and marks the previously published version as deprecated. The page then shows “Read-only — this version is frozen.” To change a published app, click Create new draft.
  • Deprecated: an older frozen version. It is hidden from the Edge Apps list by default (use the Lifecycle filter to show it). Installations that use it keep working until they are upgraded.

An Edge App Installation puts one published version of an Edge App onto one Controller. Each installation has its own values for the app’s variables, and it can be active or inactive. When a newer version is published, installations are not moved automatically; each one stays on its version until it is upgraded.

Sidebar → IoT → Edge Apps. The page also offers Import and a Test Console. Installations are listed under Edge App Installations.