Happy Saturday! Today is the first day of the HADasboard v2 Open Beta!
After a phenomenal amount of coding, and huge assistance from @ReneTode and @rpitera I am now ready to roll this out to a wider audience of testers. The goal of this stage of the Beta is functional: can you get it installed and configured, do things work, are you seeing the demo dash correctly, can you easily configure a basic dashboard. We have skins in place but at this time I would prefer they take a backseat for now - feel free to play, weâll get to skinning a little later in the Beta process once we are sure the basics are in place and working.
So, with that in mind I want to hear about any installation and configuration issues. I especially want to know about anything that happens that leaves you with a blank screen or a 500 response code. When that happens please be sure to capture the output from the logfile and provide information on what you were doing and also your configuration files to help me track down any issues.
Any and all questions are welcome on this thread and we will do our best to keep up.
Also, I am excited to see any screenshots of your dashboards as you get them up and running.
We donât yet have complete support for all the widgets and entity types, but I expect to add a lot more during the beta.
Feature requests are welcome but donât expect them to be acted on immediately - I maintain a list and will add your request and get to it when I have the cycles.
So, with that said, on to the fun part!
As beta testers I am recommending a slightly different install process to the one that might be familiar to existing AppDaemon usersâŚ
You need to get hold of the specific beta code instead of the existing released code, which is placed on a separate branch on GitHub called hadashboard_beta
. I suggest you put this in a completely different place from any existing AppDaemon installation - you can update that when HADashboard beta is over and I have moved it to the main repository.
Installation
Installation is normally either by pip3 or Docker. The Docker install is unchanged for the Beta, but for pip3 installers we will be running directly from the repository and not actually performing the pip install - this is to avoid overwriting any existing AppDaemon installs. Although for the Beta I am recommending a separate instance, ultimately it will all run together as a single install, and in fact, through the development process I have been running Beta code as my main install and it has worked fine, both Apps and Dashboards, however I suggest caution as this is still a beta.
Installation has been run through successfully on Ubuntu 16 and Raspbian. If you require any additional steps on different platforms please report back here so we can capture them and add to the docs.
Clone the Repository
For either method you will need to clone the AppDaemon repository to the current local directory on your machine. For the beta as suggested, make this a new directory so you donât overwrite your existing AppDaemon install, e.g. appdaemon_dashboard
.
$ cd <base path>
$ mkdir appdaemon_dashboard
$ cd appdaemon_dashboard
$ git clone -b hadashboard_beta https://github.com/home-assistant/appdaemon.git
Change your working directory to the repository root. Moving forward, we will be working from this directory.
$ cd appdaemon
Non Docker Install
Since we arenât doing a pip install we will need to manually install some modules that would normally be added vis pip:
$ pip3 install daemonize
$ pip3 install configparser
$ pip3 install astral
$ pip3 install 'requests>=2.6.0'
$ pip3 install sseclient
$ pip3 install websocket-client
$ pip3 install async
$ pip3 install 'aiohttp>=2.0.5'
$ pip3 install Jinja2==2.9.5
$ pip3 install aiohttp_jinja2
$ pip3 install pyScss
$ pip3 install pyyaml
$ pip3 install voluptuous
Docker Install
To build the Docker image run the following:
$ docker build -t appdaemon .
(Note the period at the end of the above command)
#Configuration
When you have appdaemon installed by either method, copy the conf/appdaemon.cfg.example
file to conf/appdaemon.cfg
, then edit the [AppDaemon]
section to reflect your environment:
[AppDaemon]
ha_url = <some_url>
ha_key = <some key>
logfile = STDOUT
errorfile = STDERR
threads = 10
cert_path = <path/to/root/CA/cert>
# Apps
[hello_world]
module = hello
class = HelloWorld
-
ha_url
is a reference to your home assistant installation and must include the correct port number and scheme (http://
orhttps://
as appropriate) -
ha_key
should be set to your key if you have one, otherwise it can be removed. -
logfile
(optional) is the path to where you wantAppDaemon
to keep its main log. When run from the command line this is not used - log messages come out on the terminal. When running as a daemon this is where the log information will go. In the example above I created a directory specifically for AppDaemon to run from, although there is no reason you canât keep it in theappdaemon
directory of the cloned repository. Iflogfile = STDOUT
, output will be sent to stdout instead of stderr when running in the foreground, if not specified, output will be sent to STDOUT. -
errorfile
(optional) is the name of the logfile for errors - this will usually be errors during compilation and execution of the apps. Iferrorfile = STDERR
errors will be sent to stderr instead of a file, if not specified, output will be sent to STDERR. -
threads
- the number of dedicated worker threads to create for running the apps. Note, this will bear no resembelance to the number of apps you have, the threads are re-used and only active for as long as required to tun a particular callback or initialization, leave this set to 10 unless you experience thread starvation -
cert_path
(optional) - path to root CA cert directory - use only if you are using self signed certs.
Optionally, you can place your apps in a directory other than under the config directory using the app_dir
directive.
e.g.:
app_dir = /etc/appdaemon/apps
When AppDaemon is configured you can run it from the command line directly against the repository with the following steps. Make sure you are still in the repository directory, e.g. appdaemon_dasboard/appdaemon
$ cd <base path>/appdaemon_dasboard/appdaemon
$ python3 -m appdaemon.appdaemon -c <path to configuration directory>
If all is well you should see something like:
2017-02-20 08:07:34.985296 INFO AppDaemon Version 2.0.0beta starting
2017-02-20 08:07:34.985685 INFO Apps are disabled
2017-02-20 08:07:40.141165 INFO Got initial state
2017-02-20 08:07:40.141522 INFO Starting dashboard
2017-02-20 08:07:40.156139 INFO Listening on ('192.168.1.20', 5050)
2017-02-20 08:07:40.158829 INFO Connected to Home Assistant 0.38.3
At this point you are ready to start configuring your dashboards - read DASHBOARD.md for full instructions on how to configure them.
For docker users, just follow the usual full install process. Docker support hasnât been extensively tested but is reported as working.
$ docker create --name appdaemon --restart always -p 5050:5050 -v /etc/localtime:/etc/localtime:ro -v [/local/conf]/folder:/conf appdaemon
$ docker start appdaemon
$ docker logs -f appdaemon
For Docker on Raspberry PI, follow @quadportnickâs steps here.
When you need to update to a new version of the code, just simply run:
$ git pull origin
Then restart from the command line without running the pip install.
Thatâs it for now - lets see who can be the first to get a new dash up and running - pics or it didnât happen!