From 12a430070a4e10bdab264eb9ce74f4f3d9a99cbc Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Wed, 20 Apr 2022 15:57:21 +0200 Subject: [PATCH] feat: add humindity --- README.md | 2 ++ app/cts700_modbus.py | 2 ++ app/prom_export.py | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 378cc4a..a060926 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,9 @@ The following metrics are exposed: | `nilan_cts700_water_temp_top` | `20520` | T11 top temperature in DHW water tank | Celsius | `Gauge` | | `nilan_cts700_water_temp_wanted` | `20460` | Hot water set point | Celsius | `Gauge` | | `nilan_cts700_humidity_average` | `20164` | Average Humidity | Percent | `Gauge` | +| `nilan_cts700_humidity` | `21776` | Actual Humidity | Percent | `Gauge` | | `nilan_cts700_operating_mode` | `20120` | Operating mode | | `Gauge` | +| `nilan_cts700_supply_air_temp` | `20284` | T2 supply air temperature | Celsius | `Gauge` | ## Installation diff --git a/app/cts700_modbus.py b/app/cts700_modbus.py index ccb7dce..ef4acdd 100644 --- a/app/cts700_modbus.py +++ b/app/cts700_modbus.py @@ -10,11 +10,13 @@ "outdoor_temp": [20282, 0.1], "indoor_temp": [20286, 0.1], "indoor_temp_wanted": [20260, 0.1], + "supply_air_temp": [20284, 0.1], "bypass_state": [21773, 1], "water_temp_bottom": [20522, 0.11], "water_temp_top": [20520, 0.11], "water_temp_wanted": [20460, 0.11], "humidity_average": [20164, 1], + "humidity": [21776, 1], "operating_mode": [20120, 1], } diff --git a/app/prom_export.py b/app/prom_export.py index ba4ed95..d75a829 100644 --- a/app/prom_export.py +++ b/app/prom_export.py @@ -17,7 +17,9 @@ gWaterTempTop = Gauge('nilan_cts700_water_temp_top', 'Water temperature top', ['scale']) gWaterTempWanted = Gauge('nilan_cts700_water_temp_wanted', 'Water temperature wanted', ['scale']) gHumidityAverage = Gauge('nilan_cts700_humidity_average', 'Humidity average') +gHumidity = Gauge('nilan_cts700_humidity', 'Humidity') gOperatingMode = Gauge('nilan_cts700_system_state', 'System State') +gSupplyAirTemp = Gauge('nilan_cts700_supply_air_temp', 'Supply air temperature', ['scale']) gIndoorTemp.labels('°C') gOutdoorTemp.labels('°C') @@ -25,6 +27,7 @@ gWaterTempBottom.labels('°C') gWaterTempTop.labels('°C') gWaterTempWanted.labels('°C') +gSupplyAirTemp.labels('°C') def setMetrics(): @@ -38,7 +41,9 @@ def setMetrics(): gWaterTempTop.labels('°C').set(values['water_temp_top']) gWaterTempWanted.labels('°C').set(values['water_temp_wanted']) gHumidityAverage.set(values['humidity_average']) + gHumidity.set(values['humidity']) gOperatingMode.set(values['operating_mode']) + gSupplyAirTemp.labels('°C').set(values['supply_air_temp']) except: print("Unexpected error") raise