This repository is a companion of the ASSIST-IoT CHEaaS project deliverable #2.
This project is released under the terms of the Eclipse Public License v2.0.
data-sender
: A Python script that can replay recorded data.rest-health-endpoint
: Implementation of the ASSIST-IoT enablers REST endpoint, providing status information and metrics.sensinact-run
: Run environment for an Eclipse sensiNact instance with CHEaaS support.sensinact-enabler
: A docker image definition and an Helm Chart to deploy it in an ASSIST-IoT Kubernetes architecture.
- Compile the REST health endpoint with Maven:
cd rest-health-endpoint/ mvn clean install cd ..
- Prepare the Eclipse sensiNact instance repository
cd sensinact-run/ mvn clean prepare-package
- Configure Eclipse sensiNact by editing
sensinact-run/configuration/configuration.json
- Make sure the MQTT configuration is correct, in the
sensinact.southbound.mqtt~mqtt-cheaas
entry. See the Eclipse sensiNact MQTT client documentation for more details.
- Make sure the MQTT configuration is correct, in the
- Run the Eclipse sensiNact instance
cd sensinact-run/ docker compose up -d
- Query the Eclipse sensiNact REST endpoints:
-
Check the instance health (should return HTTP status 200)
curl http://localhost:8080/v1/health
-
Check the providers (CHE) inside Eclipse sensiNact:
curl http://localhost:8080/sensinact/providers
More details on the Eclipse sensiNact REST endpoint are available here: Eclipse sensiNact REST northbound documentation
-
To test the bridge, you can replay a sample of the CHE data available in the ASSIST-IoT OnlyOffice server.
- Install Python 3.12 (might work with newer versions)
- Install dependencies:
python -m pip install paho-mqtt tqdm
paho-mqtt
: the Eclipse Paho MQTT clienttqdm
: TQDM progress bar handler
- Check the arguments documentation:
python data-sender/sender.py --help
- Download a data sample. We will then consider its name is
payload.json
- Run the sender script:
python data-sender/sender.py -i payload.json
- Download a data sample. We will then consider its name is
payload.json
- Copy
payload.json
to thedata-sender/data
folder - Update the
data-sender/compose.yaml
file to ensure that:- the input payload binding is correct
- the script
--input
argument points to the right place - if necessary, add arguments to connect a specific MQTT broker
- Compile the image:
docker compose -f data-sender/compose.yaml build
- Run the sender:
docker compose -f data-sender/compose.yaml up -d