mduran80 / pymadoka

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

pymadoka on RPI / buster #1

Closed whackl closed 1 year ago

whackl commented 2 years ago

Hi , thank you for your excelent work , unfortunally I've got some problems with the functionality ..

Using RPi 4 with buster Kernel 5.10.63-v7+ and actual python on Buster ( 2.7.16 ) and a Bluetooth Madoka device paired with the raspi I get the following errors alltough all modules are installed ...

Traceback (most recent call last): File "/home/pi/.local/bin/pymadoka", line 5, in from pymadoka.cli import cli File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/init.py", line 1, in from .controller import Controller File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/controller.py", line 8, in from pymadoka.feature import Feature, NotImplementedException File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/feature.py", line 9, in from asyncio.exceptions import CancelledError ModuleNotFoundError: No module named 'asyncio.exceptions'

Commenting out the import line with the CancelledError , basic functionality is possible , like get-fan-speed , but get-status is ending with ERROR:pymadoka.cli:vars() argument must have dict attribute

Sny suggenstions

mduran80 commented 2 years ago

Hi!

It appears to be some problem with the pymadoka library dependencies (more specifically with asyncio). Please check your version of asyncio-mqtt and any other asyncio related packages and post them here so I can compare with mine, I just realized the dependency versions are not frozen.

On Sat, 27 Nov 2021 at 11:57, whackl @.***> wrote:

Hi , thank you for your excelent work , unfortunally I've got some problems with the functionality ..

Using RPi 4 with buster Kernel 5.10.63-v7+ and actual python on Buster ( 2.7.16 ) and a Bluetooth Madoka device paired with the raspi I get the following errors alltough all modules are installed ...

Traceback (most recent call last): File "/home/pi/.local/bin/pymadoka", line 5, in from pymadoka.cli import cli File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/init.py", line 1, in from .controller import Controller File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/controller.py", line 8, in from pymadoka.feature import Feature, NotImplementedException File "/home/pi/.local/lib/python3.7/site-packages/pymadoka/feature.py", line 9, in from asyncio.exceptions import CancelledError ModuleNotFoundError: No module named 'asyncio.exceptions'

Commenting out the import line with the CancelledError , basic functionality is possible , like get-fan-speed , but get-status is ending with ERROR:pymadoka.cli:vars() argument must have dict attribute

Sny suggenstions

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mduran80/pymadoka/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT7AIWC2Y5IQSSPGDK3UOC2RJANCNFSM5I4B7LLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

whackl commented 2 years ago

Hi ! thanks for your reply , following module versions are installed :

Package Version


