ferensw / homekit-easywave

HAP Homekit cover shutter for Eldat Easywave protocol
0 stars 0 forks source link

Error during execution #3

Open Lameth75 opened 7 months ago

Lameth75 commented 7 months ago

Hi ferensw,

I got lost unfortunately when I've tried to execute homekit_easywave.py on my RPI. I've installed everything including all dependencies. (Python 3.11.2)

  1. The Eldat RX09 was recognized by the operating system.

[ 5906.329165] usb 1-1.4: new full-speed USB device number 5 using dwc_otg [ 5906.477058] usb 1-1.4: New USB device found, idVendor=155a, idProduct=1006, bcdDevice= 1.00 [ 5906.477106] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 5906.477130] usb 1-1.4: Product: USB Transceiver Easywave [ 5906.477150] usb 1-1.4: Manufacturer: Silicon Labs [ 5906.477168] usb 1-1.4: SerialNumber: XXXXXXXX [ 5906.480349] cp210x 1-1.4:1.0: cp210x converter detected [ 5906.484386] usb 1-1.4: cp210x converter now attached to ttyUSB0

When I start the script "$ python3 homekit_easywave.py", I receive the following error message.

Traceback (most recent call last): File "/home/pi/homekit-easywave/homekit_easywave.py", line 240, in driver.add_accessory(accessory=get_bridge(driver)) ^^^^^^^^^^^^^^^^^^ File "/home/pi/homekit-easywave/homekit_easywave.py", line 232, in get_bridge bridge = EasywaveBridge(driver, 'Bridge') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/homekit-easywave/homekit_easywave.py", line 181, in init self._stop_command = asyncio.Event(loop=self.driver.loop) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Event.init() got an unexpected keyword argument 'loop'

My installed libraries are:

Package Version async-timeout 4.0.3 base36 0.1.1 cffi 1.16.0 chacha20poly1305-reuseable 0.11.0 cryptography 41.0.5 docopt 0.6.2 easywave 0.0.1 h11 0.14.0 HAP-python 4.9.1 ifaddr 0.2.0 orjson 3.9.10 pip 23.0.1 pycparser 2.21 PyQRCode 1.2.1 pyserial 3.5 pyserial-asyncio 0.6 setuptools 66.1.1 zeroconf 0.127.0

Do you have any idea what might be wrong in my environment?

Thanks in advance for your help, Lameth

ferensw commented 7 months ago

I have never run it with python > 3.9, so changes are that this does not work (yet) with python 3.11 I'm not sure, but I recall reading that the event loop is handled different from python 3.10

If it is possible, you could try with python 3.9. The pyserial(-asyncio) versions are ok.

Lameth75 commented 7 months ago

Thanks for your fast reply. I'll try to install a 3.9.x version of Python and let you know if I succeeded or not.

Lameth75 commented 7 months ago

There is an update on this issue. I did the following and now the program is starting as I expected it and provides the configured devices to HomeKit.

sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libssl1.1

wget "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz" tar zxf libffi-3.3.tar.gz cd libffi-3.3 ./configure sudo make install sudo ldconfig

tar zxf Python-3.9.18.tgz cd Python-3.9.18 ./configure --enable-optimizations make -j 4 && sudo make altinstall pip3.9 install -r requirements.txt