davorf / BlackBeanControl

BlackBeanControl - Broadlink RM 3 Mini (aka Black Bean) control script
230 stars 55 forks source link

python-broadlink API breaking change #33

Open emmaly opened 6 years ago

emmaly commented 6 years ago

Breaks with https://github.com/mjg59/python-broadlink/commit/8754493951b887e850d93100898d6883443b124f. Works with previous commit https://github.com/mjg59/python-broadlink/commit/21d96bd140359a3b360bd728b963effc6b747c4f.

Traceback (most recent call last):
  File "BlackBeanControl.py", line 167, in <module>
    RM3Device = broadlink.rm((RealIPAddress, RealPort), RealMACAddress)
TypeError: __init__() takes exactly 4 arguments (3 given)
emmaly commented 6 years ago

It appears they've added a fourth argument: devtype.

jnherm commented 6 years ago

edit line 167:

RM3Device = broadlink.rm((RealIPAddress, RealPort), RealMACAddress, RealTimeout)

made mine work.

lamerjack commented 4 years ago

now the error is: Traceback (most recent call last): File "./BlackBeanControl.py", line 168, in RM3Device.auth() File "/usr/local/lib/python2.7/dist-packages/broadlink-0.13.0-py2.7.egg/broadlink/init.py", line 221, in auth response = self.send_packet(0x65, payload) File "/usr/local/lib/python2.7/dist-packages/broadlink-0.13.0-py2.7.egg/broadlink/init.py", line 271, in send_packet checksum = adler32(payload, 0xbeaf) & 0xffff TypeError: adler32() argument 1 must be string or read-only buffer, not bytearray

patrik-dev commented 4 years ago

I get the same error. Traceback (most recent call last): File "/etc/openhab2/scripts/BlackBeanControl/BlackBeanControl.py", line 169, in <module> RM3Device.auth() File "/usr/local/lib/python2.7/dist-packages/broadlink/__init__.py", line 221, in auth response = self.send_packet(0x65, payload) File "/usr/local/lib/python2.7/dist-packages/broadlink/__init__.py", line 271, in send_packet checksum = adler32(payload, 0xbeaf) & 0xffff TypeError: adler32() argument 1 must be string or read-only buffer, not bytearray

lamerjack commented 4 years ago

macaddress should be written without - or : this fixed my setup

patrik-dev commented 4 years ago

I get the same error if i write the mac without : or -