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

Can't access Boradlinkmanager on localhost #13

Open
rward3182 opened this issue Oct 27, 2020 · 19 comments
Open

Can't access Boradlinkmanager on localhost #13

rward3182 opened this issue Oct 27, 2020 · 19 comments

Comments

@rward3182
Copy link

rward3182 commented Oct 27, 2020

Hi I followed all the instructions it's running fine on docker. However I can't access it on the localhost:7020 or 0.0.0.0:7020
I am using OSX on a Mac

What am I missing?
Thanks

Screen Shot 2020-10-27 at 5 58 55 pm

Attaching to broadlinkmanager

broadlinkmanager | 2020-10-27 05:41:10.640 | INFO | main::515 - Broadllink Manager is up and running

broadlinkmanager | * Serving Flask app "broadlinkmanager" (lazy loading)

broadlinkmanager | * Environment: production

Also tried port forwarding RW It did not work

2020-10-27 09:38:53.249 | INFO | main::515 - Broadllink Manager is up and running

  • Serving Flask app "broadlinkmanager" (lazy loading)

  • Environment: production

WARNING: This is a development server. Do not use it in a production deployment.

Use a production WSGI server instead.

2020-10-27 09:38:53.570 | INFO | main::515 - Broadllink Manager is up and running

  • Debugger is active!

  • Debugger PIN: 172-009-602

broadlinkmanager | WARNING: This is a development server. Do not use it in a production deployment.

broadlinkmanager | Use a production WSGI server instead.

broadlinkmanager | * Debug mode: on

broadlinkmanager | * Running on http://0.0.0.0:7020/ (Press CTRL+C to quit)

broadlinkmanager | * Restarting with stat

broadlinkmanager | 2020-10-27 05:41:10.950 | INFO | main::515 - Broadllink Manager is up and running

broadlinkmanager | * Debugger is active!

broadlinkmanager | * Debugger PIN: 113-809-217

broadlinkmanager | 2020-10-27 06:50:40.510 | INFO | main::515 - Broadllink Manager is up and running

broadlinkmanager | * Serving Flask app "broadlinkmanager" (lazy loading)

broadlinkmanager | * Environment: production

broadlinkmanager | WARNING: This is a development server. Do not use it in a production deployment.

broadlinkmanager | Use a production WSGI server instead.

broadlinkmanager | * Debug mode: on

broadlinkmanager | * Running on http://0.0.0.0:7020/ (Press CTRL+C to quit)

broadlinkmanager | * Restarting with stat

broadlinkmanager | 2020-10-27 06:50:40.830 | INFO | main::515 - Broadllink Manager is up and running

broadlinkmanager | * Debugger is active!

broadlinkmanager | * Debugger PIN: 113-809-217

@rward3182
Copy link
Author

I also tried port forwarding this did not work

Serving Flask app "broadlinkmanager" (lazy loading)

  • Environment: production

WARNING: This is a development server. Do not use it in a production deployment.

Use a production WSGI server instead.

2020-10-27 09:38:53.570 | INFO | main::515 - Broadllink Manager is up and running

  • Debugger is active!

  • Debugger PIN: 172-009-602

@bubez81
Copy link

bubez81 commented Oct 27, 2020

same problem here!

@bubez81
Copy link

bubez81 commented Oct 29, 2020

solved:
version: "3.6" services: broadlinkmanager: image: techblog/broadlinkmanager expose: - "7020" ports: - "7020:7020" network_mode: "bridge" container_name: broadlinkmanager restart: always restart: unless-stopped volumes: - ./broadlinkmanager:/opt/broadlinkmanager/data

@bubez81
Copy link

bubez81 commented Oct 29, 2020

but sadly:
broadlinkmanager | 2020-10-29 16:22:16.981 | INFO | main:discover:444 - Searching for devices...

broadlinkmanager | 2020-10-29 16:22:21.988 | ERROR | main:discover:459 - No devices found

@rward3182
Copy link
Author

I solved this. No idea why the docker image was not working. But I just did a direct install and it works perfectly. At last I can scan RF codes!

BTW: works well on OSX. Good work

@bubez81
Copy link

bubez81 commented Nov 9, 2020

Sorry can I ask you how do you do a direct install on macOS?

@bubez81
Copy link

bubez81 commented Nov 9, 2020

ok...was easy...but I'm not a lucky guy...:
`2020-11-09 12:54:55.600 | INFO | main::515 - Broadllink Manager is up and running

  • Serving Flask app "broadlinkmanager" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://0.0.0.0:7020/ (Press CTRL+C to quit)
  • Restarting with stat
    2020-11-09 12:54:55.782 | INFO | main::515 - Broadllink Manager is up and running
  • Debugger is active!
  • Debugger PIN: 291-332-932
    192.168.2.3 - - [09/Nov/2020 12:55:02] "GET / HTTP/1.1" 200 -
    2020-11-09 12:55:03.730 | INFO | main:discover:444 - Searching for devices...
    192.168.2.3 - - [09/Nov/2020 12:55:03] "GET /discover HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2464, in call
    return self.wsgi_app(environ, start_response)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask_restful/init.py", line 272, in error_router
    return original_handler(e)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask_restful/init.py", line 272, in error_router
    return original_handler(e)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/Users/michele/Downloads/broadlinkmanager-docker/broadlinkmanager/broadlinkmanager.py", line 446, in discover
    devices = broadlink.discover(
    File "/Users/michele/Downloads/broadlinkmanager-docker/broadlinkmanager/broadlink/init.py", line 125, in discover
    cs.bind((local_ip_address, 0))
    OSError: [Errno 49] Can't assign requested address
    `

