diff --git a/docs/reference/changelog.rst b/docs/reference/changelog.rst index 298a642f6..58a852f42 100644 --- a/docs/reference/changelog.rst +++ b/docs/reference/changelog.rst @@ -17,9 +17,10 @@ Current version :doc:`How to update` *(minor updates only)* -v4.17.0 - 2021-xx-xx +v4.16.1 - 2021-05-11 -------------------- +- ``Fixed`` MQTT client keeps reconnecting when using QoS level 0 [`#1383 `_] v4.16.0 - 2021-05-10 diff --git a/dsmr_mqtt/services/broker.py b/dsmr_mqtt/services/broker.py index 4d01e9e09..e4bf8ad54 100644 --- a/dsmr_mqtt/services/broker.py +++ b/dsmr_mqtt/services/broker.py @@ -79,11 +79,15 @@ def run(mqtt_client): retain=True ) + # Do NOT remove this. It is both required for networking when having QoS > 1 and mqtt_client.is_connected() + # below. Omitting this loop will have the client think it's disconnected. + mqtt_client.loop(0.5) + # Does nothing when using QoS 0 (as designed). For QoS 1 and 2 however, this blocks further processing and # message deletion below, until the broker acknowledges the message received. logger.debug('MQTT: Waiting for message (#%s) to be marked published', current.pk) while not result.is_published(): - mqtt_client.loop(0.5) + mqtt_client.loop(0.1) logger.debug('MQTT: Deleting published message (#%s) from queue', current.pk) current.delete() diff --git a/dsmrreader/__init__.py b/dsmrreader/__init__.py index ab3a82557..a6f623c4d 100644 --- a/dsmrreader/__init__.py +++ b/dsmrreader/__init__.py @@ -1,5 +1,5 @@ from django.utils.version import get_version -VERSION = (4, 17, 0, 'final', 0) +VERSION = (4, 16, 1, 'final', 0) __version__ = get_version(VERSION) diff --git a/dsmrreader/provisioning/downgrade/v4.16.1.sh b/dsmrreader/provisioning/downgrade/v4.16.1.sh new file mode 100644 index 000000000..9f13eea45 --- /dev/null +++ b/dsmrreader/provisioning/downgrade/v4.16.1.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Dump for DSMR-reader v4.16.1 +./manage.py migrate dsmr_api 0003_create_api_user +./manage.py migrate dsmr_backend 0015_backend_restart_required +./manage.py migrate dsmr_backup 0013_dropbox_setting_refactoring +./manage.py migrate dsmr_consumption 0019_energy_supplier_price_decimals +./manage.py migrate dsmr_datalogger 0030_override_telegram_timestamp +./manage.py migrate dsmr_dropbox 0001_schedule_dropbox +./manage.py migrate dsmr_frontend 0043_default_color_update_tariff_2 +./manage.py migrate dsmr_influxdb 0004_client_settings_update +./manage.py migrate dsmr_mindergas 0005_schedule_mindergas_export +./manage.py migrate dsmr_mqtt 0019_mqtt_current_period_totals +./manage.py migrate dsmr_notification 0008_dummy_notification_provider +./manage.py migrate dsmr_pvoutput 0004_pvoutput_setting_refactoring +./manage.py migrate dsmr_stats 0017_day_statistics_reading_history_retroactive +./manage.py migrate dsmr_weather 0006_schedule_weather_update