diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 828686a..3e8d853 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -4,6 +4,10 @@ on: push: branches: - master + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]-alpha[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]-beta[0-9]+' workflow_dispatch: jobs: @@ -36,4 +40,4 @@ jobs: push: true tags: | smartenergyplatform/smart-meter-dc:prod - ghcr.io/senergy-platform/smart-meter-dc:prod \ No newline at end of file + ghcr.io/senergy-platform/smart-meter-dc::${{ github.ref_name }} \ No newline at end of file diff --git a/Modfile.yaml b/Modfile.yaml index 33b5cb4..782a570 100644 --- a/Modfile.yaml +++ b/Modfile.yaml @@ -2,13 +2,13 @@ modfileVersion: "v1" id: github.com/SENERGY-Platform/mgw-smart-meter-dc name: Smart Meter Device Connector description: -version: v1.0.7 +version: v1.0.8 type: add-on deploymentType: single services: connector: name: Connector - image: ghcr.io/senergy-platform/smart-meter-dc:prod + image: ghcr.io/senergy-platform/smart-meter-dc:v1.0.8 dependencies: github.com/SENERGY-Platform/mgw-mqtt-broker: diff --git a/smart_meter/discovery.py b/smart_meter/discovery.py index 33bff92..56ad737 100644 --- a/smart_meter/discovery.py +++ b/smart_meter/discovery.py @@ -45,12 +45,14 @@ def probe_ports(ports: list) -> list: smart_meters = list() for port in ports: try: + logger.debug(f"try readiing from device {port}") srl_adptr = SerialAdapter(port) mfr_id, sm_id = srl_adptr.identify() if mfr_id and sm_id: logger.info("found smart meter '{}' with id '{}' on '{}'".format(mfr_id, sm_id, port)) smart_meters.append(("{}{}".format(conf.Discovery.device_id_prefix, sm_id), mfr_id, srl_adptr)) - except ReadError: + except ReadError as e: + logger.error("cant read from serial '{}'".format(e)) pass return smart_meters