@bubez81
Copy link

bubez81 commented Nov 11, 2020

I don't know what problem is "OSError: [Errno 49] Can't assign requested address" but I know that the access problem of the docker-compose installation system is that the program needs to scan MAC addresses and the network_mode: bridge can't share MAC adresses but network_mode: host can...but with this mode we can't reach the docker...

@nononolimits
Copy link

I'm having the exact same problem. Can someone help?

@nononolimits
Copy link

I solved this. No idea why the docker image was not working. But I just did a direct install and it works perfectly. At last I can scan RF codes!

BTW: works well on OSX. Good work

What do you mean with "direct install"?

@nononolimits
Copy link

nononolimits commented Nov 12, 2020

Was able to run broadlinkmanager.py now.
localhost:7020 now works, but when scanning for devices, nothing happens and I get:

(venv) D:\broadlinkmanager>py broadlinkmanager.py

  • Serving Flask app "broadlinkmanager" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN: 999-771-555
  • Running on http://0.0.0.0:7020/ (Press CTRL+C to quit)
    127.0.0.1 - - [12/Nov/2020 21:28:34] "←[37mGET / HTTP/1.1←[0m" 200 -
    127.0.0.1 - - [12/Nov/2020 21:28:35] "←[37mGET /img/broadlink.png HTTP/1.1←[0m" 200 -
    127.0.0.1 - - [12/Nov/2020 21:28:42] "←[35m←[1mGET /discover HTTP/1.1←[0m" 500 -
    Traceback (most recent call last):
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2464, in call
    return self.wsgi_app(environ, start_response)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_restful_init_.py", line 272, in error_router
    return original_handler(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_compat.py", line 39, in reraise
    raise value
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_restful_init_.py", line 272, in error_router
    return original_handler(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_compat.py", line 39, in reraise
    raise value
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "D:\broadlinkmanager\broadlinkmanager.py", line 311, in discover
    if device.auth():
    File "D:\broadlinkmanager\venv\Lib\site-packages\broadlink\device.py", line 198, in auth
    check_error(response[0x22:0x24])
    File "D:\broadlinkmanager\venv\Lib\site-packages\broadlink\exceptions.py", line 137, in check_error
    raise exception(error_code)
    broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed
    127.0.0.1 - - [12/Nov/2020 21:29:18] "←[37mGET / HTTP/1.1←[0m" 200 -
    127.0.0.1 - - [12/Nov/2020 21:29:25] "←[35m←[1mGET /discover HTTP/1.1←[0m" 500 -
    Traceback (most recent call last):
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2464, in call
    return self.wsgi_app(environ, start_response)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_restful_init_.py", line 272, in error_router
    return original_handler(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_compat.py", line 39, in reraise
    raise value
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_restful_init_.py", line 272, in error_router
    return original_handler(e)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask_compat.py", line 39, in reraise
    raise value
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "D:\broadlinkmanager\venv\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "D:\broadlinkmanager\broadlinkmanager.py", line 311, in discover
    if device.auth():
    File "D:\broadlinkmanager\venv\Lib\site-packages\broadlink\device.py", line 198, in auth
    check_error(response[0x22:0x24])
    File "D:\broadlinkmanager\venv\Lib\site-packages\broadlink\exceptions.py", line 137, in check_error
    raise exception(error_code)
    broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed

@bubez81
Copy link

bubez81 commented Nov 13, 2020

Hello, you are on windows right? we are on macOS....

@nononolimits
Copy link

Yes, windows.
And tried on my Raspberry pi OS as well.

@bubez81
Copy link

bubez81 commented Nov 13, 2020

with the raspberry you can try this method:
https://en.techblog.co.il/2020/06/24/installing-broadlinkmanager-on-raspberry-pi/

@nononolimits
Copy link

Yes, that's what I did.
I tried the broadlinkmanager.py out on windows and on my raspberry, both had same error I mentioned (Authentication failed).

@bubez81
Copy link

bubez81 commented Nov 13, 2020

strange...with this method on the raspberry I had no problems at all...but I was thinking...authentication of what?? maybe with sudo? (on the raspberry obviously)

@nononolimits
Copy link

No, that's not it. I started py with sudo. And I had the exact same issue on windows.

@Paulie-Moo
Copy link

having same issue on mac

@peet86
Copy link

peet86 commented Oct 17, 2021

Sadly network_mode: host is only working on linux.. docker on mac is running in a vm....

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

5 participants