Wow! This is exciting. Wicked fast work @aimc. Gonna follow this closely. Though I’m trying to do my first component, which is enough to focus on at the moment. Will probably try in a few weeks! But I bet you gonna get enough testers. Seems like half the posts on the forums are either app daemon or hadashboard.
The only possibility is that you have discovered a really wierd error that occurs outside of my error handling and is going to STDOUT - can you run it form the command line please and see what you find. Since you have installed it you just need to run appdaemon -c etc from the command line. Then try to load the screen and you may get an error to the terminal.
(this is another reason I want people to run from the command line)
Got it. It was because originally to get it to run (before I installed the regular way), I was having to run under sudo, so the compiled directory and everything under it was owned by root instead of pi. I changed ownership and groups to pi and it works now.
The reason I’m trying to get it to work on boot is I am going to be out of town the next week. Having it available on boot makes it easier to work on for me. I’ll go back to the command line.
Just for documentation purposes, here is the error that was coming up
(venv) pi@haweb:~/appdaemon_dashboard/appdaemon$ /usr/local/bin/appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf -p /home/pi/appdaemon_dashboard/appdaemon/appdaemon.pid
/home/pi/appdaemon_dashboard/appdaemon/conf/apps
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/aiohttp/web_server.py", line 61, in handle_request
resp = yield from self._handler(request)
File "/usr/local/lib/python3.4/dist-packages/aiohttp/web.py", line 249, in _handle
resp = yield from handler(request)
File "/usr/local/lib/python3.4/dist-packages/aiohttp_jinja2/__init__.py", line 89, in wrapped
context = yield from coro(*args)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro
res = func(*args, **kw)
File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdash.py", line 81, in load_dash
dash = dashboard.compile_dash(name, skin, skindir, request.rel_url.query)
File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 27, in profiled_fn
dash = fn(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 44, in newfunc
result = func(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 392, in compile_dash
dash = get_dash(name, skin, skindir)
File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 502, in get_dash
os.makedirs(os.path.join(conf.compiled_css_dir, skin))
File "/usr/lib/python3.4/os.py", line 237, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/pi/appdaemon_dashboard/appdaemon/conf/compiled/css/default'
Hey, one other thing. I haven’t said it today and I should have. Thank you. This is great and is going to take AD and HA forward by leaps and bounds. This has the potential to be something I can let my kids get to that will be intuitive enough that it won’t be like user support every night when I come home.
2017-03-05 07:11:38.661260 INFO App initialization complete
2017-03-05 07:11:38.661523 INFO Starting dashboard
2017-03-05 07:11:38.664682 INFO Listening on ('192.168.1.12', 5050)
2017-03-05 07:11:38.665111 INFO Connected to Home Assistant 0.38.4
2017-03-05 07:11:49.245504 INFO Compiling dashboard 'Hello'
2017-03-05 07:11:49.279366 INFO function [compile_dash] finished in 36 ms
2017-03-05 07:11:49.960872 WARNING ------------------------------------------------------------
2017-03-05 07:11:49.961121 WARNING Unexpected error during process_message()
2017-03-05 07:11:49.961269 WARNING ------------------------------------------------------------
2017-03-05 07:11:49.962015 WARNING Traceback (most recent call last):
File "/home/anilroy/tmp/appdaemon_dashboard/appdaemon/appdaemon/appdaemon.py", line 880, in process_message
appdash.ws_update(data)
File "/home/anilroy/tmp/appdaemon_dashboard/appdaemon/appdaemon/appdash.py", line 189, in ws_update
"Found dashboard type {}".format(app['websockets'][ws]["dashboard"]))
KeyError: 'dashboard'
2017-03-05 07:11:49.962202 WARNING ------------------------------------------------------------
2017-03-05 07:11:49.969291 INFO New dashboard connected: Hello Panel
2017-03-05 07:11:53.500758 INFO Dashboard disconnected
Playing with this on Docker on my Mac rather than on my pi, so I can’t speak to any pi-specific issues (ultimately I will deploy there, but since it’s so much slower I hate to do it for dev time), but the instructions worked perfectly on the desktop to build the docker image and run it. Just have to make sure you map 5050, and I did the dash_url as http://0.0.0.0:5050.
Got my Hello World, now to bang on converting my old dashboard!
You have no idea how many times I have started messages today only to say “Hmmmm, I wonder” and figure it out before hitting send. The latest one was having the L in light capitalized by mistake. You gotta love this stuff…