Skip to content

Commit

Permalink
feat: add humindity
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerfred committed Apr 20, 2022
1 parent 7510b66 commit 12a4300
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions app/cts700_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}

Expand Down
5 changes: 5 additions & 0 deletions app/prom_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
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')
gIndoorTempWanted.labels('°C')
gWaterTempBottom.labels('°C')
gWaterTempTop.labels('°C')
gWaterTempWanted.labels('°C')
gSupplyAirTemp.labels('°C')


def setMetrics():
Expand All @@ -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
Expand Down

0 comments on commit 12a4300

Please sign in to comment.