Announcement - HADashboard v2 Beta 2!

Let me enhance this request to any sensor type widget. For example, I might have a sensor that shows me the general state of my garage. Green means everything is closed up and the lights are off. Yellow means the lights are on, and the doors may be open, but someone is home. Red means that the doors are open and no one is home. I would like to be able to click on the sensor and have it take me to my garage page. Yes, I could probably do that with a navigation widget today. But let’s say it’s a numeric value like the temperature or something and I want it to take me to the HVAC controls or something. A popup would be nice, but sometimes you might want to actually go to another dashboard.

Does that make any sense?

i think that is something i would let go to custom widgets :wink:

what you want is to combine 2 widgets that are already there. (navigate and sensor)
i think that for 99% of the sensors that makes no sence.

I’m seeing the same “There is no current event loop in thread 'Thread-12'.” errors that other people are seeing. I’m seeing this following both the Docker instructions and the pip instructions.

The tracebacks are effectively identical:

2017-03-23 16:34:01.744380 INFO AppDaemon Version 2.0.0beta2 starting
2017-03-23 12:34:06.810623 INFO Got initial state
2017-03-23 12:34:06.810958 INFO Loading Module: /conf/apps/hello.py
2017-03-23 12:34:06.811732 INFO Loading Object hello_world using class HelloWorld from module hello
2017-03-23 12:34:06.843950 INFO hello_world: Hello from AppDaemon
2017-03-23 12:34:06.844492 INFO hello_world: You are now ready to run Apps!
2017-03-23 12:34:06.844556 INFO App initialization complete
2017-03-23 12:34:06.844802 INFO Starting dashboard
2017-03-23 12:34:06.847675 WARNING ------------------------------------------------------------
2017-03-23 12:34:06.847801 WARNING Unexpected error in dashboard thread
2017-03-23 12:34:06.847879 WARNING ------------------------------------------------------------
2017-03-23 12:34:06.849031 INFO Connected to Home Assistant 0.40.2
2017-03-23 12:34:06.849584 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/appdaemon/appdash.py", line 241, in run_dash
    handler = app.make_handler()
  File "/usr/local/lib/python3.4/site-packages/aiohttp/web.py", line 224, in make_handler
    self._set_loop(loop)
  File "/usr/local/lib/python3.4/site-packages/aiohttp/web.py", line 110, in _set_loop
    loop = asyncio.get_event_loop()
  File "/usr/local/lib/python3.4/asyncio/events.py", line 626, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/local/lib/python3.4/asyncio/events.py", line 572, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-12'.

2017-03-23 12:34:06.849668 WARNING ------------------------------------------------------------

How do we do custom widgets?

thats an upcoming feature :wink:

Here is how I would see it being useful. Given the layout below. Yes Excel has uses in Home Automation.

We’ve already talked about the weather iframe being able to be clicked on to take me to my weather web page of choice (maybe to a local TV station, or to an outdoor camera somewhere, etc). But for things like the Doors, or Covers, I don’t want to open or close them from the page I am designing, but clicking on them should take me to a page where I might have a camera pointed at the door, and could open/close it from there. Think of it as a drill down, with more information that you would typically want with a popup.

Curious what platform you are running on?

As I said above I think this will be fixed with a little bit of refactoring I am planning for the next beta.

great looking forward to giving it a spin!

Ubuntu 17.04, so Python 3.5 for the pip installation and Docker 1.12.6; I’ve just tested Python 3.4 for the pip installation as well, which has the same result.

Wierd, I’m on Ubuntu 16.04 so not much difference there.

What version of aiohttp?

$ pip3 show aiohttp
Name: aiohttp
Version: 2.0.2
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp/
Author: Nikolay Kim <[email protected]>, Andrew Svetlov <[email protected]>
Author-email: [email protected]
License: Apache 2
Location: /home/daniel/.virtualenvs/appdaemon/lib/python3.5/site-packages
Requires: multidict, yarl, chardet, async-timeout

And my full env:

$ pip freeze -l
aiohttp==2.0.2
aiohttp-jinja2==0.13.0
appdirs==1.4.3
astral==1.4
async==0.6.2
async-timeout==1.2.0
chardet==2.3.0
configparser==3.5.0
daemonize==2.4.7
Jinja2==2.9.5
MarkupSafe==1.0
multidict==2.1.4
packaging==16.8
pkg-resources==0.0.0
pyScss==1.3.5
pytz==2016.10
PyYAML==3.12
requests==2.13.0
six==1.10.0
sseclient==0.0.15
voluptuous==0.9.3
websocket-client==0.40.0
yarl==0.10.0

OK, you are using a much later version than me. Also, looks like HASS is on 1.3.3 so I assume you are running hass in a virtual environment?

If so, you could try a downgrade:

$ pip3 install aiohttp==1.2.0

That will force it to the version I am using. That shouldn;t affect HASS if you are running it in a venv. If you aren’t, don’t do it!

Yep, HASS is in a virtualenv.

This fixed it! (HASS has its own virtualenv, so this was safe for me to do.)

Excellent - that is one mystery solved - thanks for helping me figure that out.

Any time, thanks for digging in to it!

1 Like

I just tried something that I figured wouldn’t work, and it gave me a strange message that makes me think it might actually work. What I want to do is put a two cell margin on the left of my display so I’m using the following.

- spacer(2x7)  
- include: header
- bla bla bla

It works fine, but it puts a blank line associated with spacer line at the top. So I tried

- spacer(2x7), include: header 

This gave me the following message in the browser and in the message log.

‘include’: {‘spacer(2x7), include’: ‘header’}

I tried putting that in and got a big dump in the log.

Should this work?

No, as per the docs, include blocks can only be a whole row wide at the moment

Thank you! downgrading aiohttp fixed it also for me. I’m happy that i can play with the dashboard again. Was starting to miss it :slight_smile:
Thanks again for the great work!

1 Like

oke, for those who are interested in grouping/nesting widgets.
i tested this and it works!!
the only problem is that some skin give scrollbars. (probably because of shadows)

you can use iframe to place groups anywhere in your dash.
you can even use different skins for different groups.

just this example:

title: Test iframe dashboard
widget_dimensions: [120, 120]
widget_margins: [5, 5]
columns: 7

iframe:
    widget_type: iframe
    url_list: 
      - http://192.168.178.26:5050/dash_main_simple_test
iframe2:
    widget_type: iframe
    url_list: 
      - http://192.168.178.26:5050/dash_main_simple_test?skin=transparant

layout:
    - spacer(2x2),iframe(2x5)
    - 
    - spacer(4x5),iframe2(2x5)
2 Likes

Unable to get the climate widget to work, i keep getting ‘entity not found’. Does it not work for all climate entities?