Skip to content

umqtt.simple not working with Mosquitto broker 2.0.15 #638

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

Closed
YeeMoone opened this issue Apr 4, 2023 · 4 comments
Closed

umqtt.simple not working with Mosquitto broker 2.0.15 #638

YeeMoone opened this issue Apr 4, 2023 · 4 comments

Comments

@YeeMoone
Copy link

YeeMoone commented Apr 4, 2023

Hi!
umqtt.simple fails to connect to mosquito 2.0.15. It throws back MQTTException: 2.
My mosquitto log without any errors. The logs displayed are the same as when connecting to the server using the MQTT debugger(An app), so, maybe my mpy device is connected to mosquiro broker? But how to fix it?

By the way, my MQTT debugger was able to successfully connect to the mosquito without any errors, including publish and subscribe messages

my device: nodemcu-8266(12F) from Espressif
my mqtt server: Mosquitto broker 6.2.0 in homeassistant(VMware)

@basta
Copy link

basta commented Apr 4, 2023

Try setting keepalive=60 as an argument for MQTTClient, that fixed it for me

@YeeMoone
Copy link
Author

YeeMoone commented Apr 5, 2023

thanks, it's working for me too

@YeeMoone YeeMoone closed this as completed Apr 5, 2023
@andrewleech
Copy link
Contributor

andrewleech commented Apr 5, 2023

As Mosquitto is very common, maybe it makes sense to raise the default keepalive to that?

@basta
Copy link

basta commented Apr 5, 2023

Afaik it's caused by an update to mqtt protocol that requires this argument to be specified. It's not related to the default value. But I don't understand it much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants