Newbie problems

Started with hassbian on RPi3. System works, so I wanted some functional dashboard. Now fighting with installation of HD1 or HD2 beta. No success. It’s third hour. HD2 beta stopped me here:

    pi@hassbian:~/appdaemon_dashboard/appdaemon $ python3 -m appdaemon.appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdaemon.py", line 1671, in <module>
    main()
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdaemon.py", line 1450, in main
    conf.threads = int(config['AppDaemon'].get('threads'))
TypeError: int() argument must be a string or a number, not 'NoneType'

Now returned to install HD 1. Command sudo docker build -f Docker-raspi/Dockerfile -t hadashboard . in progress.

Documentation for people like me: new in HA is more than poor :frowning:

Since you’re using Docker for v1, were you trying to use it for v2?

I’m working on mods and a tutorial for inclusion in v2. I haven’t added the pi support yet so you’ll have to build the Docker yourself for now (edit the top of Dockerfile first) and change the image refs in the tutorial. Make sure you pull from the hadashboard_beta branch:

1 Like

Thanks man! Beta working perfect :slight_smile:

1 Like

Sweet! Can I ask what steps you did, just for posterity reasons? I assumed based on the first post you’re working on a Pi.

I cloned from your link, but there is no dashboard inside, so cloned from Beta thread. Complete cfg:

[AppDaemon]
ha_url = http://192.168.0.104:8123
ha_key = 
logfile = STDOUT
errorfile = STDERR
dash_url = http://192.168.0.104:5050
app_dir = /home/pi/appdaemon_dashboard/appdaemon/conf/apps
threads = 10
disable_apps = 1

After that started daemon from appdaemon folder:

appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf/appdaemon.cfg

Starting with suggested line, prints errors:

$ appdaemon -c conf
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 9, in <module>
    load_entry_point('appdaemon==1.5.2', 'console_scripts', 'appdaemon')()
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py", line 1549, in main
    config.read_file(open(config_file))
IsADirectoryError: [Errno 21] Is a directory: 'conf'

Now working on autostart. And question about paths - I haven’t “/usr/local/bin/appdaemon” folder so used: APPDAEMON_DIR=/home/pi/appdaemon and DAEMON=???

Ahhh. I assumed you’d be running the Docker steps, so in that case it probably makes more sense to keep pulling from the official repo and engage in the beta 3 thread. the appdaemon -c stuff should be the conf dir and not the config file though.

$ appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf/
Traceback (most recent call last):
File “/usr/local/bin/appdaemon”, line 9, in
load_entry_point(‘appdaemon==1.5.2’, ‘console_scripts’, ‘appdaemon’)()
File “/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py”, line 1549, in main
config.read_file(open(config_file))
IsADirectoryError: [Errno 21] Is a directory: ‘/home/pi/appdaemon_dashboard/appdaemon/conf/’

Try removing the trailing /? I’m not sure. I dont use one in the Docker build though.

As You described here: Announcement: HADashboard v2 Beta!

I modified files and now run in that way (still errors):

$ python3 -m appdaemon.appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf
2017-04-10 18:36:24.354347 INFO AppDaemon Version 2.0.0beta3.5 starting
2017-04-10 18:36:24.354863 INFO Apps are disabled
2017-04-10 18:36:29.584247 INFO Got initial state
2017-04-10 18:36:29.584713 INFO Starting dashboard
2017-04-10 18:36:29.597603 WARNING ------------------------------------------------------------
2017-04-10 18:36:29.598133 WARNING Unexpected error in dashboard thread
2017-04-10 18:36:29.598463 WARNING ------------------------------------------------------------
2017-04-10 18:36:29.602692 WARNING Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/base_events.py", line 757, in create_server
    sock.bind(sa)
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdash.py", line 254, in run_dash
    srv = loop.run_until_complete(f)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 276, in run_until_complete
    return future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
    result = coro.send(value)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 761, in create_server
    % (sa, err.strerror.lower()))
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 5050): address already in use

2017-04-10 18:36:29.603171 WARNING ------------------------------------------------------------
2017-04-10 18:36:29.614006 INFO Connected to Home Assistant 0.41.0

OK, got it working after reboot :slight_smile: Thanks!

1 Like