appdirs 1.4.3 asn1crypto 0.24.0 astroid 2.1.0 asttokens 1.1.13 asyncio 3.4.3 asyncio-mqtt 0.11.0 attrs 21.2.0 Automat 20.2.0 automationhat 0.2.0 beautifulsoup4 4.7.1 bleak 0.10.0 blinker 1.4 blinkt 0.1.2 buttonshim 0.0.2 Cap1xxx 0.1.3 certifi 2018.8.24 chardet 3.0.4 Click 7.0 colorama 0.3.7 colorzero 1.1 constantly 15.1.0 cookies 2.2.1 cryptography 2.6.1 cupshelpers 1.0 cycler 0.10.0 dbus-next 0.2.3 decorator 4.3.0 docutils 0.14 drumhat 0.1.0 entrypoints 0.3 envirophat 1.0.0 ExplorerHAT 0.4.2 Flask 1.0.2 fourletterphat 0.1.0 gpiozero 1.6.2 guizero 0.6.0 html5lib 1.0.1 hyperlink 21.0.0 idna 2.6 incremental 21.3.0 ipykernel 4.9.0 ipython 5.8.0 ipython_genutils 0.2.0 isort 4.3.4 itsdangerous 0.24 jedi 0.13.2 Jinja2 2.10 jupyter-client 5.2.3 jupyter-core 4.4.0 keyring 17.1.1 keyrings.alt 3.1.1 kiwisolver 1.0.1 lazy-object-proxy 1.3.1 logilab-common 1.4.2 lxml 4.3.2 MarkupSafe 1.1.0 matplotlib 3.0.2 mccabe 0.6.1 microdotphat 0.2.1 mote 0.0.4 motephat 0.0.3 mypy 0.670 mypy-extensions 0.4.1 nudatus 0.0.4 numpy 1.16.2 oauthlib 2.1.0 olefile 0.46 paho-mqtt 1.6.1 pantilthat 0.0.7 parso 0.3.1 pexpect 4.6.0 pgzero 1.2 phatbeat 0.1.1 pianohat 0.1.0 picamera 1.13 pickleshare 0.7.5 picraft 1.0 piglow 1.2.5 pigpio 1.78 Pillow 5.4.1 pip 21.3.1 prompt-toolkit 1.0.15 psutil 5.5.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycairo 1.16.2 pycodestyle 2.4.0 pycrypto 2.6.1 pycups 1.9.73 pyflakes 2.0.0 pygame 1.9.4.post1 Pygments 2.3.1 PyGObject 3.30.4 pyinotify 0.9.6 PyJWT 1.7.0 pylint 2.2.2 pymadoka 0.2.4 pyOpenSSL 19.0.0 pyparsing 2.2.0 pyserial 3.4 pysmbc 1.0.15.6 python-apt 1.8.4.3 python-dateutil 2.7.3 pyxdg 0.25 PyYAML 6.0 pyzmq 17.1.2 qtconsole 4.3.1 rainbowhat 0.1.0 reportlab 3.5.13 requests 2.21.0 requests-oauthlib 1.0.0 responses 0.9.0 roman 2.0.0 RPi.GPIO 0.7.0 RTIMULib 7.2.1 scrollphat 0.0.7 scrollphathd 1.2.1 SecretStorage 2.3.1 semver 2.0.1 Send2Trash 1.5.0 sense-emu 1.2 sense-hat 2.2.0 service-identity 21.1.0 setuptools 59.2.0 simplegeneric 0.8.1 simplejson 3.16.0 six 1.12.0 skywriter 0.0.7 sn3218 1.2.7 soupsieve 1.8 spidev 3.5 ssh-import-id 5.7 thonny 3.3.10 tornado 5.1.1 touchphat 0.0.1 traitlets 4.3.2 Twisted 21.7.0 twython 3.7.0 txdbus 1.1.2 typed-ast 1.3.1 typing_extensions 4.0.0 uflash 1.2.4 unicornhathd 0.0.4 urllib3 1.24.1 wcwidth 0.1.7 webencodings 0.5.1 Werkzeug 0.14.1 wheel 0.32.3 wrapt 1.10.11 zope.interface 5.4.0

Hope this helps ....

mduran80 commented 2 years ago

I just checked my versions. I am running Core-2021.11.5 with asyncio 3.4.3 and asyncio-mqtt 0.11.0 without any issue.

According to your logs, pymadoka is installed under python 3.7 libs folder, but your setup is running on python 2.7.16? This is only supported for python > 3.3.

El El mié, 8 dic 2021 a las 11:51, whackl @.***> escribió:

Hi ! thanks for your reply , following module versions are installed :

Package Version

