Files
POE-sensor/main.py

26 lines
605 B
Python

#!/usr/bin/env python3
"""
Modbus to MQTT Bridge Service
This service reads temperature and humidity data from a Modbus TCP server
and publishes the data to an MQTT broker.
Usage:
python main.py
Author: POE Project
"""
import time
import logging
from sensor_bridge import main_loop
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logging.info("POE Sensor Bridge starting up...")
# Give the system a moment to initialize
time.sleep(2)
logging.info("Starting main sensor loop...")
main_loop()