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

Fix for the new version of enocean-mqtt #136

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

olivierkeke
Copy link

Since enocean-mqtt now requires paho-mqtt >= 2.0, these changes are needed.

@madejackson
Copy link

I tried to run HA_enoceanmqtt with this PR.

Does not work. Spits out following error:

Exception in thread paho-mqtt-client-enocean_gateway:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.12/threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 4523, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 2297, in loop_forever
rc = self._loop(timeout)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 1686, in _loop
rc = self.loop_read()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 2100, in loop_read
rc = self._packet_read()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 3142, in _packet_read
rc = self._packet_handle()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 3814, in _packet_handle
return self._handle_connack()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/paho_mqtt-2.1.0-py3.12.egg/paho/mqtt/client.py", line 3922, in _handle_connack
on_connect(
TypeError: HACommunicator._on_connect() missing 1 required positional argument: 'properties'

@olivierkeke
Copy link
Author

It seems paho-mqtt developers have reversed on 2.1.0 the changes made in 2.0.0: eclipse-paho/paho.mqtt.python#831

So this PR will only work with paho-mqtt==2.0

Have you tried paho-mqtt==2.1 without this PR?

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

Successfully merging this pull request may close these issues.

2 participants