Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haroldeustaquio/electricity-mqtt-monitor
This repository focuses on extracting and storing electricity level data from a monitoring center using MQTT, storing the information in a database. This project will be integrated with the WhatsApp-Automation-Bot repository to send automatic notifications of electricity levels via WhatsApp.
https://github.com/haroldeustaquio/electricity-mqtt-monitor
automation database electricity monitoring mqtt mqtt-broker python-mqtt-client sqlite sqlite-database
Last synced: about 2 months ago
JSON representation
This repository focuses on extracting and storing electricity level data from a monitoring center using MQTT, storing the information in a database. This project will be integrated with the WhatsApp-Automation-Bot repository to send automatic notifications of electricity levels via WhatsApp.
- Host: GitHub
- URL: https://github.com/haroldeustaquio/electricity-mqtt-monitor
- Owner: haroldeustaquio
- License: mit
- Created: 2024-11-07T01:50:04.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-07T21:42:47.000Z (about 2 months ago)
- Last Synced: 2024-11-07T22:32:18.579Z (about 2 months ago)
- Topics: automation, database, electricity, monitoring, mqtt, mqtt-broker, python-mqtt-client, sqlite, sqlite-database
- Language: Jupyter Notebook
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Electricity MQTT Monitor
This repository provides a solution to monitor electricity levels using the MQTT protocol. We extract the data from MQTT, store it in several JSON files and select specific information to store in a database and generate alerts using WhatsApp.
---
## Project Description
### 1. Configuration and Extraction from MQTT
#### MQTT Broker Configuration:
The connection details to the MQTT broker are specified in the `broker.json` file, which should have the following structure:
```json
{
"broker": "",
"port": "",
"topics": ""
}
```
This file defines the MQTT broker, the connection port and the subscription topics to receive the monitoring data.---
### 2. Data Processing and Storage
#### Storage Files
- ``history.json``: Stores all the information received from MQTT to keep a complete record of the data.
- ``last_update.json``: Stores only the last update received, allowing quick access to the most recent information.
- ``part_1.json`` and ``part_2.json``: These are temporary files used to join partial messages. These files help to concatenate the data that, at the end of the process, is saved in ``history.json``.#### Selecting IDs
[in process...]
#### Database Storage
[in process...]
---
### 3. WhatsApp Notification
[in process...]
---
## Dependencies
This project requires the following libraries:
- `json`: To handle the creation and manipulation of JSON files.
- `mqtt`: Python library for communication through the MQTT protocol.