Trying to install HADashboard to see what all the fuss is about. But I run into an issue when AppDaemon is started. I was getting no connection at all from my browser but after doing some searching I scaled back on the SSL-certificates and other extras just to see whatâs going on. Now I get error 500 when connecting and some logs from the terminal.
Letâs dive in!
So I followed this guide to install HADashboard and AppDAemon. When I start AppDaemon I get:
pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf
2017-09-24 17:27:49.382345 INFO AppDaemon Version 2.1.9 starting
2017-09-24 17:27:49.382855 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2017-09-24 17:27:49.806748 INFO Starting Apps
2017-09-24 17:27:50.113574 INFO Got initial state
2017-09-24 17:27:50.114905 INFO Loading Module: /home/homeassistant/conf/apps/hello.py
2017-09-24 17:27:50.120665 INFO Loading Object hello_world using class HelloWorld from module hello
2017-09-24 17:27:50.293972 INFO hello_world: Hello from AppDaemon
2017-09-24 17:27:50.296674 INFO hello_world: You are now ready to run Apps!
2017-09-24 17:27:50.297118 INFO App initialization complete
2017-09-24 17:27:50.297699 INFO Starting dashboard
2017-09-24 17:27:50.315006 INFO Starting API
2017-09-24 17:27:50.498448 INFO Connected to Home Assistant 0.53.0
Looks good right?
If I load http://my.host:5050 I get the 500 error and the following from the terminal:
Traceback (most recent call last):
File â/usr/local/lib/python3.4/dist-packages/aiohttp/web_protocol.pyâ, line 422, in start
resp = yield from self._request_handler(request)
File â/usr/local/lib/python3.4/dist-packages/aiohttp/web.pyâ, line 312, in _handle
[middleware for middleware in app.middlewares
AssertionError: Handler <function secure..wrapper at 0x756c6738> should return response instance, got <class âdictâ> [middlewares ]
Just had the exact same problem. Removing the âdash_password:â solved it for me. Mostly the same error:
2017-10-04 22:15:32.622031 INFO AppDaemon Version 2.1.9 starting
2017-10-04 22:15:32.622253 INFO Configuration read from: /home/kennhard/.homeassistant/conf/appdaemon.yaml
2017-10-04 22:15:32.715359 INFO Starting Apps
2017-10-04 22:15:32.779909 INFO Got initial state
2017-10-04 22:15:32.780490 INFO App initialization complete
2017-10-04 22:15:32.780675 INFO Starting dashboard
2017-10-04 22:15:32.784094 INFO Starting API
2017-10-04 22:15:32.797693 INFO Connected to Home Assistant 0.54.0
Error handling request
Traceback (most recent call last):
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 422, in start
resp = yield from self._request_handler(request)
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web.py", line 312, in _handle
[middleware for middleware in app.middlewares
AssertionError: Handler <function secure.<locals>.wrapper at 0x7fa7fad8f488> should return response instance, got <class 'dict'> [middlewares []]
Error handling request
Traceback (most recent call last):
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 422, in start
resp = yield from self._request_handler(request)
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web.py", line 312, in _handle
[middleware for middleware in app.middlewares
AssertionError: Handler <function secure.<locals>.wrapper at 0x7fa7fad8f158> should return response instance, got <class 'dict'> [middlewares []]
Error handling request
Traceback (most recent call last):
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 422, in start
resp = yield from self._request_handler(request)
File "/home/kennhard/.local/lib/python3.5/site-packages/aiohttp/web.py", line 312, in _handle
[middleware for middleware in app.middlewares
AssertionError: Handler <function secure.<locals>.wrapper at 0x7fa7fad8f158> should return response instance, got <class 'dict'> [middlewares []]
Just stumbled upon this. Finished a fresh install just on armbian and I have exactly the same issue. The internal server 500 error disappears if you remove the âdash_passwordâ line. For now I can just block 5050 in the firewall but it would be great to be able to put a password on it.
Thanks, Iâm currently using that work around however, I was just wondering if anyone got it working as I would like to make it accessible outside of the network.
Not seeing anywhere where I can contribute fixes officially, but if someone let me know where I can do that, Iâll be happy to submit the fixes there.
In the meantime, for those who are interested, below are the lines you can update in the directory /usr/local/lib/python3.5/dist-packages/appdaemon (this is where my files are in raspbian; your exact directory may vary).
Hope this helps some folks out there so you can turn on the dashboard password again.
Hi there @wchan.ranelagh - thanks for looking into this - I would be happy if you would create a pull request against the appdaemon repository
When you do that Iâll merge it and put out a new version - I just havenât had time to look at this because of the refactor Iâm working on so this would be a great help.
EDIT: Never mind - I just copied it over and will be releasing a new version shortly.