Cannot get HADashboard running or APPDAEMON please help

Hi

I installed appdaemon on my ubuntu VM which is already running home assistant

I done sudo pip3 install appdaemon

Then created a config file in /home/homeassistant/conf (this not not wher emy HASS is, but i created it as per guide)

Here is my config

AppDaemon:
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
  cert_path: /home/has/fullchain.pem
  cert_verify: True
  time_zone: <time zone>
# app_dir: /etc/appdaemon/apps
HASS:
  ha_url: https://homeassistant.local:8123
  ha_key: MYHASPW

# Apps
hello_world:
  module: hello
  class: HelloWorld'

When running i get

has@homeassistant:/home/homeassistant/conf$ appdaemon -c /home/homeassistant/conf
2017-07-31 10:26:56.973015 INFO AppDaemon Version 2.0.8 starting
2017-07-31 10:26:56.973167 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for homeassistant.local has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for homeassistant.local has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
2017-07-31 00:26:57.038551 INFO Got initial state
2017-07-31 00:26:57.039062 INFO App initialization complete
2017-07-31 00:26:57.039376 INFO Dashboards are disabled
2017-07-31 00:26:57.058051 WARNING Disconnected from Home Assistant, retrying in 5 seconds

Im a total noob, so any help would be appreciated, and if i need to change anything could you please assist with the commands involved, thank you

Are you using SSL? If so you need to use the name on the certificate to access your system. If not, you shouldn’t use “https” in the home assistant URL.

Ty adding “-D DEBUG” to the command line and you should get more info.

Hi

I am using SSL as per the initial setup guide for HAS, self signed certificate i believe.

I believe the name is the same as the certificate, here is the debug

    has@homeassistant:/home/homeassistant/conf$ appdaemon -c /home/homeassis                                                                                                                              tant/conf -D DEBUG
2017-08-01 14:27:09.835142 INFO AppDaemon Version 2.0.8 starting
2017-08-01 14:27:09.835301 INFO Configuration read from: /home/homeassis                                                                                                                              tant/conf/appdaemon.yaml
2017-08-01 14:27:09.835389 DEBUG get_ha_config()
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/c                                                                                                                              onnection.py:344: SubjectAltNameWarning: Certificate for homeassistant.l                                                                                                                              ocal has no `subjectAltName`, falling back to check for a `commonName` f                                                                                                                              or now. This feature is being removed by major browsers and deprecated b                                                                                                                              y RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for detail                                                                                                                              s.)
  SubjectAltNameWarning
2017-08-01 04:27:09.924816 DEBUG Entering run()
2017-08-01 04:27:09.943767 DEBUG Creating worker threads ...
2017-08-01 04:27:09.944648 DEBUG Done
2017-08-01 04:27:09.944940 DEBUG Done
2017-08-01 04:27:09.945306 DEBUG Done
2017-08-01 04:27:09.945654 DEBUG Done
2017-08-01 04:27:09.946158 DEBUG Done
2017-08-01 04:27:09.946429 DEBUG Done
2017-08-01 04:27:09.946913 DEBUG Done
2017-08-01 04:27:09.947265 DEBUG Done
2017-08-01 04:27:09.947745 DEBUG Done
2017-08-01 04:27:09.947998 DEBUG Done
2017-08-01 04:27:09.948105 DEBUG Calling HA for initial state
2017-08-01 04:27:09.948268 DEBUG Refreshing HA state
2017-08-01 04:27:09.948371 DEBUG get_ha_state: entity is None
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/c                                                                                                                              onnection.py:344: SubjectAltNameWarning: Certificate for homeassistant.l                                                                                                                              ocal has no `subjectAltName`, falling back to check for a `commonName` f                                                                                                                              or now. This feature is being removed by major browsers and deprecated b                                                                                                                              y RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for detail                                                                                                                              s.)
  SubjectAltNameWarning
