-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin fails to connect to Mosquitto #143
Comments
The Issue seems to affect only re-connects (e.g. after config-changes). When octoprint is restarted the plugin connects just fine. Issue seems to be here: OctoPrint-MQTT/octoprint_mqtt/__init__.py Line 443 in ee6b4d0
subbed_topics seems to hold an invalid value. I did some debugging:
subbed_topics = list(map(lambda t: (t, 0), {topic for topic, _, _, _ in self._mqtt_subscriptions}))
self._logger.info("listing topics to sub:")
for topic in subbed_topics:
self._logger.info(f"subbing topic: {topic}")
if subbed_topics:
self._mqtt.subscribe(subbed_topics)
self._logger.debug("Subscribed to topics") which yields:
Looks like the plugin is trying to subscribe to emptystring as a topic (which would -for all I know- indeed not be valid). Not sure how it makes its way into OctoPrint-MQTT/octoprint_mqtt/__init__.py Line 390 in ee6b4d0
|
What were you doing?
I'm trying to connect to my local mqtt-instance.
What did you expect to happen?
The plugin should connect to the MQTT-Broker.
What happened instead?
The plugin attempts to connect to the MQTT server but seemingly fails to do so at some point. The only thing that happens, is the 'octoPrint/mqtt' topic is set to 'octoPrint/mqtt' (the default will-topic). So the connection itself seem to work to some extent.
Version of OctoPrint
Octoprint Version:
1.9.3
Version of the MQTT plugin
OctoPrint-MQTT Version:
0.8.13
Used MQTT broker and its version
MQTT-Broker:
mosquitto version 1.5.7
Link to octoprint.log
octoprint.log
Syslog has an exception-message:
Excerpt from the broker log (debug-mode):
The text was updated successfully, but these errors were encountered: