Announcement: HADashboard v2 Beta!

How do i load the custom skin? I have the custom_css folder in the /conf directory, folder “template_name” below that which contains dashboard.css and variables.yaml. Made simple body background color change but don’t see it on the dashboard. Does it load the custom by default if its there or do i need to append something to the url load the provided skins? tried ?skin=custom, ?skin=name and just 500 errors. Apoligize if I missed something in the docs regarding this.

I’m in a non-docker stand alone environment.
Dash_url=192.168.2.xx
Modified appdash.py as shown substituting “0.0.0.0” for the variable in the f= line.
dashboard host is 192.168.2.xx just like the Dash_url
http://100.6.200.xx (external ip):5050/Den

And can you dumb down your explanation of what is happening. I almost understand, but not quite.

I could see a way of doing a sports skin like this:

In variables.yaml, you set up color pairings (assuming most team colors consist of two colors - I am literally that out of touch with sports!) for all the available color combos. You’d have to find some sort of list somewhere that would give you this information.

Then you would be able to choose the color scheme based on a color pair.

Ok, no problem. Guess it’s a good one for me to learn on. But you have to help me. LOL

You sure it’s not just because you are a Cubs fan??? again LOL :slight_smile:

1 Like

It should be that - the name of the skin is the name of the folder. Check your logfile for errors.

You should be able to copy one of the existing skin folders from /assets/css into the custom_css folder and then rename the folder.

Then in the url add ?skin=yourfoldername

I’m team agnostic but I will be glad to help where I can.

LOL

One thing to mention - I am in the process of adding a lot of widgets and the more skins I have the longer it takes as I have to update all the skins. For this reason I won’t be integrating any new skins until after the beta at which point we should have a lower rate of widget addition :slight_smile:

But don;t get me wrong - I am excited to see what you do with it !

rpitera, thanks, guess the variables.yaml file can’t be empty. I’m good now (for a while at least…)

1 Like

Did you at least get a sensible error in the logs? If not I’ll fix that.

1 Like

I got the error page in the browser and this in the logs when I tried it.

2017-03-05 12:52:05.600028 INFO Loading custom skin 'test'
2017-03-05 12:52:05.600802 INFO Compiling dashboard 'MainPanel'
2017-03-05 12:52:05.602194 WARNING ------------------------------------------------------------
2017-03-05 12:52:05.602711 WARNING Unexpected error in CSS file
2017-03-05 12:52:05.603102 WARNING ------------------------------------------------------------
2017-03-05 12:52:05.607549 WARNING Traceback (most recent call last):
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdash.py", line 82, in load_dash
    dash = dashboard.compile_dash(name, skin, skindir, request.rel_url.query)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 27, in profiled_fn
    dash = fn(*args, **kwargs)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 44, in newfunc
    result = func(*args, **kwargs)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 451, in compile_dash
    dash = get_dash(name, skin, skindir)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 486, in get_dash
    css_vars = load_css_params(skin, skindir)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 70, in load_css_params
    return expand_vars(css, css)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/dashboard.py", line 83, in expand_vars
    for varline in fields:
TypeError: 'NoneType' object is not iterable

2017-03-05 12:52:05.608192 WARNING ------------------------------------------------------------
2017-03-05 12:52:05.619687 INFO Dashboard disconnected

Error page was “No Dashboard could be found”

OK we can clean that up a bit.

Works great in portrait mode too, I promise this will be the last image for while :wink:

Sorry for the grainy quality image!

If anyone’s interested in doing this with a Raspberry Pi touchscreen, don’t forget:

  • edit the /boot/config.txt file and include at the bottom display_rotate=1

  • install xinput in you haven’t yet, sudo apt-get install xinput

  • finally, as part of start-up run the following command to line up the touch-screen to the rotated display:

xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

edit:

And for tidiness also: sudo apt-get install unclutter to stop the cursor ruining things.

3 Likes

What do you mean last image - keep em coming! I love seeing them in use…

2 Likes

Cool that you got it. Yeah, maybe it was that you need to nuke the image and not the container. Not sure. I know it’s a bit obtuse to understand when you’re following someone else’s instructions and then have new instructions out of order.

So I think the issue right now is…

Your browser is being fed ws://dash_host:dash_port , which is derived from the Dash_url when it loads. so when you connect from http://100.6.200.xx externally, the HTTP side renders fine, but then it goes to hit that ws:// url, but it’s getting 192.168.2.xx, which obviously doesnt work externally.

That’s going to take a deeper code change to make the ws:// match the situation, eg, not be “hard coded” against dash_url.

That is essentially correct - the ws:// url is what gets the streaming updates so you won’t see any updates, but you also get blank values at page load because the widgets attempt to connect back to AppDaemon to grab their initial state.

1 Like

Thanks, sorry in and out of the office today. That is the error I got as well.

@aimc this is the correct way to include images in the custom css correct?

background: #ffffff url('/custom_css/template_name/img/background_1.jpg') no-repeat 0 0 fixed;  

Getting a 404 error in chrome at http://172.30.1.xx:5050/custom_css/template_name/img/background_1.jpg

Thanks!