mduran80 / pymadoka

A python library to control Daikin BRC1H (Madoka) thermostat
MIT License
26 stars 8 forks source link

error executing pymadoka-mqtt #22

Open erenoglu opened 5 months ago

erenoglu commented 5 months ago

Hi, pymadoka itself works well but I can't get pymadoka-mqtt to work, it gives following error and exits. Could this be a bug or sth wrong with my system?

OS: Archlinux up to date Mosquitto version 2.0.18 Python 3.11.8

DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a24-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char0035: bytearray(b'0.1') DEBUG:pymadoka.connection: [Characteristic] 00002a24-0000-1000-8000-00805f9b34fb: (Handle: 53) (read) | Name: Model Number String, Value: 0.1 DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char003d): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'7031.05.17'))>}, []] DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a28-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char003d: bytearray(b'7031.05.17') DEBUG:pymadoka.connection: [Characteristic] 00002a28-0000-1000-8000-00805f9b34fb: (Handle: 61) (read) | Name: Software Revision String, Value: 7031.05.17 DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char0031): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'Universal Electronics, Inc.'))>}, []] DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a29-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char0031: bytearray(b'Universal Electronics, Inc.') DEBUG:pymadoka.connection: [Characteristic] 00002a29-0000-1000-8000-00805f9b34fb: (Handle: 49) (read) | Name: Manufacturer Name String, Value: Universal Electronics, Inc. DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char0037): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'1.2.3.4.5.6'))>}, []] DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a25-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_F4_93_1C_95_B9_FB/service0030/char0037: bytearray(b'1.2.3.4.5.6') DEBUG:pymadoka.connection: [Characteristic] 00002a25-0000-1000-8000-00805f9b34fb: (Handle: 55) (read) | Name: Serial Number String, Value: 1.2.3.4.5.6 Exception ignored in: <function Client.del at 0x72154f006a20> Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 874, in del self._reset_sockets() File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets self._sock_close() File "/usr/lib/python3.11/site-packages/paho/mqtt/client.py", line 1119, in _sock_close if not self._sock: ^^^^^^^^^^ AttributeError: 'Client' object has no attribute '_sock' ERROR:pymadoka.mqtt:Client.init() missing 1 required positional argument: 'callback_api_version'

digitalgravy commented 4 months ago

This is caused by a breaking change to paho-mqtt. The default install has no requirements.txt so it just installs the current available version. To fix this on your own install you can install a previous version of paho-mqtt:

pip install "paho-mqtt<2.0.0"