Skip to content
Snippets Groups Projects
Commit 3a54fb1f authored by Matthias Stefan Bodenbenner's avatar Matthias Stefan Bodenbenner
Browse files

made error message more precise

parent c80bd202
No related branches found
No related tags found
No related merge requests found
Pipeline #104140 passed
......@@ -114,3 +114,5 @@ venv.bak/
.vscode/settings.json
logs/
private_testing/
......@@ -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
......
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',
......
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment