Announcement: HADashboard v2 Beta!

Let’s try this to eliminate any misunderstanding.

Paste the contents of your appdaemon.cfg file (after sanitizing any passwords) to a new post.

Then select that code block and press the preformatted text button indicated in the image below:

That will preserve all the formatting and let us see it properly.

Ok sorry.

Here it is:

[AppDaemon]
ha_url = http://192.168.x.xxx:8123
ha_key = xxxxxxx
logfile = /home/homeassistant/appdaemon_dashboard/appdaemon/appdaemon.log 
errorfile = /home/homeassistant/appdaemon_dashboard/appdaemon/appdaemon.err
threads = 10
latitude = xx.xxxx
longitude = x.xxxx
elevation = 238
time_zone = Europe/Rome
app_dir = /home/homeassistant/appdaemon_dashboard/appdaemon/conf/apps
dash_url = http://192.168.x.xxx:5050
dash_dir = /home/homeassistant/appdaemon_dashboard/appdaemon/conf/dashboards
# Apps
[hello_world]
module = hello
class = HelloWorld

Also, While the dashboard shows the icon and shows the input i’m on for the TV and the title of what’s playing for DirecTv and AppleTv, I can’t control any of them and I can at least turn them on and off from HA.

Nothing in the logs, no errors on the screen. It remains gray but with text across it describing what is playing.

These are leftovers from the old appdaemon.cfg example and can be removed.

latitude = xx.xxxx
longitude = x.xxxx
elevation = 238
time_zone = Europe/Rome

Comment out these two lines as you shouldn’t need them:

app_dir = /home/homeassistant/appdaemon_dashboard/appdaemon/conf/apps

dash_dir = /home/homeassistant/appdaemon_dashboard/appdaemon/conf/dashboards

Now, I know this may sound silly, but go to a browser and verify that HA is running and that you can log in to it using the exact same URL and password that are in your appdaemon.cfg

So ran into a Docker issue here now that I’m not in localhost terms. It looks like dash_url is literally being sent down to the client browser and its doing redirects/requests against that. 0.0.0.0 works fine from localhost but not remotely, obviously…

It appears the dash_url is also used to figure out a bind address, so it’s not possible to make this work as a container right now.

Is there a reason the relative paths didn’t work and that’s why dash_url was hard coded? If that’s the case I’d request being able to split up the bind config from the dash_url config (with defaults like, bind any:5050 is just the default if you don’t specify otherwise)

2 Likes

Ok here’s my quick hack for now…

Put the external address in dash_url in appdaemon.cfg

In appdash.py under run_dash, changed this line to hard code the 0.0.0.0
f = loop.create_server(handler, "0.0.0.0", int(conf.dash_port))

Enough to keep moving on!

1 Like

It’s alllllivveeee (V2 on the tablet, V1 on the computer)

3 Likes

FIrst Screen Down, a bunch more to go!!!

Just a couple things for the wish list ( dashboard Vn)

  1. A way to draw boxes around a group of widgets
  2. that’s all I got at the moment. :slight_smile:

AWESOME App

Thanks!!!

2 Likes

Where do you get the different icons?

Oh, you’re about to have some fun :slight_smile:

These are the Font Awesome icons that you can use in Dashboard (and HASS!!) directly. They are bundled with both.

Go to http://fontawesome.io/icons/ to look them up

Then in your widgets you can do stuff like
icon_on: fa-user

Where fa-user is the class ID for that icon

1 Like

I can’t seem to get past the websocket error…

$ python3 -m appdaemon.appdaemon -c ./conf
Traceback (most recent call last):
File “/usr/local/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/local/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdaemon.py”, line 17, in
from websocket import create_connection
ImportError: No module named ‘websocket’

This after installing and uninstalling and re-installing websockets

AIO RPI3 HA 0.39.2

Any ideas?

The install line was …
sudo pip3 install websocket-client
Collecting websocket-client
Requirement already satisfied: six in /usr/local/lib/python3.4/dist-packages (from websocket-client)
Installing collected packages: websocket-client
Successfully installed websocket-client-0.40.0

Did you install websockets-client

I see you did …

initially it came up with…
sudo pip3 install websocket-client
Collecting websocket-client
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x75f35f10>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/websocket-client/
Downloading websocket_client-0.40.0.tar.gz (196kB)
100% |████████████████████████████████| 204kB 412kB/s
Requirement already satisfied: six in /usr/local/lib/python3.4/dist-packages (from websocket-client)
Building wheels for collected packages: websocket-client
Running setup.py bdist_wheel for websocket-client … done
Stored in directory: /root/.cache/pip/wheels/d1/5e/dd/93da015a0ecc8375278b05ad7f0452eff574a044bcea2a95d2
Successfully built websocket-client
Installing collected packages: websocket-client
Successfully installed websocket-client-0.40.0

I have it working on the Raspberry Pi via Docker, not much different. Quick steps

  • Create a folder and clone the git, cd into appdaemon folder

  • Modify Dockerfile, replacing
    FROM python:3.4
    with
    FROM resin/raspberrypi-python:3.4
    so you’re getting an ARM base image

  • Modify appdaemon/appdash.py and change the create_server line under run_dash to:
    f = loop.create_server(handler, "0.0.0.0", int(conf.dash_port))

  • Setup an appropriate appdaemon.cfg file in the conf folder:

    [AppDaemon]
    ha_url = HASS_URL_HERE!
    ha_key = HASS_API_KEY_HERE!
    logfile = STDOUT
    errorfile = STDERR
    dash_url = http://LAN_IP_OF_DOCKER_HOST_HERE:5050
    disable_apps = 1

  • Same build/create/start stuff as before:

    docker build -t appdaemon_dashboard .
    docker create --name appdaemon_dashboard --restart always -p 5050:5050 -v /etc/localtime:/etc/localtime:ro -v FULL_PATH_TO_CONF:/conf appdaemon_dashboard
    docker start appdaemon_dashboard
    docker logs -f appdaemon_dashboard

  • Profit!

Build time and startup/runtime performance are notably better than v1 :slight_smile:

3 Likes

Another documentation update

This will look for a file called top_panel.yaml in the dashboards directory, then include it. There are a couple of different ways this can be used.

  • If the yaml file includes it’s own layouts directive, the widgets from that file will be placed as a block, in the way described by its layout, making it reusable. You can change the order of the blocks inclusion by moving where in the original layout directive you include them.
  • If the yaml file just includes widget definitions, it is possible to perform the layout in the higher level dash if you prefer so you still get an overall view of the dashboard. This approach has the benefit that you can be completely flexible in the layout wheras the first method defines fixed layouts for the included blocks.

There is one other option.
You can create widget definitions in the main file and use them in the layout of the header/footer/etc.

For example, I have a header that has a label in it that lists the room that the dashboard is associated with. If I put the label widget definition, in the header file, all the pages get the same message. So I put the label widget definition in the main file for the room, and referenced it from the layout in the header. Now each page has the right name displayed in the header.

2 Likes

Why can you click on device_trackers and toggle them from home to away??? Can you disable being able to click on it so it just shows you where they are?

One last question and I think I’m gonna call it a night. I’m not sure if it’s age, or being tired, but I forgot what I was going to ask.

oh yea, persistent notifications. Do they get sent to the dashboard?

Was the same on v1 - I occasionally need to correct the system to reality.

No support for them yet.

Well done guys, I installed using pip3 and it worked straight after configuring the conf file and adding dash line.

Great work, missed first to get it running, but it worked first up for me.

2 Likes