eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
222 stars 60 forks source link

Script doesn't work with broadlink 0.7 and above #26

Closed dimitrystd closed 6 years ago

dimitrystd commented 6 years ago

I use your script in docker container and recently restarted it. As part of startup, it installs python libraries

pip install paho-mqtt broadlink

And as result the recent 0.8 version of broadlink. With this version, your script returns the error (i use rm device)

python mqtt.py
Traceback (most recent call last):
  File "mqtt.py", line 362, in <module>
    devices = get_device(cf)
  File "mqtt.py", line 250, in get_device
    device = broadlink.rm(host=host, mac=mac)
TypeError: __init__() takes exactly 4 arguments (3 given)

When installed 0.6 it started to work again

pip install broadlink==0.6

Please fix compatibility with the new version, or add dependency on the specific version. Thanks.

eschava commented 6 years ago

Fixed