Update configuration and health check response structure in POE project. Modified config.py to replace IP addresses for Modbus hosts, ensuring accurate sensor location mapping. Refactored health_check.py to standardize response formatting for sensor data, enhancing clarity in health and sensor status reporting. Updated README.md to reflect changes in MQTT topic structure, aligning with new data point definitions for temperature, humidity, and CO2 sensors.
This commit is contained in:
30
README.md
30
README.md
@ -73,26 +73,26 @@ python main.py
|
||||
The service uses a hierarchical topic structure for better organization:
|
||||
|
||||
```
|
||||
Location/{location_name}/{sensor_type}/Time
|
||||
Location/{location_name}/{sensor_type}/Status
|
||||
Location/{location_name}/{sensor_type}/Data/temperature
|
||||
Location/{location_name}/{sensor_type}/Data/humidity
|
||||
Location/{location_name}/{sensor_type}/Data/co2 # CO2 sensors only
|
||||
Location/{location_name}/{sensor_type}/alerts # Alert messages
|
||||
Location/{location_name}/{sensor_type}/Time # Timestamp
|
||||
Location/{location_name}/{sensor_type}/Status # "online" or "offline"
|
||||
Location/{location_name}/{sensor_type}/Temperature # Temperature value
|
||||
Location/{location_name}/{sensor_type}/Humidity # Humidity value
|
||||
Location/{location_name}/{sensor_type}/CO2 # CO2 sensors only
|
||||
Location/{location_name}/{sensor_type}/alerts # Alert messages
|
||||
```
|
||||
|
||||
### Example Topics
|
||||
```
|
||||
Location/Warehouse-B/temperature-humidity/Time → "2024-01-15 10:30:25"
|
||||
Location/Warehouse-B/temperature-humidity/Status → "online"
|
||||
Location/Warehouse-B/temperature-humidity/Data/temperature → "23.5"
|
||||
Location/Warehouse-B/temperature-humidity/Data/humidity → "65.2"
|
||||
Location/Warehouse-B/temperature-humidity/Time → "2024-01-15 10:30:25"
|
||||
Location/Warehouse-B/temperature-humidity/Status → "online"
|
||||
Location/Warehouse-B/temperature-humidity/Temperature → "23.5"
|
||||
Location/Warehouse-B/temperature-humidity/Humidity → "65.2"
|
||||
|
||||
Location/Office/CO2-gas/Time → "2024-01-15 10:30:25"
|
||||
Location/Office/CO2-gas/Status → "online"
|
||||
Location/Office/CO2-gas/Data/temperature → "24.1"
|
||||
Location/Office/CO2-gas/Data/humidity → "58.3"
|
||||
Location/Office/CO2-gas/Data/co2 → "420"
|
||||
Location/Office/CO2-gas/Time → "2024-01-15 10:30:25"
|
||||
Location/Office/CO2-gas/Status → "online"
|
||||
Location/Office/CO2-gas/Temperature → "24.1"
|
||||
Location/Office/CO2-gas/Humidity → "58.3"
|
||||
Location/Office/CO2-gas/CO2 → "420"
|
||||
```
|
||||
|
||||
### Alert Format
|
||||
|
Reference in New Issue
Block a user