Home Assistant: Difference between revisions

imported>Mweinelt
Describe how to use a recent home assistant version from unstable
imported>Mweinelt
Reorder
Line 31: Line 31:
</syntaxHighlight>
</syntaxHighlight>


= Home Assistant with nginx as a reverse proxy =
= Snippets =
 
== Reverse Proxying with nginx ==


If you run a public Home Assistant instance it is a good idea to enable SSL/TLS.
If you run a public Home Assistant instance it is a good idea to enable SSL/TLS.
Line 60: Line 62:
</syntaxHighlight>
</syntaxHighlight>


= Adding postgresql support =
== Using PostgreSQL ==


Home Assistant supports PostgreSQL as a database backend for, among other things, its logger and history components. It's a lot more scalable and typically provides faster response times than the SQLite database, that is used by default.
Home Assistant supports PostgreSQL as a database backend for, among other things, its logger and history components. It's a lot more scalable and typically provides faster response times than the SQLite database, that is used by default.
Line 86: Line 88:
</syntaxHighlight>
</syntaxHighlight>


= Run Home Assistant from GitHub repository =


When developing Home Assistant for some test dependencies additional libraries are needed.
== Add custom lovelace modules ==
A nix-shell expression for this is available [https://github.com/nix-community/nix-environments here].
 
= Add custom lovelace modules =


This [https://github.com/NixOS/nixpkgs/pull/89136 pull request] describes how to add custom lovelace modules.
This [https://github.com/NixOS/nixpkgs/pull/89136 pull request] describes how to add custom lovelace modules.


= Add custom components =
== Add custom components ==


In order to install a custom component, you have to place it in <code>/var/lib/hass/custom_components</code>. This can be achieved using systemd tmpfiles like so (for sonoff custom component):
In order to install a custom component, you have to place it in <code>/var/lib/hass/custom_components</code>. This can be achieved using systemd tmpfiles like so (for sonoff custom component):
Line 106: Line 104:
</syntaxHighlight>
</syntaxHighlight>


== Example configurations ==
= Example configurations =


- [https://github.com/Mic92/dotfiles/tree/master/nixos/eve/modules/home-assistant Mic92's config]
- [https://github.com/Mic92/dotfiles/tree/master/nixos/eve/modules/home-assistant Mic92's config]


- [https://github.com/balsoft/nixos-config/blob/master/modules/servers/home-assistant.nix Balsoft's config]
- [https://github.com/balsoft/nixos-config/blob/master/modules/servers/home-assistant.nix Balsoft's config]
= Misc =
== Run Home Assistant from GitHub repository ==
When developing Home Assistant for some test dependencies additional libraries are needed.
A nix-shell expression for this is available [https://github.com/nix-community/nix-environments here].