diff --git a/.gitignore b/.gitignore index d02036f96a65ad892d7efcb07f1b270465df1731..fac4925fe73c3e5b7c043cdfd2cd4cc7b6312feb 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,5 @@ venv.bak/ .vscode/settings.json logs/ + +private_testing/ diff --git a/README.md b/README.md index 8748f4513e716cd9e2a119bfdfc71d9aaf1c6daa..f972812e884890e9a366902b49df9e9b3d6fbd34 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,9 @@ To obtain credentials for MQTT-Broker of WZL-MQ-MS contact [Mark Sanders](mailto For more detailed explanation and full API documentation, view [https://iot.wzl-mq.rwth-aachen.de/documentation/libs/mqtt/](https://iot.wzl-mq.rwth-aachen.de/documentation/libs/mqtt/) ## Changelog +2.4.1 +- made the error message of code 1 more precise + 2.4.0 - added vhost parameter to connect function of client - changed default logging behaviour diff --git a/setup.py b/setup.py index 7ce55fa730211a04711ff3e4894359da551fcf55..cc01c2f5571b2eb75171e06bfd244c332f71230d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='wzl-mqtt', - version='2.4.0', + version='2.4.1', url='', author='Benjamin Montavon, Matthias Bodenbenner', author_email='m.bodenbenner@wzl.rwth-aachen.de', diff --git a/src/mqtt/client.py b/src/mqtt/client.py index a17815c1586a3dd17d4e8b95e563d103b2173e7f..ba065ca1ec84790a053a85fad18069b1b29238a6 100644 --- a/src/mqtt/client.py +++ b/src/mqtt/client.py @@ -144,10 +144,12 @@ class MQTTClient: def _on_disconnect(self, client, userdata, rc): if rc == 1: self._logger.error( - "MQTT Client {} disconnected with code {} ({}). \n \t There are two possible reasons: \n" - "\t\t 1. You may tried to use Publisher-Credentials for receiving messages or vise versa.\n" - "\t\t 2. You tried to publish to or subscribe a topic which you are not allowed to do. \n" - "Please contact Mark Sanders or Matthias Bodenbenner, to check if your login credentials are correct!".format( + "MQTT Client {} disconnected with code {} ({}). \n \t There are various possible reasons for that: \n" + "\t\t 1. You used port 8883 but did not set the 'ssl' flag (or used port 1883 and set the 'ssl' flag).\n" + "\t\t 2. You may tried to use Publisher-Credentials for receiving messages or vise versa.\n" + "\t\t 3. You tried to publish to or subscribe a topic which you are not allowed to do. \n" + "\t\t 4. Something else, which has not been experienced by the developers of this library. Sorry!\n" + "If you don't find a solution, please contact Mark Sanders or Matthias Bodenbenner to check if your login credentials are correct!".format( self.name, rc, mqtt.error_string(rc))) else: self._logger.info(