broadlinkmanager-docker
broadlinkmanager-docker copied to clipboard
Can't access Boradlinkmanager on localhost
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
Attaching to broadlinkmanager
broadlinkmanager | 2020-10-27 05:41:10.640 | INFO | main:
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:
-
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-10-27 09:38:53.570 | INFO | main:
-
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:
broadlinkmanager | * Debugger is active!
broadlinkmanager | * Debugger PIN: 113-809-217
broadlinkmanager | 2020-10-27 06:50:40.510 | INFO | main:
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:
broadlinkmanager | * Debugger is active!
broadlinkmanager | * Debugger PIN: 113-809-217
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.
-
Debug mode: on
-
Running on http://0.0.0.0:7020/ (Press CTRL+C to quit)
-
Restarting with stat
2020-10-27 09:38:53.570 | INFO | main:
-
Debugger is active!
-
Debugger PIN: 172-009-602
same problem here!
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
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
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
Sorry can I ask you how do you do a direct install on macOS?
ok...was easy...but I'm not a lucky guy...:
`2020-11-09 12:54:55.600 | INFO | main:
- 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 `
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...
I'm having the exact same problem. Can someone help?
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"?
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
Hello, you are on windows right? we are on macOS....
Yes, windows. And tried on my Raspberry pi OS as well.
with the raspberry you can try this method: https://en.techblog.co.il/2020/06/24/installing-broadlinkmanager-on-raspberry-pi/
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).
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)
No, that's not it. I started py with sudo. And I had the exact same issue on windows.
having same issue on mac
Sadly network_mode: host is only working on linux.. docker on mac is running in a vm....