This example shows how Apama can be used on a thin-edge device to process and filter events to reduce the frequency of messages sent to the cloud.
The EPL file in this sample (ThinEdgeIoExample.mon) collates temperature, pressure and vibration events, averages them and sends a measurement combining those averages at 5 second intervals to thin-edge.io via MQTT.
Copyright (c) 2022-2023 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG
Follow the setup and configuration instructions in the README file in the parent directory before running this sample.
Ensure that the thin-edge device has Python 3 installed, that it is on your
$path
, and that you have installed paho-mqtt
:
sudo apt-get install python3
pip install paho-mqtt
Note: If you intend to modify or extend this sample it is recommended that you delete the provided config.yaml file and use
engine_deploy
from a full Apama installation to build a deployable version of your project which you then copy to the thin-edge device. This is because changing this sample could break the configuration in config.yaml and usingengine_deploy
works out the correct initialization order when creating a deployable project.
Zip the project located in the LimitedBandwidth
directory of this repository. Note that you must use the zip format and not some other compression utility. Then use your tenant to deploy the zipped project to your thin-edge device by following these steps:
demo_publisher.py
script in the LimitedBandwidth
directory to the
/etc/tedge/apama/project
directory on the thin-edge device. Execute the script to send some fake
temperature, pressure and vibration measurements to the Apama application.