This project collects data from IoT devices in a smart farm using Modbus TCP protocol and publishes the data to an MQTT broker.
Project Structure
config/
: Configuration files including farm information and device details.src/
: Source code for reading Modbus data and publishing to MQTT.logs/
: Directory for log files.requirements.txt
: Python dependencies.README.md
: Project documentation.
Setup
-
Install the required Python packages:
pip install -r requirements.txt
-
Configure your MQTT broker and device information in the config
directory.
-
Run the main program:
./run.sh
Building and Distributing the Package
-
Install necessary packages:
pip3 install setuptools wheel twine
-
Increase version, build package, and upload PyPI:
./build.sh
-
View at:
Copyright
ⓒ 2024. NDS all rights reserved.