BlackBeanControl icon indicating copy to clipboard operation
BlackBeanControl copied to clipboard

python-broadlink API breaking change

Open emmaly opened this issue 6 years ago • 6 comments

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 avatar Jun 23 '18 01:06 emmaly

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

emmaly avatar Jun 23 '18 01:06 emmaly

edit line 167:

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

made mine work.

jnherm avatar Jul 22 '18 10:07 jnherm

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

lamerjack avatar Apr 15 '20 22:04 lamerjack

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

patrik-dev avatar Apr 16 '20 17:04 patrik-dev

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

lamerjack avatar Apr 23 '20 11:04 lamerjack

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

patrik-dev avatar Apr 30 '20 08:04 patrik-dev