Files
POE-sensor/memory-bank/projectbrief.md
2025-05-29 11:06:22 +07:00

25 lines
1.4 KiB
Markdown

# Project Brief
## Project Name
Modbus-to-MQTT Bridge for Environmental Sensor
## Overview
This project implements a Python-based bridge that reads temperature and humidity data from a Modbus TCP device and publishes the readings to an MQTT broker in JSON format. The system is designed for continuous, automated data acquisition and integration with IoT or monitoring platforms.
## Core Requirements
- Connect to a Modbus TCP device (sensor gateway) to read holding registers for temperature and humidity.
- Process and calibrate the raw sensor data as per device documentation.
- Publish the processed data to a specified MQTT topic at a configurable interval.
- Support MQTT authentication (username/password).
- Provide clear logging for connection, data acquisition, and publishing events.
## Goals
- Enable seamless integration of Modbus-based sensors with MQTT-based IoT systems.
- Ensure reliable, periodic data transfer with error handling and reconnection logic.
- Maintain code clarity and extensibility for future enhancements (e.g., more sensors, additional data fields).
## Scope
- Single Python script (poe.py) as the main application.
- No web interface or GUI; headless operation via command line.
- Focus on environmental data (temperature, humidity) but extensible for other Modbus registers.
- No persistent storage; data is transient and only sent to MQTT.