@Bit-River – I’m now getting this error when I run python3 tile.py
. Again, this is on a RaspberryPi running Hassbian.
Thanks, I hope you can help! I’m almost there…
(homeassistant) homeassistant@hassbian:/home/pi $ python3 tile.py
* Serving Flask app "tile" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
[2018-12-11 16:46:47,107] ERROR in app: Exception on /api/search/c8:31:53:38:c9:f1 [GET]
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/homeassistant/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "tile.py", line 18, in device_scan
devices = scanner.scan(3.0)
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 852, in scan
self.start(passive=passive)
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 790, in start
self._mgmtCmd("le on")
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'le on' (code: 20, error: Permission Denied)
127.0.0.1 - - [11/Dec/2018 16:46:47] "GET /api/search/c8:31:53:38:c9:f1 HTTP/1.1" 500 -
[2018-12-11 16:47:18,110] ERROR in app: Exception on /api/search/c8:31:53:38:c9:f1 [GET]
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/homeassistant/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/homeassistant/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "tile.py", line 18, in device_scan
devices = scanner.scan(3.0)
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 852, in scan
self.start(passive=passive)
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 790, in start
self._mgmtCmd("le on")
File "/srv/homeassistant/lib/python3.5/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'le on' (code: 20, error: Permission Denied)
127.0.0.1 - - [11/Dec/2018 16:47:18] "GET /api/search/c8:31:53:38:c9:f1 HTTP/1.1" 500 -