2017-08-01 04:27:09.965777 INFO Got initial state
2017-08-01 04:27:09.966192 DEBUG Reading Apps
2017-08-01 04:27:09.966327 INFO App initialization complete
2017-08-01 04:27:09.966472 DEBUG Starting timer loop
2017-08-01 04:27:09.966671 INFO Dashboards are disabled
2017-08-01 04:27:09.984631 WARNING Disconnected from Home Assistant, ret                                                                                                                              rying in 5 seconds
2017-08-01 04:27:09.984850 WARNING -------------------------------------                                                                                                                              -----------------------
2017-08-01 04:27:09.984974 WARNING Unexpected error:
2017-08-01 04:27:09.985080 WARNING -------------------------------------                                                                                                                              -----------------------
2017-08-01 04:27:10.054241 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py",                                                                                                                               line 1337, in appdaemon_loop
    "{}/api/websocket".format(url), sslopt=sslopt
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line                                                                                                                               487, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line                                                                                                                               211, in connect
    options.pop('socket', None))
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line                                                                                                                               77, in connect
    sock = _ssl_socket(sock, options.sslopt, hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line                                                                                                                               182, in _ssl_socket
    sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line                                                                                                                               160, in _wrap_sni_socket
    server_hostname=hostname,
  File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed                                                                                                                               (_ssl.c:645)

2017-08-01 04:27:10.054481 WARNING -------------------------------------                                                                                                                              -----------------------
2017-08-01 04:27:11.002382 WARNING Scheduler clock skew detected - delta                                                                                                                               = 1.002351999282837 - resetting
r: 1501561631.002352, t: 1501561630
2017-08-01 04:27:15.056394 DEBUG Refreshing HA state
2017-08-01 04:27:15.056564 DEBUG get_ha_state: entity is None
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for homeassistant.local has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
2017-08-01 04:27:15.075402 INFO Got initial state
2017-08-01 04:27:15.075579 INFO App initialization complete
2017-08-01 04:27:15.092484 WARNING Disconnected from Home Assistant, retrying in 5 seconds
2017-08-01 04:27:15.092713 WARNING ------------------------------------------------------------
2017-08-01 04:27:15.092840 WARNING Unexpected error:
2017-08-01 04:27:15.092977 WARNING ------------------------------------------------------------
2017-08-01 04:27:15.093359 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py", line 1337, in appdaemon_loop
    "{}/api/websocket".format(url), sslopt=sslopt
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line 487, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line 211, in connect
    options.pop('socket', None))
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 77, in connect
    sock = _ssl_socket(sock, options.sslopt, hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 182, in _ssl_socket
    sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 160, in _wrap_sni_socket
    server_hostname=hostname,
  File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

2017-08-01 04:27:15.093463 WARNING ------------------------------------------------------------
2017-08-01 04:27:20.095800 DEBUG Refreshing HA state
2017-08-01 04:27:20.095972 DEBUG get_ha_state: entity is None
/home/has/.local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for homeassistant.local has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
2017-08-01 04:27:20.115710 INFO Got initial state
2017-08-01 04:27:20.115849 INFO App initialization complete
2017-08-01 04:27:20.134088 WARNING Disconnected from Home Assistant, retrying in 5 seconds
2017-08-01 04:27:20.134248 WARNING ------------------------------------------------------------
2017-08-01 04:27:20.134325 WARNING Unexpected error:
2017-08-01 04:27:20.134388 WARNING ------------------------------------------------------------
2017-08-01 04:27:20.134625 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py", line 1337, in appdaemon_loop
    "{}/api/websocket".format(url), sslopt=sslopt
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line 487, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_core.py", line 211, in connect
    options.pop('socket', None))
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 77, in connect
    sock = _ssl_socket(sock, options.sslopt, hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 182, in _ssl_socket
    sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
  File "/usr/local/lib/python3.5/dist-packages/websocket/_http.py", line 160, in _wrap_sni_socket
    server_hostname=hostname,
  File "/usr/lib/python3.5/ssl.py", line 377, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 988, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

2017-08-01 04:27:20.134707 WARNING ------------------------------------------------------------
^C2017-08-01 04:27:21.508242 INFO Keyboard interrupt
2017-08-01 04:27:22.004243 DEBUG Event type:ha_stop:
2017-08-01 04:27:22.004403 DEBUG None
2017-08-01 04:27:25.139405 INFO Disconnecting from Home Assistant
2017-08-01 04:27:25.139853 INFO AppDeamon Exited

I think i am getting close, now getting

has@homeassistant:~$ sudo appdaemon -c /home/homeassistant/conf
2017-08-01 21:19:06.829869 INFO AppDaemon Version 2.0.8 starting
2017-08-01 21:19:06.830005 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2017-08-01 11:19:06.883168 INFO Got initial state
2017-08-01 11:19:06.883663 INFO App initialization complete
2017-08-01 11:19:06.883941 INFO Starting dashboard
2017-08-01 11:19:06.891548 INFO Connected to Home Assistant 0.49.0
2017-08-01 11:19:13.685254 INFO Compiling dashboard 'Hello.Dash'
2017-08-01 11:19:13.734549 WARNING Dashboard 'Hello.Dash' not found
2017-08-01 11:19:13.734751 INFO function [compile_dash] finished in 52 ms
2017-08-01 11:19:13.734889 WARNING ------------------------------------------------------------
2017-08-01 11:19:13.734982 WARNING Unexpected error during DASH creation
2017-08-01 11:19:13.735052 WARNING ------------------------------------------------------------
2017-08-01 11:19:13.735378 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/appdash.py", line 108, in _load_dash
    with open(include_path, "r") as include_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/conf/compiled/html/default/hello.dash_head.html'

2017-08-01 11:19:13.735450 WARNING ------------------------------------------------------------

Looks a lot better :slight_smile:

Can you post your dashboard file? Also there may be a permissions error in your conf directory that doesn;t allow AppDaemon to write the compiled dashboards. Do you have a compiled directory there?

I’m stuck here too, receiving the same error. Won’t compile my dashboards.

Same questions to you …

Hello.dash

#
# Main arguments, all optional
#
title: Hello Panel
widget_dimensions: [120, 120]
widget_margins: [5, 5]
columns: 8

label:
    widget_type: label
    text: Hello World

layout:
    - label(2x2)

compiled wasnt there, so i manually created it

creating the dir isnt the way to go.
appdaemon needs writing rights to the conf dir.
so you better set the rights from that dir and all beneath it to read/write for the user you use to run appdaemon.

Thank you

i got it up and running though i am not sure if im missing items

Ive been asking for dash samples, and i keep getting told there are heaps in the example_dashboards folder, i cannot seem to find this folder at all

i dont have all the widgets etc that i can find either?

Hi @aimc - Is this something you might be able to assist with?

in your conf dir is a subdir called example_dashboards.
in the appdeamon dir is a file called DASHBOARD.md with all the info to built a dashboard.

and you can alsways start with a dashboard like this and use all entities that you have in HA.

#
# Main arguments, all optional
#
title: Main Panel
widget_dimensions: [122, 120]
widget_margins: [5, 5]
columns: 8
#
# Layout
#    
layout:
    - clock(2x1), weather(2x2), sensor.your_sensor, switch.your_switch, device_tracker.your_device, light.your_light

Hi

thanks for that, unfortunately there is no example_dashboards in my conf dir

the files can be found here:

thank you very much :slight_smile:
is there a zip file of the lot to save me downloading them all individually?

nope, but i advise you just to look at the examples and create your own.
you need to put in your own entities anyway :wink:

Hello, people!
I-m stuck with ImportError: No module named ‘bcrypt’

My set up is Raspbian RPI3 running
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Following the pip3 install instrux when I try
python3 -m appdaemon.appdaemon -C /conf
Gives that error message typing “sudo pip3 install bcrypt” retrieves a “no package found”
Trying to install “python-dev” says that all packages are installed and updated.

So I tryed with python 2.7 but gives the same error
No module named ‘bcrypt’

Did someone have the same problem?

Thanks in advance!

Try:

$ sudo apt-get install bcrypt

I’ll try tonight at home.

I’m getting different error when I try to run appdaemon after HA 0.53 upgrade:

pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf
2017-09-10 11:41:16.410924 INFO AppDaemon Version 2.1.9 starting
2017-09-10 11:41:16.411481 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/admain.py", line 478, in main
    conf.app_config_file_modified = os.path.getmtime(conf.app_config_file)
  File "/usr/lib/python3.4/genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/conf/apps.yaml'

and here my DEBUG output:

pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf -D DEBUG
2017-09-10 11:42:57.479949 INFO AppDaemon Version 2.1.9 starting
2017-09-10 11:42:57.480887 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2017-09-10 11:42:57.481547 DEBUG AppDaemon Section: {'disable_apps': 1, 'errorfile': 'STDERR', 'threads': 10, 'cert_verify': True, 'time_zone': '<time zone>', 'logfile': 'STDOUT'}
2017-09-10 11:42:57.482170 DEBUG Hass Section: {'ha_url': 'http://10.0.0.50:8123'}
2017-09-10 11:42:57.482747 DEBUG HADashboard Section: {'dash_url': 'http://10.0.0.50:5050', 'dash_dir': '/home/homeassistant/.homeassistant/dashboard', 'dash_force_compile': 1}
2017-09-10 11:42:57.483313 DEBUG Calling HA for config with key:  and url: http://10.0.0.50:8123
2017-09-10 11:42:57.483862 DEBUG get_ha_config()
2017-09-10 11:42:57.484400 DEBUG get_ha_config: url is http://10.0.0.50:8123/api/config
2017-09-10 11:42:57.516382 DEBUG Success
2017-09-10 11:42:57.517279 DEBUG {'location_name': 'Home', 'version': '0.53.0', 'whitelist_external_dirs': ['/home/homeassistant/.homeassistant/www'], 'longitude': 28.884605, 'latitude': 41.005993, 'config_dir': '/home/homeassistant/.homeassistant', 'time_zone': 'Europe/Istanbul', 'elevation': 0, 'components': ['remote', 'api', 'input_select', 'recorder', 'media_player.plex', 'cover', 'panel_custom', 'camera.generic', 'updater', 'media_player.samsungtv', 'media_player.denonavr', 'light', 'binary_sensor.mqtt', 'sun', 'switch', 'config.script', 'sensor.mqtt', 'sensor.google_geocode', 'config.group', 'shell_command', 'mqtt', 'group', 'sensor.rest', 'script', 'switch.broadlink', 'ifttt2', 'scene', 'input_slider', 'input_boolean', 'scene.homeassistant', 'config', 'sensor.wunderground', 'apple_tv', 'discovery', 'sensor.systemmonitor', 'light.hue', 'notify', 'binary_sensor', 'sensor', 'http', 'media_player.vlc', 'media_player.kodi', 'tts', 'zone', 'ifttt', 'media_player.apple_tv', 'sensor.command_line', 'history', 'config.core', 'websocket_api', 'camera', 'conversation', 'remote.apple_tv', 'automation', 'frontend', 'logbook', 'config.customize', 'sensor.google_travel_time', 'switch.mqtt', 'media_player', 'sensor.broadlink', 'device_tracker', 'sensor.darksky', 'config.automation'], 'unit_system': {'mass': 'g', 'temperature': '°C', 'length': 'km', 'volume': 'L'}}
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/admain.py", line 478, in main
    conf.app_config_file_modified = os.path.getmtime(conf.app_config_file)
  File "/usr/lib/python3.4/genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/conf/apps.yaml'

Here is my config file:

AppDaemon:
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
#  cert_path: <path/to/root/CA/cert>
  cert_verify: True
  time_zone: <time zone>
  disable_apps: 1
#  app_dir: /etc/appdaemon/apps

HASS:
  ha_url: http://10.0.0.50:8123
#  ha_key: <some key>

# Apps
#hello_world:
#  module: hello
#  class: HelloWorld

HADashboard:
  dash_url: http://10.0.0.50:5050
  dash_dir: /home/homeassistant/.homeassistant/dashboard
  dash_force_compile: 1

any advice?