Skip to content
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

Add support for MQTT-PAHO 2.0 versioned callbacks #8

Open
KIKI007 opened this issue Feb 10, 2024 · 2 comments
Open

Add support for MQTT-PAHO 2.0 versioned callbacks #8

KIKI007 opened this issue Feb 10, 2024 · 2 comments

Comments

@KIKI007
Copy link

KIKI007 commented Feb 10, 2024

Problem:

In the file mqtt_paho.py
when creating a client

self.client = mqtt.Client()

the new mqtt 2.0 version will give a error.

Fix:

from paho.mqtt.enums import CallbackAPIVersion
self.client = mqtt.Client(callback_api_version = CallbackAPIVersion.VERSION1)
@gonzalocasas
Copy link
Member

Thanks for identifying this! For the time being, I'm going to release a new version that limits the mqtt paho version to be lower than 2.0, so that we first fix existing installs with minimum breaking changes. Afterwards, I will prepare a PR that adds your fix, or ideally try to update to callback version 2.0 directly!

@gonzalocasas
Copy link
Member

Addressed this temporarily in v0.3.5: https:/compas-dev/compas_eve/releases/tag/v0.3.5

@gonzalocasas gonzalocasas changed the title New updates from MQTT 2.0 break the code Add support for MQTT-PAHO 2.0 versioned callbacks Feb 11, 2024
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

2 participants