Announcement: HADashboard v2 Beta!

I may have spoken too soon. I get the first screen.

When I click on Hello I get

I’m guessing that since it saw that hello was out there, that it’s seeing the dashboards directory correctly.

Can you post the log entry please - I need that for ALL errors.

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.

Cheers!

1 Like

What platform are you running on?

Ubuntu 16.04

Not much there. Nothing in the .err file at all.

2017-03-04 14:32:55.690529 INFO AppDaemon Version 2.0.0beta1 starting
2017-03-04 14:33:01.106517 INFO Got initial state
2017-03-04 14:33:01.108025 INFO Loading Module: /home/pi/appdaemon_dashboard/appdaemon/conf/apps/hello.py
2017-03-04 14:33:01.110880 INFO Loading Object hello_world using class HelloWorld from module hello
2017-03-04 14:33:01.276358 INFO hello_world: Hello from AppDaemon
2017-03-04 14:33:01.279107 INFO hello_world: You are now ready to run Apps!
2017-03-04 14:33:01.279584 INFO App initialization complete
2017-03-04 14:33:01.280488 INFO Starting dashboard
2017-03-04 14:33:01.296121 INFO Listening on ('192.168.2.26', 5050)
2017-03-04 14:33:01.315410 INFO Connected to Home Assistant 0.39.3
2017-03-04 14:36:30.441964 WARNING Scheduler clock skew detected - delta = 24.44187092781067 - resetting
2017-03-04 14:36:30.446958 WARNING Scheduler clock skew detected - delta = 1.553138017654419 - resetting
2017-03-04 14:36:30.451636 WARNING Scheduler clock skew detected - delta = 1.5484609603881836 - resetting
2017-03-04 14:36:30.456152 WARNING Scheduler clock skew detected - delta = 1.5439391136169434 - resetting
2017-03-04 14:36:30.460723 WARNING Scheduler clock skew detected - delta = 1.5393750667572021 - resetting
2017-03-04 14:36:30.465334 WARNING Scheduler clock skew detected - delta = 1.534761905670166 - resetting
2017-03-04 14:36:30.469876 WARNING Scheduler clock skew detected - delta = 1.530216932296753 - resetting
2017-03-04 14:36:30.474467 WARNING Scheduler clock skew detected - delta = 1.5256280899047852 - resetting
2017-03-04 14:36:30.478993 WARNING Scheduler clock skew detected - delta = 1.5211000442504883 - resetting
2017-03-04 14:36:30.483812 WARNING Scheduler clock skew detected - delta = 1.5162999629974365 - resetting
2017-03-04 14:36:30.488550 WARNING Scheduler clock skew detected - delta = 1.5115559101104736 - resetting
2017-03-04 14:36:30.493422 WARNING Scheduler clock skew detected - delta = 1.5066759586334229 - resetting
2017-03-04 14:36:30.497963 WARNING Scheduler clock skew detected - delta = 1.5021300315856934 - resetting
2017-03-04 14:41:50.420788 INFO Compiling dashboard 'Hello'
2017-03-04 14:44:52.734713 INFO Compiling dashboard 'Hello'
2017-03-04 14:44:55.289444 INFO Compiling dashboard 'Hello'
2017-03-04 14:45:32.072845 INFO Compiling dashboard 'Hello'
(venv) pi@haweb:~/appdaemon_dashboard/appdaemon$

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)

I’ve tried a couple of things to duplicate the error, perms, munging up Hello.dash, etc. but can’t find it on my end.

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'
1 Like

OK, I’ll add a check for that in the next version.

OK, as I suspected - that’s really early on in the initialization of the dashboard and isn;t inside my error checks - easy fix :slight_smile:

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.

Thanks

2 Likes

Weird that it doesn’t cause the same error for the custom_css directory. I just checked and noticed mine is owned by root.

The diffecernce is custom_css is just read, wheras compiled needs write access.

1 Like

Success!!

Short lived though

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

We got that in the pre beta as well. It doesn’t stop you from running it though. I’m getting it right now and all my dashes and skins work fine.

Yes that’s a harmless cosmetic error caused by a race condition - the fix is somewhat involved so I am not doing it for now.

Today I learned Python is racist.

2 Likes

@turboc - I just added some error checking and if that happens again, you will see:

And the error will make it into the logs. This fix will be in beta2.

1 Like

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!

1 Like

Excellent news :slight_smile:

Could you give me a line or two to add to the instructions to explain that properly so I don;t mess it up?