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

Luceco Castra (Hangzhou Broadlink) discoverable, but gives Authentication Error #719

Open
rbubley opened this issue Sep 25, 2022 · 2 comments

Comments

@rbubley
Copy link

rbubley commented Sep 25, 2022

python-broadink can discover a Luceco Castra smart light with PIR (reporting devtype=25722, name='ACpir'), but attempting to auth() the device throws an exception:

>>> import broadlink
>>> dev=broadlink.hello('192.168.XXX.XXX')
>>> dev
broadlink.device.Device(('192.168.XXX.XXX', 80), mac=b'\xXX\xXX\xXX\xXX\xXX', devtype=25722, timeout=10, name='ACpir', model='', manufacturer='', is_locked=True)
>>> dev.auth()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/russ/.local/lib/python3.10/site-packages/broadlink/device.py", line 185, in auth
    e.check_error(response[0x22:0x24])
  File "/home/russ/.local/lib/python3.10/site-packages/broadlink/exceptions.py", line 152, in check_error
    raise exception(error_code)
broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed

@zhou9110
Copy link

I found the solution in here, it is because is_locked=True.

In my case I am using RM4 pro, I need to open the BroadLink App, select the device -> click "..." in the top bar -> click "Property", then find the "Lock device" setting and turn it off. Then calling device.auth() just works for me.

Reference: #674 (comment)

@felipediel
Copy link
Collaborator

Let's add it. Does it work with the lb1 class?

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

3 participants