Home Assistant is an open source home automation software that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.
Install the package.
Configuration files are stored at
/var/lib/hass/. If no configuration exists, a default configuration will be written at startup.
To start Home Assistant, start/enable
The first start may take up to 20 minutes because the required packages will be downloaded and installed. You can see the progress in the logs.
# journalctl -fu home-assistant
By default, the web interface is available at http://localhost:8123.
By default, SQLite is used for the recorder/history integration within Home Assistant. A noticeable performance boost is achievable by using MariaDB (especially for larger setups). Home assistant uses SQLAlchemy which means that any backend is supported, like MySQL, MariaDB, PostgreSQL, or MS SQL Server. Here we only discuss MariaDb, for others please refer to the recorder integration documentation.
If not already installed, please refer to MariaDB for installation details.
Install the package dependency.
Create a new database, the example below shows a single username per service, with wildcard access to all databases having the username as a prefix e.g.:
$ mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'some_pass' ; CREATE DATABASE username; GRANT ALL PRIVILEGES ON username.* TO 'username'@'localhost'; FLUSH PRIVILEGES; quit;
Add to your configuration file:
recorder: db_url: !secret recorder_mariadb_url
Add to your secrets file (if not using a Unix socket, see the recorder integration documentation for alternative URLs):