diff --git a/plugins/sources/EVCharger/evcharger.py b/plugins/sources/EVCharger/evcharger.py index 423200d..b636122 100644 --- a/plugins/sources/EVCharger/evcharger.py +++ b/plugins/sources/EVCharger/evcharger.py @@ -8,7 +8,7 @@ import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry -from utils.smahelpers import parameter_unit, isfloat +from utils.smahelpers import isfloat from utils.smasensors import register_sensor_dict, get_parameter_unit @@ -124,7 +124,7 @@ def execute(config, add_data, dostop): v = d['values'][0]['value'] if isfloat(v): v = round(v, 2) - unit = parameter_unit(name) + unit = get_parameter_unit('SENSORS_EVCHARGER', name) if unit: add_data(dname, (v, unit)) else: @@ -136,7 +136,7 @@ def execute(config, add_data, dostop): if isfloat(v): v = round(v, 2) idxname = dname + "." + str(idx + 1) - unit = parameter_unit(name) + unit = get_parameter_unit('SENSORS_EVCHARGER', name) if unit: add_data(idxname, (v, unit)) else: @@ -402,4 +402,4 @@ def execute(config, add_data, dostop): 'name': "PlantControl PCC ChrgActCnt", }, -] \ No newline at end of file +] diff --git a/pyproject.toml b/pyproject.toml index d608355..bcbb68d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"] [project] name = "smahub" -version = "1.6" +version = "1.6.1" authors = [{ name = "Daniel Krippner", email = "dk.mailbox@gmx.net" }] description = "Little daemon that runs plugins for collecting data from SMA PV products, and publishes to eg MQTT via other plugins." readme = "README.md" diff --git a/src/smahub.py b/src/smahub.py index 59cc515..432f76a 100644 --- a/src/smahub.py +++ b/src/smahub.py @@ -7,6 +7,7 @@ import signal import logging import debugpy + from smadict import SMA_Dict # Configure logging to print warn-level messages to the console @@ -204,6 +205,8 @@ async def main(args): logging.info(f"Holding startup, waiting for debug connection on port: {args.debug_port}") debugpy.wait_for_client() + logging.info(f"Starting {package_name} {version}") + # Main business logic load_plugins(args.source_dir, sources) load_plugins(args.sink_dir, sinks)