mirror of
https://github.com/runyanjake/olomana.git
synced 2025-10-05 05:37:29 -07:00
Add homeassistant container
This commit is contained in:
parent
3bbfc7c199
commit
259436e9b2
2
homeassistant/.gitignore
vendored
Normal file
2
homeassistant/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
configuration.yaml
|
||||||
|
docker-compose.yml
|
39
homeassistant/README.md
Normal file
39
homeassistant/README.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Home Assistant
|
||||||
|
Home automation software.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
1. Run the container to set up the local filesystem.
|
||||||
|
2. Modify the created config file, in `config/configuration.yaml` to allow the traefik proxy, or generally everything on the local network. NOTE: Traefik breaks homeassistant, needs to be over local network for now.
|
||||||
|
```
|
||||||
|
# Configure HTTP settings
|
||||||
|
http:
|
||||||
|
use_x_forwarded_for: true
|
||||||
|
trusted_proxies:
|
||||||
|
- 192.168.96.0/24
|
||||||
|
```
|
||||||
|
Optionally, set the log level
|
||||||
|
```
|
||||||
|
# Configure logging
|
||||||
|
logger:
|
||||||
|
default: debug
|
||||||
|
logs:
|
||||||
|
homeassistant.core: debug
|
||||||
|
homeassistant.components: info
|
||||||
|
homeassistant.components.mqtt: debug
|
||||||
|
```
|
||||||
|
Note these snippets should go above the `automation` line.
|
||||||
|
`docker compose down && docker system prune -f && docker compose build && docker compose up -d && docker logs -f homeassistant`
|
||||||
|
|
||||||
|
### Home Assistant Setup
|
||||||
|
1. Set up devices/smart lights according to manufacturer instructions to get them on the local network.
|
||||||
|
2. Settings > Devices & Services > Add Integration
|
||||||
|
3. For my WiZ light, the automatic scan did not find it. I had to manually use nmap to find it on the network and enter the IP.
|
||||||
|
```
|
||||||
|
nmap -sn 192.168.1.xxx/24 (adjust for your local network)
|
||||||
|
```
|
||||||
|
|
||||||
|
## References
|
||||||
|
https://www.home-assistant.io/integrations/wiz/
|
||||||
|
|
25
homeassistant/configuration.yaml.blanked
Normal file
25
homeassistant/configuration.yaml.blanked
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
# Loads default set of integrations. Do not remove.
|
||||||
|
default_config:
|
||||||
|
|
||||||
|
# Load frontend themes from the themes folder
|
||||||
|
frontend:
|
||||||
|
themes: !include_dir_merge_named themes
|
||||||
|
|
||||||
|
# Configure HTTP settings
|
||||||
|
http:
|
||||||
|
use_x_forwarded_for: true
|
||||||
|
trusted_proxies:
|
||||||
|
- 192.168.x.xxx
|
||||||
|
|
||||||
|
# Configure logging
|
||||||
|
logger:
|
||||||
|
default: info
|
||||||
|
logs:
|
||||||
|
homeassistant.core: debug
|
||||||
|
homeassistant.components: info
|
||||||
|
homeassistant.components.mqtt: debug
|
||||||
|
|
||||||
|
automation: !include automations.yaml
|
||||||
|
script: !include scripts.yaml
|
||||||
|
scene: !include scenes.yaml
|
24
homeassistant/docker-compose.yml.blanked
Normal file
24
homeassistant/docker-compose.yml.blanked
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
homeassistant:
|
||||||
|
image: lscr.io/linuxserver/homeassistant:latest
|
||||||
|
container_name: homeassistant
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Etc/UTC
|
||||||
|
volumes:
|
||||||
|
- /path/to/config:/config
|
||||||
|
ports:
|
||||||
|
- 8123:8123
|
||||||
|
labels:
|
||||||
|
- traefik.http.routers.homeassistant.rule=Host(`SITE_URL`)
|
||||||
|
- traefik.http.routers.homeassistant.tls=true
|
||||||
|
- traefik.http.routers.homeassistant.tls.certresolver=lets-encrypt
|
||||||
|
- traefik.http.services.homeassistant.loadbalancer.server.port=8123
|
Loading…
x
Reference in New Issue
Block a user