klali / ha-plejd

Plejd component for Home Assistant
Apache License 2.0
69 stars 15 forks source link

WIP: Dbus #25

Closed klali closed 4 years ago

klali commented 4 years ago

This is mostly to let anyone interested know that this quite big change is coming.

This is a partial re-write to not use bluepy but rather use the bluez dbus api directly.

mudape commented 4 years ago

Hi, Running this on HassOS with Hass.io and get:

2020-01-04 21:28:39 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/ha-plejd-dbus/light.py", line 466, in _start_plejd connect(plejdinfo) File "/config/custom_components/ha-plejd-dbus/light.py", line 139, in connect import dbus ModuleNotFoundError: No module named 'dbus'**

klali commented 4 years ago

Yes.. documentation is lagging behind. If you let homeassistant install the python modules you need (on debian/ubuntu) the packages libdbus-1-dev, libcairo2-dev & libgirepository1.0-dev if you install python packages manually you need dbus-python & PyGObject

I actually think it'd be better to use a simpler dbus module for this but the handiest examples I found where using dbus-python.

klali commented 4 years ago

This branch now uses a different dbus library (dbus-next) which is pure python and should be much simpler to install. If you're interested in trying again and giving feedback that'd be welcome.