diff --git a/plugins/prometheus.py b/plugins/prometheus.py index 4812187440c1c6f3adba62c5de160dee433ca18a..da30b0a6e11d3749c66caada18a16a2ea712e993 100644 --- a/plugins/prometheus.py +++ b/plugins/prometheus.py @@ -28,7 +28,7 @@ class PluginPrometheus: start_http_server( addr=self.config["prometheus"].get('address', 'localhost'), - port=self.config["prometheus"]["port"] + port=int(self.config["prometheus"]["port"]) ) async def update_sensor_values(self, sensor): diff --git a/tempermon.ini b/tempermon.ini index a86cfdf573b5a456f07bc9f58187a542208dd585..03228124fc87a03d75b5b1ddd8bb28663c3ab91b 100644 --- a/tempermon.ini +++ b/tempermon.ini @@ -1,5 +1,5 @@ [general] -plugins = prometheus,mail,warnings +plugins=prometheus,mail,warnings [serial] #port=/dev/ttyUSB0 diff --git a/tempermonitor.py b/tempermonitor.py index d61b4477e9dfa4712ddd46688d1ee794aebc939f..c6c4dbe1571175f295d617e6706a189648d3736e 100755 --- a/tempermonitor.py +++ b/tempermonitor.py @@ -262,7 +262,7 @@ def main(): print(f"Active plugins: {active_plugins}") for filename in plugin_path.glob("*.py"): - if (plugin_path / filename).exists() and filename.name in active_plugins: + if (plugin_path / filename).exists() and filename.stem in active_plugins: print("loading {}".format(filename.name)) modname = "plugins." + filename.name.split('.')[0] module = importlib.import_module(modname)