Skip to content

Commit

Permalink
fix: add proper fan reading
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerfred committed Apr 20, 2022
1 parent d084242 commit 3359560
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following metrics are exposed:
| `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` |

| `nilan_cts700_user_fan_speed` | `4747` | User fan speed | | `Gauge` |

## Installation

Expand Down
1 change: 1 addition & 0 deletions app/cts700_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"humidity_average": [20164, 1],
"humidity": [21776, 1],
"operating_mode": [20120, 1],
"user_fan_speed": [4747, 1],
}

client = ModbusTcpClient(host, port=port)
Expand Down
2 changes: 2 additions & 0 deletions app/prom_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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'])
gUserFanSpeed = Gauge('nilan_cts700_user_fan_speed', 'User fan speed')

gIndoorTemp.labels('°C')
gOutdoorTemp.labels('°C')
Expand All @@ -44,6 +45,7 @@ def setMetrics():
gHumidity.set(values['humidity'])
gOperatingMode.set(values['operating_mode'])
gSupplyAirTemp.labels('°C').set(values['supply_air_temp'])
gUserFanSpeed.set(values['user_fan_speed'])
except:
print("Unexpected error")
raise
Expand Down

0 comments on commit 3359560

Please sign in to comment.