Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-broadlink API breaking change #33

Open
emmaly opened this issue Jun 23, 2018 · 6 comments
Open

python-broadlink API breaking change #33

emmaly opened this issue Jun 23, 2018 · 6 comments

Comments

@emmaly
Copy link

emmaly commented Jun 23, 2018

Breaks with mjg59/python-broadlink@8754493. Works with previous commit mjg59/python-broadlink@21d96bd.

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
Copy link
Author

emmaly commented Jun 23, 2018

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

@jnherm
Copy link

jnherm commented Jul 22, 2018

edit line 167:

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

made mine work.

@lamerjack
Copy link

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
Copy link

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
Copy link

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

@patrik-dev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants