Cannot get HADashboard running or APPDAEMON please help

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?

huh! Problem solved after manually creating apps.yaml in config folder. I think main problem is updating to latest version of AppDaemon.

Yes, this was a breaking change in the latest version of AppDaemon:

1 Like

Hi I have same error my appdaemon loads in pi but in the url its showning 404: Not Found please help My appdaemon shows this errors:

2017-09-14 04:35:45.746120 INFO AppDaemon Version 2.1.9 starting
2017-09-14 04:35:45.747054 INFO Configuration read from: /home/homeassistant/.homeassistant/appdaemon.yaml
2017-09-14 04:35:46.870749 INFO Starting Apps
2017-09-14 04:35:47.332978 INFO Got initial state
2017-09-14 04:35:47.334744 INFO Loading Module: /home/homeassistant/.homeassistant/apps/hello.py
2017-09-14 04:35:47.337512 INFO App initialization complete
2017-09-14 04:35:47.339156 INFO Starting dashboard
2017-09-14 04:35:47.347933 WARNING ------------------------------------------------------------
2017-09-14 04:35:47.348820 WARNING Unexpected error in dashboard thread
2017-09-14 04:35:47.349562 WARNING ------------------------------------------------------------
2017-09-14 04:35:47.354236 WARNING Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 399, in init
directory = directory.resolve()
File “/usr/lib/python3.4/pathlib.py”, line 1031, in resolve
s = self._flavour.resolve(self)
File “/usr/lib/python3.4/pathlib.py”, line 297, in resolve
return _resolve(base, str(path)) or sep
File “/usr/lib/python3.4/pathlib.py”, line 282, in _resolve
target = accessor.readlink(newpath)
File “/usr/lib/python3.4/pathlib.py”, line 374, in readlink
return os.readlink(path)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/homeassistant/.homeassistant/compiled/javascript’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 318, in run_dash
setup_routes(conf.dashboard_obj)
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 288, in setup_routes
app.router.add_static(’/compiled_javascript’, dashboard.compiled_javascript_dir)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 845, in add_static
follow_symlinks=follow_symlinks)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 404, in init
“No directory exists at ‘{}’”.format(directory)) from error
ValueError: No directory exists at ‘/home/homeassistant/.homeassistant/compiled/javascript’

2017-09-14 04:35:47.361541 WARNING ------------------------------------------------------------
2017-09-14 04:35:47.362642 INFO Starting API
2017-09-14 04:35:48.004389 INFO Connected to Home Assistant 0.53.0
2017-09-14 04:35:49.001872 WARNING Scheduler clock skew detected - delta = 1.0017499923706055 - resetting

this also is probably a fileright problem.

the user that is starting appdaemon needs to have write acces in the configuration directory and all beneath it.

Thanks ReneTode I ran a command sudo chmod 777 in /home/homeassistant/.homeassistant/complied and dashboard directory as I am new to RPi3 I dont know much about how to use linux much if you please explain how can I go further please!

@ReneTode After your reply I even tried sudo chmod 777 on the parent directory /home/homeassistant/.homeassistant/ but still not result

do you still get the same error?
does the compiled dir exist?
is there anything in it?
if so try to delete everything in it and restart.
do you have dashboards in your dashboard dir?
if yes what is in that dashboard?

yes same error and in he compliled dir… there is nothing… also in dashboard dir i made a file name Hello.dash as shown on the HADashboard configuration website and the dir name is “dashboards” not “dashboard”

@ReneTode This same error is coming…
sudo appdaemon -c /home/homeassistant/.homeassistant
2017-09-14 17:49:37.758090 INFO AppDaemon Version 2.1.9 starting
2017-09-14 17:49:37.758848 INFO Configuration read from: /home/homeassistant/.homeassistant/appdaemon.yaml
2017-09-14 17:49:38.351245 INFO Starting Apps
2017-09-14 17:49:38.801728 INFO Got initial state
2017-09-14 17:49:38.803255 INFO Loading Module: /home/homeassistant/.homeassistant/apps/hello.py
2017-09-14 17:49:38.805046 INFO App initialization complete
2017-09-14 17:49:38.806089 INFO Starting dashboard
2017-09-14 17:49:38.814613 WARNING ------------------------------------------------------------
2017-09-14 17:49:38.815279 WARNING Unexpected error in dashboard thread
2017-09-14 17:49:38.815773 WARNING ------------------------------------------------------------
2017-09-14 17:49:38.819990 WARNING Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 399, in init
directory = directory.resolve()
File “/usr/lib/python3.4/pathlib.py”, line 1031, in resolve
s = self._flavour.resolve(self)
File “/usr/lib/python3.4/pathlib.py”, line 297, in resolve
return _resolve(base, str(path)) or sep
File “/usr/lib/python3.4/pathlib.py”, line 282, in _resolve
target = accessor.readlink(newpath)
File “/usr/lib/python3.4/pathlib.py”, line 374, in readlink
return os.readlink(path)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/homeassistant/.homeassistant/compiled/javascript’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 318, in run_dash
setup_routes(conf.dashboard_obj)
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 288, in setup_routes
app.router.add_static(’/compiled_javascript’, dashboard.compiled_javascript_dir)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 845, in add_static
follow_symlinks=follow_symlinks)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 404, in init
“No directory exists at ‘{}’”.format(directory)) from error
ValueError: No directory exists at ‘/home/homeassistant/.homeassistant/compiled/javascript’

2017-09-14 17:49:38.820532 WARNING ------------------------------------------------------------
2017-09-14 17:49:38.820906 INFO Starting API
2017-09-14 17:49:39.184242 INFO Connected to Home Assistant 0.53.0
2017-09-14 17:49:40.001507 WARNING Scheduler clock skew detected - delta = 1.001384973526001 - resetting

This is my appdaemon.ymal file :

AppDaemon:
logfile: STDOUT
errorfile: STDERR
logsize: 100000
log_generations: 3
threads: 10
#cert_path: <path/to/root/CA/cert>
#cert_verify: True
time_zone: Asia/Kolkata
api_port: 5000
disable_apps: 0
#api_key: !secret api_key
#api_ssl_certificate: <path/to/root/CA/cert>
#api_ssl_key: <path/to/root/CA/key>
HASS:
ha_url: *********************** (For security cleared my web address)
ha_key: !secret HMA_Password

HADashboard:
dash_url: http://192.168.1.245:5000
dash_dir: /home/homeassistant/.homeassistant/dashboards
dash_force_compile: 1

i dont know if it will solve anything but at least you need to have 2 different ports for appdaemon API and dashboard.
you did set both to 5000 now, which will result in conflicts and 1 of the 2 cant work.

i got same error, i use “pi” user to install appdaemon,and dir is “/home/pi/appdaemon/”. i chmod this folder to 777,and still got error “no existed compiled folder”.

Can you post the exact error text please

2017-09-16 23:34:47.346767 INFO AppDaemon Version 2.1.10 starting
2017-09-16 23:34:47.347377 INFO Configuration read from: /home/pi/appdaemon/conf/appdaemon.yaml
2017-09-16 23:34:47.471432 INFO Starting Apps
2017-09-16 23:34:47.556736 INFO Got initial state
2017-09-16 23:34:47.557979 INFO Loading Module: /home/pi/appdaemon/conf/apps/hello.py
2017-09-16 23:34:47.560814 INFO Loading Object hello_world using class HelloWorld from module hello
2017-09-16 23:34:47.712687 INFO hello_world: Hello from AppDaemon
2017-09-16 23:34:47.715594 INFO hello_world: You are now ready to run Apps!
2017-09-16 23:34:47.716055 INFO App initialization complete
2017-09-16 23:34:47.716704 INFO Starting dashboard
2017-09-16 23:34:47.723908 WARNING ------------------------------------------------------------
2017-09-16 23:34:47.724533 WARNING Unexpected error in dashboard thread
2017-09-16 23:34:47.724885 WARNING ------------------------------------------------------------
2017-09-16 23:34:47.736202 WARNING Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 399, in init
directory = directory.resolve()
File “/usr/lib/python3.4/pathlib.py”, line 1031, in resolve
s = self._flavour.resolve(self)
File “/usr/lib/python3.4/pathlib.py”, line 297, in resolve
return _resolve(base, str(path)) or sep
File “/usr/lib/python3.4/pathlib.py”, line 282, in _resolve
target = accessor.readlink(newpath)
File “/usr/lib/python3.4/pathlib.py”, line 374, in readlink
return os.readlink(path)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/pi/appdaemon/conf/compiled’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 318, in run_dash
setup_routes(conf.dashboard_obj)
File “/usr/local/lib/python3.4/dist-packages/appdaemon/rundash.py”, line 288, in setup_routes
app.router.add_static(’/compiled_javascript’, dashboard.compiled_javascript_dir)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 845, in add_static
follow_symlinks=follow_symlinks)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 404, in init
“No directory exists at ‘{}’”.format(directory)) from error
ValueError: No directory exists at ‘/home/pi/appdaemon/conf/compiled/javascript’

2017-09-16 23:34:47.736771 WARNING ------------------------------------------------------------
2017-09-16 23:34:47.737144 INFO API is disabled
2017-09-16 23:34:47.747914 INFO Connected to Home Assistant 0.52.1

how did you install this appdaemon version?

I solved the problem. I used PI users to install appdaemon before, and always got the error. So I just used PI users to go to the /home/homeassistant directory, install appdaemon, and manually create compiled, JavaScript, CSS, three directories, and modify their permissions at the same time. Succeed!
But I think it’s still a problem, and many users who install Hassbian with raspberry and install appdaemon may have this problem, and still have to think about how to solve the problem.