Add Tapo T315 data exporter and adjust export schedule intervals
This commit is contained in:
@@ -8,6 +8,7 @@ from awinlib.PrometheusDataExporter import (
|
||||
CpuFanTempDataExporter,
|
||||
HddTempDataExporter,
|
||||
KasaPowerStripDataExporter,
|
||||
TapoT315DataExporter,
|
||||
)
|
||||
from awinlib.utilities import datetimeNow, loadJson, log
|
||||
|
||||
@@ -59,8 +60,8 @@ def main(configs):
|
||||
t315Atticexporter = TapoT315DataExporter(secrect["ip"], secrect["username"], secrect["password"], "鐵皮屋-溫濕度感測器", "attic-sensors")
|
||||
gaugeDict = {}
|
||||
|
||||
schedule.every( 1).seconds.do(exportData, gaugeDict=gaugeDict, exporters=(hddTempExporter, cpuFanTempExporter, powerStripLivingroomExporter, powerStripAtticExporter))
|
||||
schedule.every(5).seconds.do(exportData, gaugeDict=gaugeDict, exporters=(t315Atticexporter,))
|
||||
schedule.every( 5).seconds.do(exportData, gaugeDict=gaugeDict, exporters=(hddTempExporter, cpuFanTempExporter, powerStripLivingroomExporter, powerStripAtticExporter))
|
||||
schedule.every(60).seconds.do(exportData, gaugeDict=gaugeDict, exporters=(t315Atticexporter,))
|
||||
|
||||
## Start Prometheus server
|
||||
prometheusServerPort = configs.get("port", DEFAULT_PORT)
|
||||
|
||||
Reference in New Issue
Block a user