Add Home Assistant

This commit is contained in:
Sam Maes 2019-07-23 20:07:40 +00:00
parent a25b52b850
commit c680dbcb06
7 changed files with 53 additions and 1 deletions

View file

@ -41,6 +41,7 @@ Ansible config and a bunch of Docker containers.
* [Grafana](https://github.com/grafana/grafana) - Dashboarding tool * [Grafana](https://github.com/grafana/grafana) - Dashboarding tool
* [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH * [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH
* [Heimdall](https://heimdall.site/) - Home server dashboard * [Heimdall](https://heimdall.site/) - Home server dashboard
* [Home Assistant](https://www.home-assistant.io) - Open source home automation
* [InfluxDB](https://github.com/influxdata/influxdb) - Time series database used for stats collection * [InfluxDB](https://github.com/influxdata/influxdb) - Time series database used for stats collection
* [Jackett](https://github.com/Jackett/Jackett) - API Support for your favorite torrent trackers * [Jackett](https://github.com/Jackett/Jackett) - API Support for your favorite torrent trackers
* [MiniDlna](https://sourceforge.net/projects/minidlna/) - simple media server which is fully compliant with DLNA/UPnP-AV clients * [MiniDlna](https://sourceforge.net/projects/minidlna/) - simple media server which is fully compliant with DLNA/UPnP-AV clients

View file

@ -0,0 +1,12 @@
# Home Assistant
Homepage: [https://www.home-assistant.io/](https://www.home-assistant.io/)
## Usage
Set `homeassistant_enabled: true` in your `group_vars/all.yml` file.
If you want to access Home Assistant externally, don't forget to set `homeassistant_available_externally: "true"` in your `group_vars/all.yml` file.
The Home Assistant web interface can be found at http://ansible_nas_host_or_ip:8123.

View file

@ -18,6 +18,7 @@ By default, applications can be found on the ports listed below.
| Grafana | 3000 | | | Grafana | 3000 | |
| Guacamole | 8090 | | | Guacamole | 8090 | |
| Heimdall | 10080 | | | Heimdall | 10080 | |
| Home Assistant | 8123 | |
| Jackett | 9117 | | | Jackett | 9117 | |
| MiniDLNA | 8201 | | | MiniDLNA | 8201 | |
| Miniflux | 8070 | | | Miniflux | 8070 | |

View file

@ -74,7 +74,8 @@ firefly_enabled: false
# Wallabag # Wallabag
wallabag_enabled: false wallabag_enabled: false
# MQTT # Home Automation
homeassistant_enabled: true
mosquitto_enabled: false mosquitto_enabled: false
### ###
@ -568,7 +569,14 @@ nzbget_group_id: 0
wallabag_available_externally: "false" wallabag_available_externally: "false"
wallabag_data_directory: "{{ docker_home }}/wallabag" wallabag_data_directory: "{{ docker_home }}/wallabag"
###
### Mosquitto ### Mosquitto
### ###
mosquitto_available_externally: "false" mosquitto_available_externally: "false"
mosquitto_data_directory: "{{ docker_home }}/mosquitto" mosquitto_data_directory: "{{ docker_home }}/mosquitto"
###
### Home Assistant
###
homeassistant_available_externally: "false"
homeassistant_data_directory: "{{ docker_home }}/homeassistant"

View file

@ -171,3 +171,7 @@
- import_tasks: tasks/mosquitto.yml - import_tasks: tasks/mosquitto.yml
when: (mosquitto_enabled | default(False)) when: (mosquitto_enabled | default(False))
tags: mosquitto tags: mosquitto
- import_tasks: tasks/homeassistant.yml
when: (homeassistant_enabled | default(False))
tags: homeassistant

25
tasks/homeassistant.yml Normal file
View file

@ -0,0 +1,25 @@
- name: Create Home Assistant Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ homeassistant_data_directory }}/config"
- name: Home Assistant Docker Container
docker_container:
name: homeassistant
image: homeassistant/home-assistant
pull: true
volumes:
- "{{ homeassistant_data_directory }}/config:/config:rw"
ports:
- "8123:8123"
network_mode: "host"
restart_policy: unless-stopped
labels:
traefik.backend: "homeassistant"
traefik.frontend.rule: "Host:homeassistant.{{ ansible_nas_domain }}"
traefik.enable: "{{ homeassistant_available_externally }}"
traefik.port: "80"
traefik.frontend.headers.SSLRedirect: "true"
memory: 1g

View file

@ -190,6 +190,7 @@ onDemand = false # create certificate when container is created
"grafana.{{ ansible_nas_domain }}", "grafana.{{ ansible_nas_domain }}",
"guacamole.{{ ansible_nas_domain }}", "guacamole.{{ ansible_nas_domain }}",
"heimdall.{{ ansible_nas_domain }}", "heimdall.{{ ansible_nas_domain }}",
"homeassistant.{{ ansible_nas_domain }}",
"jackett.{{ ansible_nas_domain }}", "jackett.{{ ansible_nas_domain }}",
"miniflux.{{ ansible_nas_domain }}", "miniflux.{{ ansible_nas_domain }}",
"netdata.{{ ansible_nas_domain }}", "netdata.{{ ansible_nas_domain }}",