appdirs 1.4.3 asn1crypto 0.24.0 astroid 2.1.0 asttokens 1.1.13 asyncio 3.4.3 asyncio-mqtt 0.11.0 attrs 21.2.0 Automat 20.2.0 automationhat 0.2.0 beautifulsoup4 4.7.1 bleak 0.10.0 blinker 1.4 blinkt 0.1.2 buttonshim 0.0.2 Cap1xxx 0.1.3 certifi 2018.8.24 chardet 3.0.4 Click 7.0 colorama 0.3.7 colorzero 1.1 constantly 15.1.0 cookies 2.2.1 cryptography 2.6.1 cupshelpers 1.0 cycler 0.10.0 dbus-next 0.2.3 decorator 4.3.0 docutils 0.14 drumhat 0.1.0 entrypoints 0.3 envirophat 1.0.0 ExplorerHAT 0.4.2 Flask 1.0.2 fourletterphat 0.1.0 gpiozero 1.6.2 guizero 0.6.0 html5lib 1.0.1 hyperlink 21.0.0 idna 2.6 incremental 21.3.0 ipykernel 4.9.0 ipython 5.8.0 ipython_genutils 0.2.0 isort 4.3.4 itsdangerous 0.24 jedi 0.13.2 Jinja2 2.10 jupyter-client 5.2.3 jupyter-core 4.4.0 keyring 17.1.1 keyrings.alt 3.1.1 kiwisolver 1.0.1 lazy-object-proxy 1.3.1 logilab-common 1.4.2 lxml 4.3.2 MarkupSafe 1.1.0 matplotlib 3.0.2 mccabe 0.6.1 microdotphat 0.2.1 mote 0.0.4 motephat 0.0.3 mypy 0.670 mypy-extensions 0.4.1 nudatus 0.0.4 numpy 1.16.2 oauthlib 2.1.0 olefile 0.46 paho-mqtt 1.6.1 pantilthat 0.0.7 parso 0.3.1 pexpect 4.6.0 pgzero 1.2 phatbeat 0.1.1 pianohat 0.1.0 picamera 1.13 pickleshare 0.7.5 picraft 1.0 piglow 1.2.5 pigpio 1.78 Pillow 5.4.1 pip 21.3.1 prompt-toolkit 1.0.15 psutil 5.5.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycairo 1.16.2 pycodestyle 2.4.0 pycrypto 2.6.1 pycups 1.9.73 pyflakes 2.0.0 pygame 1.9.4.post1 Pygments 2.3.1 PyGObject 3.30.4 pyinotify 0.9.6 PyJWT 1.7.0 pylint 2.2.2 pymadoka 0.2.4 pyOpenSSL 19.0.0 pyparsing 2.2.0 pyserial 3.4 pysmbc 1.0.15.6 python-apt 1.8.4.3 python-dateutil 2.7.3 pyxdg 0.25 PyYAML 6.0 pyzmq 17.1.2 qtconsole 4.3.1 rainbowhat 0.1.0 reportlab 3.5.13 requests 2.21.0 requests-oauthlib 1.0.0 responses 0.9.0 roman 2.0.0 RPi.GPIO 0.7.0 RTIMULib 7.2.1 scrollphat 0.0.7 scrollphathd 1.2.1 SecretStorage 2.3.1 semver 2.0.1 Send2Trash 1.5.0 sense-emu 1.2 sense-hat 2.2.0 service-identity 21.1.0 setuptools 59.2.0 simplegeneric 0.8.1 simplejson 3.16.0 six 1.12.0 skywriter 0.0.7 sn3218 1.2.7 soupsieve 1.8 spidev 3.5 ssh-import-id 5.7 thonny 3.3.10 tornado 5.1.1 touchphat 0.0.1 traitlets 4.3.2 Twisted 21.7.0 twython 3.7.0 txdbus 1.1.2 typed-ast 1.3.1 typing_extensions 4.0.0 uflash 1.2.4 unicornhathd 0.0.4 urllib3 1.24.1 wcwidth 0.1.7 webencodings 0.5.1 Werkzeug 0.14.1 wheel 0.32.3 wrapt 1.10.11 zope.interface 5.4.0

Hope this helps ....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mduran80/pymadoka/issues/1#issuecomment-988704432, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT3CLYUFEGPSTRB7ZW3UP42D5ANCNFSM5I4B7LLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tthoma24 commented 1 year ago

For anyone else that stumbles on this, this is due to Python 3.7 not liking the way the exceptions are called, as here: https://github.com/AlexxIT/XiaomiGateway3/issues/58. If you try on Python 3.8 or later, it should work.