This commit is contained in:
28
README.md
28
README.md
@@ -1,8 +1,8 @@
|
|||||||
# Home Assistant
|
# Home Assistant
|
||||||
|
|
||||||
Welcome to my Home Assistant setup repository.
|
Welcome to my Home Assistant setup repository.
|
||||||
This repository documents and maintains the Home Assistant instance running in my home, hosted on homesrv01/casa server.
|
This repository documents and maintains the Home Assistant instance running in my home, hosted on casa server k3s cluster.
|
||||||
All essential Docker containers, such as MQTT and speech recognition, are hosted on the same server for seamless integration.
|
All essential containers, such as MQTT and speech recognition, are hosted on the same server for seamless integration.
|
||||||
|
|
||||||
<!-- omit in toc -->
|
<!-- omit in toc -->
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
@@ -30,10 +30,6 @@ All essential Docker containers, such as MQTT and speech recognition, are hosted
|
|||||||
- [Time \& Date](#time--date)
|
- [Time \& Date](#time--date)
|
||||||
- [Xbox](#xbox)
|
- [Xbox](#xbox)
|
||||||
- [Setup](#setup)
|
- [Setup](#setup)
|
||||||
- [Deploy and Updates](#deploy-and-updates)
|
|
||||||
- [Docker Volumes](#docker-volumes)
|
|
||||||
- [`has_config`](#has_config)
|
|
||||||
- [Development Environment](#development-environment)
|
|
||||||
|
|
||||||
## Devices
|
## Devices
|
||||||
|
|
||||||
@@ -259,23 +255,5 @@ Home Assistant authenticates with Xbox Live through OAuth2 using the Home Assist
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
[Docker Compose file](./docker-compose.yaml).
|
[Check folder setup](./setup).
|
||||||
|
|
||||||
### Deploy and Updates
|
|
||||||
|
|
||||||
[Git Action workflow](./.gitea/workflows/deploy.yml)
|
|
||||||
|
|
||||||
- Automatically pull the latest Docker images daily.
|
|
||||||
- Execute `docker-compose up` to ensure the environment remains up-to-date and operational.
|
|
||||||
|
|
||||||
### Docker Volumes
|
|
||||||
|
|
||||||
#### `has_config`
|
|
||||||
|
|
||||||
The `has_config` volume stores the Home Assistant configuration files. For more details, refer to the [Home Assistant configuration repository](/marcio.fernandes/homeassistant.config).
|
|
||||||
|
|
||||||
## Development Environment
|
|
||||||
|
|
||||||
Development and maintenance tasks are performed using Visual Studio Code.
|
|
||||||
|
|
||||||
The Docker context is set to the host [homesrv01.dev.lan](/marcio.fernandes/homesrv01.dev.lan) for seamless integration and management.
|
|
||||||
|
|||||||
13
deploy/home-assistant-config-pvc.yaml
Normal file
13
deploy/home-assistant-config-pvc.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-config
|
||||||
|
namespace: home-assistant
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Gi
|
||||||
|
storageClassName: local-path
|
||||||
|
|
||||||
39
deploy/home-assistant-deployment.yaml
Normal file
39
deploy/home-assistant-deployment.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: home-assistant
|
||||||
|
labels:
|
||||||
|
app: home-assistant
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: home-assistant
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: home-assistant
|
||||||
|
spec:
|
||||||
|
hostNetwork: true
|
||||||
|
containers:
|
||||||
|
- name: home-assistant
|
||||||
|
image: "homeassistant/home-assistant"
|
||||||
|
volumeMounts:
|
||||||
|
- name: home-assistant-config
|
||||||
|
mountPath: /config
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "400m"
|
||||||
|
limits:
|
||||||
|
memory: "700Mi"
|
||||||
|
cpu: "1000m"
|
||||||
|
volumes:
|
||||||
|
- name: home-assistant-config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName : home-assistant-config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
23
deploy/home-assistant-external-service.yaml
Normal file
23
deploy/home-assistant-external-service.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-external
|
||||||
|
namespace: home-assistant
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- port: 8123
|
||||||
|
protocol: TCP
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-external
|
||||||
|
namespace: home-assistant
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.14.9 # Replace with your actual external IP
|
||||||
|
ports:
|
||||||
|
- port: 8123
|
||||||
22
deploy/home-assistant-ingress.yaml
Normal file
22
deploy/home-assistant-ingress.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: home-assistant
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`casa.limbosolutions.com`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: home-assistant-external
|
||||||
|
port: 8123
|
||||||
|
- match: Host(`has.casa.limbosolutions.com`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: home-assistant-external
|
||||||
|
port: 8123
|
||||||
|
tls:
|
||||||
|
secretName: casa-limbosolutions-com-tls
|
||||||
4
deploy/home-assistant-namespace.yaml
Normal file
4
deploy/home-assistant-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
services:
|
|
||||||
app:
|
|
||||||
container_name: homeassistant-app
|
|
||||||
image: "homeassistant/home-assistant"
|
|
||||||
volumes:
|
|
||||||
- app_config:/config
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
has:
|
|
||||||
reverseproxy_public:
|
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
- 5683:5683/udp # SELLY INTEGRATION
|
|
||||||
#devices:
|
|
||||||
#- /dev/ttyUSB0:/dev/ttyUSB0 #zigbee
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
app_config:
|
|
||||||
name: has_app_config
|
|
||||||
external: true
|
|
||||||
|
|
||||||
networks:
|
|
||||||
has:
|
|
||||||
reverseproxy_public:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user