Gateway Edge Agent
The Gateway Edge Agent (GEA) allows for running Edge Workflows on Edge Compute Devices. Doing so brings the power of WEGnology’s Visual Workflow Engine to a local environment within your IoT application, allowing for offline support, integrations with industrial equipment, and local hardware control.
The GEA is deployed as a Docker container into a computer or server on your local network. As a general rule, if the hardware is capable of running Linux, it is capable of running the GEA. However, the agent does have recommended system requirements.
Use Cases
There are a number of use cases that the Gateway Edge Agent exposes that would otherwise be difficult to implement in an IoT solution.
Integrations with Industrial Equipment
The GEA supports a variety of protocols for interfacing with various PLCs, registers, serial connections, and network devices. Building an integration with any one of these requires a significant amount of custom code; but each is exposed through the GEA as workflow nodes for different protocols and operations.
Since the Gateway Edge Agent runs as a Docker container, it is also possible to build your own interface with a protocol that WEGnology does not yet support and communicate between that integration and the GEA. This allows for extensibility of the agent where it is needed.
Offline Buffering
If the Gateway Edge Agent loses its internet connection, any generated state reports and custom MQTT topic messages are buffered on the device and replayed when the agent re-establishes a connection. This prevents loss of data in low connectivity environments and ensures that any cloud-side logic that should execute on receipt of those messages is maintained. The GEA will, at maximum, buffer 65,000 MQTT messages, at which point new messages will begin to overwrite the oldest buffered messages. When the GEA comes back online, it will begin sending these buffered messages to the WEGnology broker.
WEGnology relaxes its normal MQTT rate limits for the first 5 minutes after a GEA client connects, allowing the GEA to work through any buffered backlog of MQTT messages. If after 5 minutes, the GEA is still sending over the normal rate limits, WEGnology will kick the device for exceeding rate limits. If the GEA has still not made it through its buffer backlog, it will reconnect after the 30-second throttle period and begin working through the backlog again, eventually guaranteeing that the entire backlog of messages has been sent to WEGnology.
Local Control
Using the suite of logic nodes provided in Edge Workflows, it is possible to build a fully automated local control suite that can, for example, automatically adjust equipment operations or trigger emergency shutdowns without human intervention.
Also, through Device Commands and Virtual Buttons, those controls can be manually overridden whenever the agent has an internet connection. With a well-designed workflow, the thresholds at which the automated controls are triggered can also be adjusted through adjustments sent down from the cloud platform.
Getting Started with the GEA
To get started with the Gateway Edge Agent, you will have to follow these steps. More detailed information is available within the respective documentation for each section.
- In your application, create a new device and set its device type to “Edge Compute”. Only devices of this type can receive workflows to run locally from the WEGnology platform.
- Create an access key and secret for your new device. While we always recommend generating a new key/secret pair per device, this step may not be necessary if you already have a key and secret configured to work for all devices in your application, or to work for all devices with a tag that you applied to your device during creation.
- Deploy the Gateway Edge Agent (GEA) to your new device and configure it using the device ID, key, and secret from your previous steps. The GEA software package is necessary to receive Edge Workflows from WEGnology and to run them on the device.
- Create a new workflow of the “Edge Workflow” type. Make sure the Target Agent Version is less than or equal to the version of the Gateway Edge Agent you deployed to the device in the previous step.
- Set up your workflow using any of the nodes in the palette and save your work.
- When it is ready, deploy a version of your workflow to your Edge Compute device(s). If the device is connected to WEGnology’s MQTT broker – or when it connects next – the edge workflow version will deploy to the device and it will begin executing.
Installing or upgrading the GEA requires physical access to the device. After that, management of all edge compute functionality - device configuration, workflow setup and deployment schedules – takes place within the WEGnology platform and updates are pushed down to the devices over the internet.
Was this page helpful?
Still looking for help? You can also search the WEGnology Forums or submit your question there.