Closed TrevisGordan closed 5 years ago
Hi, maybe your main loop:
while True:
pass
is blocking other routines. Try to use await asyncio.sleep(1)
instead of pass
.
Yes, Yes, Yes! - Of course! I can absolutely not believe it. I used the example code and commented it out, not thinking about it. I absolutely should have noticed it. Since there were no other RAM debug messages etc. - Thank you a lot!
Hello Peter, I unsuccessfully tried to implement the MQTT class into an own class to control it. But so far it is not working and I don't understand why. It works to publish messages from inside a class but not to subscribe to topics or calling the callback-func.
This is the Full code. which should make it self-explanatory what I'm trying to archive (I hope).
Comment Notes:
MQTTClient.LOGGING = True
is the logging functionality described in the pull request.Also:
client.connect()
,self.client.publish
works. Any Help would be highly appreciated!