The Stable-Pi-Core project is an advanced edge computing solution designed for real-time data collection, processing, and analysis from IoT devices. This project leverages MQTT and CoAP protocols for efficient communication, enabling seamless integration with various sensors and devices. The architecture supports anomaly detection, pattern recognition, and data analytics, making it suitable for applications in smart homes, industrial automation, and environmental monitoring.
- Data Collection: Collects data from multiple sensors (temperature, humidity, etc.) using MQTT and CoAP protocols.
- Data Processing: Implements real-time data processing with anomaly detection and pattern recognition capabilities.
- Communication: Supports MQTT for lightweight messaging and CoAP for constrained environments.
- Logging: Comprehensive logging for monitoring and debugging.
- Configuration Management: Easy-to-manage configuration files for MQTT and CoAP settings.
stable-pi-core/
│
├── edge-computing/
│ ├── config/
│ │ ├── edge-config.yaml
│ │ └── mqtt-config.yaml
│ ├── data-processing/
│ │ ├── analytics/
│ │ │ ├── anomaly-detection.py
│ │ │ └── pattern-recognition.py
│ │ ├── data-collector.py
│ │ └── data-processor.py
│ ├── communication/
│ │ ├── coap-client.py
│ │ └── mqtt-client.py
│ ├── tests/
│ │ ├── test_communication.py
│ │ └── test_data_processing.py
│ └── README.md
└── main.py
- Python 3.7 or higher
- Required Python packages:
paho-mqtt
aiocoap
numpy
scikit-learn
PyYAML
unittest
(for testing)
-
Clone the repository:
git clone https://github.com/KOSASIH/stable-pi-core.git cd stable-pi-core/edge-computing
-
Install the required packages:
pip install paho-mqtt aiocoap numpy scikit-learn PyYAML
-
Configure the MQTT and CoAP settings in the
config
directory:- Update
mqtt-config.yaml
with your MQTT broker details. - Create or update
coap-config.yaml
with your CoAP server details.
- Update
To start collecting data from sensors, run the data collector:
python data-processing/data-collector.py
To process the collected data and detect anomalies, run the data processor:
python data-processing/data-processor.py
To communicate with the MQTT broker, run the MQTT client:
python communication/mqtt-client.py
To send requests to a CoAP server, run the CoAP client:
python communication/coap-client.py
To run the unit tests for data processing and communication modules, execute:
python -m unittest discover -s tests
Contains settings for edge devices, including data collection intervals and processing parameters.
Defines the MQTT broker settings, including host, port, topics, and QoS levels.
Specifies the CoAP server address and resource path.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries, please contact KOSASIH.