RPI3 Docker AppDaemon/HADashboard issues

Following this guideline for getting HADashboard running wiht Docker on a RPI 3

Getting this in the docker logs repeated over and over. Double check appdaemon.cfg , any ideas.

TypeError: int() argument must be a string, a bytes-like object or a number, not ‘NoneType’
/usr/bin/entry.sh: line 93: fg: job has terminated
Traceback (most recent call last):
File “/usr/local/bin/appdaemon”, line 11, in
load_entry_point(‘appdaemon===2.0.0beta3.5’, ‘console_scripts’, ‘appdaemon’)()
File “/usr/src/app/appdaemon/appdaemon.py”, line 1450, in main
conf.threads = int(config[‘AppDaemon’].get(‘threads’))
TypeError: int() argument must be a string, a bytes-like object or a number, not ‘NoneType’
/usr/bin/entry.sh: line 93: fg: job has terminated
Terminated

Can you post that appdaemon.cfg?

Must admit I haven’t tried 3.5 yet

Here you go

my cfg file is in /home/pi/appdaemon_dashboard/appdaemon/conf

my docker build is
sudo docker create --name appdaemon_dashboard --restart always -p 5050:5050 -v /etc/localtime:/etc/localtime:ro -v /home/pi/appdaemon_dashboard/appdaemon/conf:/conf appdaemon_dashboard

appdaemon.cfg
[AppDaemon]
ha_url = https://xxxxx.duckdns.org
ha_key = xxxxxxxx
logfile = STDOUT
errorfile = STDERR
dash_url = http://192.168.7.xx:5050
app_dir = /home/pi/appdaemon_dashboard/appdaemon/conf/apps
dash_dir = /home/pi/appdaemon_dashboard/appdaemon/conf/dashboards

Apps

[hello_world]
module = hello
class = HelloWorld

app_dir and dash_dir are wrong as they are the paths on the host, not within the Docker container

I would omit them anyhow, as you still have them under conf. That is the default behavior and doesn’t need to be altered.

That did not seem to help. Took out both of those lines and restarted the container.

Is my docker build right. I get confused as to what the path of the conf needs to be

You need a threads entry in your [AppDaemon] section

Mine is

threads = 10
1 Like

Duh, that was it, thanks for the help.

Good catch! Makes sense why it was an int error.

The build seems fine. You want to use /conf in the container, per your -v command, the stuff on the left is what it is on your host and the stuff on the right is that same location inside the container. So /conf/apps would be needed from the perspective of the inside

The Appdaemon startup inside Docker always points to /conf so you don’t need to override the behavior.

It’s revelant if you want to write apps that for some reason need to touch the file system, which wouldn’t be relevant for dashboards.

Thanks man! I am docker newbie so that helps.