t0mer / broadlinkmanager-docker

Broadlink Manager is a python based project that allows you to contorol your broadlink devices. Discover, Leran and send command in a very easy way
Apache License 2.0
255 stars 55 forks source link

Cannot scan any Broadlink device #33

Open iso-lib opened 3 years ago

iso-lib commented 3 years ago

And I check the log,find these message

Traceback (most recent call last): 2021-05-31T14:07:48.566829251Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2464, in call 2021-05-31T14:07:48.566849681Z return self.wsgi_app(environ, start_response) 2021-05-31T14:07:48.566863055Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2450, in wsgi_app 2021-05-31T14:07:48.566876285Z response = self.handle_exception(e) 2021-05-31T14:07:48.566906735Z File "/usr/local/lib/python3.6/dist-packages/flask_restful/init.py", line 272, in error_router 2021-05-31T14:07:48.566926782Z return original_handler(e) 2021-05-31T14:07:48.566939557Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1867, in handle_exception 2021-05-31T14:07:48.566952678Z reraise(exc_type, exc_value, tb) 2021-05-31T14:07:48.566965256Z File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise 2021-05-31T14:07:48.566978351Z raise value 2021-05-31T14:07:48.566990811Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app 2021-05-31T14:07:48.567003773Z response = self.full_dispatch_request() 2021-05-31T14:07:48.567016313Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request 2021-05-31T14:07:48.567055461Z rv = self.handle_user_exception(e) 2021-05-31T14:07:48.567068365Z File "/usr/local/lib/python3.6/dist-packages/flask_restful/init.py", line 272, in error_router 2021-05-31T14:07:48.567114211Z return original_handler(e) 2021-05-31T14:07:48.567127980Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception 2021-05-31T14:07:48.567140935Z reraise(exc_type, exc_value, tb) 2021-05-31T14:07:48.567153122Z File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise 2021-05-31T14:07:48.567165616Z raise value 2021-05-31T14:07:48.567177681Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request 2021-05-31T14:07:48.567236791Z rv = self.dispatch_request() 2021-05-31T14:07:48.567251795Z File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request 2021-05-31T14:07:48.567265049Z return self.view_functionsrule.endpoint 2021-05-31T14:07:48.567277371Z File "/opt/broadlinkmanager/broadlinkmanager.py", line 427, in autodiscover 2021-05-31T14:07:48.567289780Z if device.auth(): 2021-05-31T14:07:48.567301691Z File "/opt/broadlinkmanager/broadlink/init.py", line 271, in auth 2021-05-31T14:07:48.567314166Z check_error(response[0x22:0x24]) 2021-05-31T14:07:48.567335301Z File "/opt/broadlinkmanager/broadlink/exceptions.py", line 173, in check_error 2021-05-31T14:07:48.567349068Z raise exception(error_code) 2021-05-31T14:07:48.567361082Z broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed

MrYutz commented 7 months ago

I am also getting this error message regarding a failed authentication.

The RM4 Pro is unlocked and accessible from Home Assistant.

2023-11-24 21:14:18.127 | INFO     | __main__:search_for_devices:620 - New device detected: RM4 pro (Broadlink) (ip: 192.168.78.10  mac: e816561c656c)
INFO:     192.168.78.100:50783 - "GET /autodiscover?freshscan=0 HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 212, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 84, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette_exporter/middleware.py", line 135, in __call__
    await self.app(scope, receive, wrapped_send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 161, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/usr/local/lib/python3.8/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 28, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 818, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 754, in run
MrYutz commented 7 months ago

If I comment out line 618 in broadlinkmanager.py, removing the auth, the device works.

[
{
name: "RM4 pro (Broadlink)",
type: "0x5213",
ip: "192.168.78.10",
mac: "e816561c656c"
},
{
name: "RM4mini ( Broadlink)",
type: "0x648d",
ip: "192.168.78.7",
mac: "a043b0708005"
}
]