This project has been developed in the context of the 4th International
oneM2M Hackathon.
We would like to thank all organizers of the oneM2M Hackathon.
Our team, MOSQUITTO INRIA UniCa team, operates as part of the INRIA (National Institute for Research in Digital Science and Technology), a leading French research institution dedicated to advancing digital sciences.
The work is being carried out within the context of a Research and Study Project, which is part of an evaluation at the university. We work on this project every friday and throughout the entire month of February, and we are currently 40% into the project's development.
We also would like to express our gratitude to the University of Nice Côte D'Azur for giving us the opportunity to carry out our project.
1. Challenges and IoT-Driven Solutions1.1. The ChallengeThe need for scalable, efficient, and automated systems for monitoring and mitigating environmental risks such as contamination and pollution has become increasingly important in various domains, including IoT-based solutions. With the development of standards for iot intercommunication such as oneM2M, there is an opportunity to create interoperable systems that integrate multiple components like APIs, databases, middleware, and sensors. However, implementing and maintaining these systems poses several challenges, particularly in multi-module environments that require seamless integration, scalability, and ease of deployment.
The key challenges that this project aims to address are:
- Real-Time Risk Monitoring and Forecasting :
Real-time monitoring is a critical component of any system aimed at detecting contamination or pollution. IoT-based systems require constant data collection from a variety of sources, including sensors deployed across multiple environments. These environments could range from public spaces such as transportation hubs to industrial facilities and residential areas. Without a centralized system to aggregate and process this data, contamination risks may remain undetected, leading to delayed responses and greater exposure to hazards.
- Standardization and Interoperability
IoT ecosystems typically consist of a diverse array of devices and software, each utilizing different communication protocols, data formats, and operational requirements. In implementations such as the INRIA ACT baseline, which integrates components like Python libraries, central and local servers, IoT sensors, and middleware, ensuring seamless communication poses a significant challenge.
- Sustainability of Development and Deployment
Managing a multi-module IoT system, such as the INRIA ACT baseline implementation, involves numerous tasks that can become resource-intensive without the right tools and processes. Critical operations like testing, deployment, and updates are particularly error-prone when carried out manually, highlighting the need for automation and robust management strategies.
- User Accessibility and Awareness
One of the key barriers to the adoption of protocols like the INRIA ACT baseline implementation is usability. Complex systems can discourage users whether end-users, developers, or administrators if the interface is not intuitive or if critical insights are difficult to access due to cluttered and poorly designed dashboards. This reduces the system's effectiveness, as users may face challenges in interpreting data and taking appropriate actions based on the information provided.
1.2. Project Strategies for Addressing the ChallengesTo address the outlined challenges, the project integrates advanced IoT technologies and standardized methodologies to create a scalable, reliable, and user-friendly Asynchronous Contact Tracing (ACT) system. Real-time monitoring is achieved through IoT sensors deployed in diverse locations, collecting data on key environmental metrics, which are aggregated via a centralized server using Flask APIs and analyzed using Python-based forecasting models. Standardization and interoperability are ensured through oneM2M-compliant middleware and Docker containerization, providing seamless communication and consistent functionality across devices and environments. Development and deployment are streamlined with a robust CI/CD pipeline implemented using GitLab CI, enabling automated testing, building, and updates while reducing manual intervention. Configuration management is centralized for uniform application of system settings, ensuring efficient scalability and maintenance. Together, these strategies deliver an automated, interoperable, and scalable solution for asynchronous monitoring and risk forecasting.
2. System Architecture and WorkflowThe diagram illustrates the operational workflow of the Asynchronous Contact Tracing system, emphasizing the communication and interaction between its core components to monitor and mitigate contamination risks efficiently. Here's a breakdown of the system:
- Detection Service (Application Entity)
Informs one or many Local Services about contamination detected in proximity areas associated with one or more Peripheral Services. Each Detection Service can manage multiple Peripheral Services and communicates contamination detections to the relevant Local Services.
Simulated using Python.
- Peripheral Service (Not a oneM2M node)
Exchanges monitoring and configuration information with one or more Local Services, including data required for managing the Detection Service.
Developed as a Python app.
- Local Service (Application Entity)
Collects all contamination data from Peripheral Services and sends it to the National Control Service via MQTT.
Developed using Python.
- National Control Service (Infrastructure Node - Common Service Entity)
Receives contamination data from one or more Local Services and provides guidance based on Public Health Authority policies. Configures Peripheral Services (e.g., broadcast frequency of identifiers or emission of forecast information) and interacts with users by providing contamination alerts, area suggestions, or test recommendations based on exposure.
Coordinates with other National Control Services across nations or regions to exchange forecasts and policies, ensuring international communication for users traveling across regions.
Implements the ACME oneM2M CSE to comply with the oneM2M IoT Standard.
Developed as a Python app.
- PC Application (Application Entity)
Provides a web-based interface for accessing data in specific zones.
Website: https://act.inria.fr/
- Smartphone Application (Application Entity)
Allows users to communicate with others to determine if they have been in contact with an infected person.
Built using Kotlin.
This Application Entity is not included in the 2024 Hackathon but is scheduled for release by the MOSQUITTO INRIA UniCa team in February 2025.
3. Integration of oneM2M Features in the ACT SolutionThe Asynchronous Contact Tracing (ACT) system leverages several key features of the oneM2M standard to ensure interoperability, scalability, and efficiency in IoT-based contamination monitoring and forecasting. Here’s an explanation of the oneM2M features utilized
- Common Service Entity (CSE)
The National Control Service uses oneM2M's CSE framework to manage data storage, retrieval, and communication across different system entities. This ensures standardized communication and data consistency within the ACT system.
- Inter-Domain Communication
oneM2M enables seamless communication across national and regional domains, allowing the ACT system to exchange contamination data and forecasts internationally. This is critical for users traveling across borders.
- Data Interoperability
Through oneM2M's standardized protocols, the ACT system ensures that diverse IoT devices, such as sensors from different manufacturers, can communicate effectively. This reduces integration complexity and enhances scalability.
- Subscription and Notification
oneM2M supports subscription mechanisms, allowing users and administrators to receive real-time alerts about contamination risks and system updates based on predefined triggers.
By leveraging these oneM2M features, the ACT system achieves interoperability, scalability, and reliable communication, positioning it as a robust solution for contamination risk management.
4.Download the projectThe necessary software resources are available in the GitLab repository :
https://gitlab.inria.fr/act
Important: Before downloading the project, ensure that the following software is installed:
- Mosquitto: This is needed for MQTT messaging. You can install it by following the instructions provided on the Mosquitto download page.
- MongoDB: This is required for the database. Please install it using the guidelines available in the MongoDB installation documentation.
Installation
It requires python3.11 to work.
Make sure to use python virtual environnement
python -m venv myenv
myenv/bin/activate
Install the dependencies via the requirements.txt file.
pip install -r requirements.txt
Note that requirements.txt uses a dev token that must change before deployement because it is deployed on gitlab.
Configuration
You need to configure the application by editing the profile variable in the config file of the library.
First create env files for different profiles, and than you can change the profile variable in the library :
/library/act_lib/config/config.py Change the profile variable to :
- dev : for Manual installation
- deploy : for Local docker
- prod : for Portainer
Manual Installation
In order to run the application, you must have mongodb and acme installed and running on your machine. Run mongodb using the following command:
sudo mongod --config /etc/mongod.conf
Run acme using the following command:
cd path/to/acme/repository
python -m acme
You can run the project using
python -m Server
4.2. Local ServiceInstall the dependencies via the requirements.txt file.
pip install -r requirements.txt
You can run the project using
python -m Services
Open your web browser and navigate to http://localhost:8090/
To simulate data with a Raspberry Pi functioning as virtual sensors (e.g., for temperature or other metrics), you need to initiate data emission and transmit it to the main server.
Run the following command to:
python3 .\exemple_raspberry.py
4.2. WebsiteTo set up the website, you need to download and install Node.js, then install Vite globally using the command:
npm i vite -g
You can run the server using :
vite
Open your web browser and navigate to http://localhost:5173/
The solution is already deployed and hosted, making it easy to access without the need for installation. To test and explore the solution, you can visit the following link:
6. Demonstration
Comments
Please log in or sign up to comment.