Announcement - HADashboard v2 Beta 2!

Please test the cover widget for me - I don;t have one so I can’t!

I don’t think it hit yet, my pulls keep saying I am already up to date.

Here is the hello one. It’s a LOT shorter and does the same thing.

(venv) pi@haweb:~/appdaemon_dashboard/appdaemon/conf/compiled/javascript/default$ cat hello_init.js 
$(function(){ //DOM Ready

    $(document).attr("title", "Hello Panel");
    content_width = (120 + 5) * 8 + 5
    $('.gridster').width(content_width)
    $(".gridster ul").gridster({
        widget_margins: [5, 5],
        widget_base_dimensions: [120, 120],
        avoid_overlapped_widgets: true,
        max_size_x: 8,
        shift_widgets_up: false
    }).data('gridster').disable();
    
    // Add Widgets

    var gridster = $(".gridster ul").gridster().data('gridster');
    
        gridster.add_widget('<li><div data-bind="attr: {style: widget_style}" class="widget widget-display-default-label" id="default-label"><h1 class="title" data-bind="text: title, attr:{ style: title_style}"></h1><h1 class="title2" data-bind="text: title2, attr:{ style: title2_style}"></h1><div class="valueunit"><h2 class="value" data-bind="text: value, attr:{ style: value_style}"></h2><p class="unit" data-bind="html: unit, attr:{ style: unit_style}"></p></div></div></li>', 2, 2, 1, 1)
    
    
    
    var widgets = {}
    // Initialize Widgets
    
        widgets["default-label"] = new display("default-label", "http://192.168.2.26:5050", "default", {'icons': [], 'static_icons': [], 'fields': {'title2': '', 'unit': '', 'title': '', 'value': 'Hello World'}, 'widget_type': 'display', 'static_css': {'widget_style': 'background-color: #444;', 'value_style': 'color: #fff;', 'title2_style': 'color: #fff;', 'title_style': 'color: #fff;', 'unit_style': ''}, 'css': {}})
    
    
    // Start listening for HA Events
    if (location.protocol == 'https')
    {
        wsprot = "wss:"
    }
    else
    {
        wsprot = "ws:"
    }
    var stream_url = wsprot + '//' + location.host + '/stream'
    ha_status(stream_url, "Hello Panel", widgets);

});(venv) pi@haweb:~/appdaemon_dashboard/appdaemon/conf/compiled/javascript/default$

Not much today - the clocks went forward!

Appears to be golden! Showing correct icon status, state_text shown properly, toggle moves door up and down.

1 Like

Still unable to get a new pull…

It was in there so you must have been up to date. I just pushed a new version with a fix for the fix.

Rob, Are you using the dev branch or the beta branch?

I’m not sure - I guess the dev branch; it’s whatever I have been pulling in the past.

pi@raspi1:~/appdaemon_dashboard/appdaemon$ git pull origin
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 10 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
From https://github.com/home-assistant/appdaemon
   12d3252..c16ccd9  hadashboard_beta -> origin/hadashboard_beta
Already up-to-date.

OK, try again now

EDIT: Looks like you are pulling from the beta branch now not the dev branch.

Same.

pi@raspi1:~/appdaemon_dashboard/appdaemongit pull origin                      remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/home-assistant/appdaemon
   c16ccd9..d4e4402  hadashboard_beta -> origin/hadashboard_beta
Already up-to-date.
pi@raspi1:~/appdaemon_dashboard/appdaemon$ git pull origin
Already up-to-date.
pi@raspi1:~/appdaemon_dashboard/appdaemon$

How did that happen? I’ve just been using the command line history and doing git pull origin. I didn’t change anything on my end.

Hello Forum,
I have managed it to get the HADashboard installed on my Pi3 by following the description here.
Starting with sudo docker start appdaemon the Pi is responding with appdaemon.
Watching the log with sudo docker logs -f appdaemon the Pi is responding with “Warning, unable to connect to Home Assist, retry in 5 seconds”

the appdaemon.cfg looks like this, and I am wondering whether the ha_url is correct. What do I have to put in there when I have installed HA with Hassbian ?
[AppDaemon]
ha_url = http://192.168.1.152:8123
ha_key = password
logfile = STDOUT
errorfile = STDERR
threads = 10
latitude =
longitude =
elevation =
time_zone =

Apps

[hello_world]
module = hello
class = HelloWorld

Can you post all of the errors in the console, not just the last one please?

pi@hassbian:~ $ sudo docker start appdaemon
appdaemon

pi@hassbian:~ $ sudo docker logs -f appdaemon
2017-03-12 09:10:15.979306 INFO AppDaemon Version 2.0.0beta1 starting
2017-03-12 09:10:16.047536 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
and the retry is going on and on

This is all there is in there.

jQuery.Deferred exception: WidgetBase is not defined ReferenceError: WidgetBase is not defined
    at new display (http://192.168.2.26:5050/compiled_javascript/application.js:1089:5)
    at HTMLDocument.<anonymous> (http://192.168.2.26:5050/compiled_javascript/default/hello_init.js:25:36)
    at j (http://192.168.2.26:5050/javascript/jquery-3.1.1.min.js:2:29948)
    at k (http://192.168.2.26:5050/javascript/jquery-3.1.1.min.js:2:30262) undefined
r.Deferred.exceptionHook @ jquery-3.1.1.min.js:2
jquery-3.1.1.min.js:2 Uncaught ReferenceError: WidgetBase is not defined
    at new display (application.js:1089)
    at HTMLDocument.<anonymous> (hello_init.js:25)
    at j (jquery-3.1.1.min.js:2)
    at k (jquery-3.1.1.min.js:2)

Not that this will fix the issue but you should update to the latest version with the instructions at the top of this post.

Your URL format looks fine, but it must match the IP address of the machine that HASS is installed on. You could try running AppDaemon with -D DEBUG to get a more verbose error message.

OK, can you post the source of the Dashboard page. The HTML I mean.

<!DOCTYPE html>
<html lang="en">
<head>
	<link rel="shortcut icon" href="images/favicon.ico" />
    <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
    <link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="images/manifest.json">
    <meta name="theme-color" content="#ffffff">
    
	<title></title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="apple-web-app-capable" content="yes">	
    <meta name='mobile-web-app-capable' content='yes'>
	<link rel="stylesheet" type="text/css" href="compiled_css/default/hello_application.css">
	<link rel="stylesheet" type="text/css" href="css/jquery.gridster.css">
	<link rel="stylesheet" type="text/css" href="css/climacons-font.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
	<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css" media="all" />
	<script type="text/javascript" src="javascript/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="javascript/jquery.gridster.js"></script>
	<script type="text/javascript" src="javascript/knockout-3.4.1.js"></script>
	<script type="text/javascript" src="javascript/reconnecting-websocket.min.js"></script>
	<script type="text/javascript" src="javascript/dashboard.js"></script>
	<script type="text/javascript" src="compiled_javascript/application.js"></script>
	<script type="text/javascript" src="compiled_javascript/default/hello_init.js"></script>
	
	
		
			<! head tags go here ->
		
	

</head>
<body>
	
        
            
                <! body tags go here ->
            
        	
            <div class="dasboard-main" id="container">
            <div class="gridster">
			<ul>
			</ul>
            </div>
            </div>
	
</body>
</html>

OK, lets take a look at the Dashboard definition and I’ll try and reproduce this locally.

I just changed my URL from IPAddress:5050 to hostname:5050 and it works.

Sort of. The icons still don’t come up initially. But if I click on them, they show up and work. But if I reload the page, they go away until I click on them again.