Hass: add config

This commit is contained in:
Bart Geesink 2023-07-29 16:13:47 +02:00
parent 6fa5a8940b
commit 4f6ee18495
13 changed files with 398 additions and 0 deletions

View File

@ -0,0 +1,154 @@
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
config:
rflink:
host: 192.168.86.129
port: 20000
#
light:
- platform: rflink
automatic_add: true
device_defaults:
fire_event: true
signal_repetitions: 5
devices:
newkaku_01a3770e_1:
name: schemerlamp
type: switchable
ansluta_6cf2_0:
name: boekenkast
type: hybrid
sensor:
- platform: rflink
automatic_add: true
- platform: saj
name: inverter
host: 10.111.222.145
- platform: greenchoice
name: meterstanden
password: ncc1701D
username: anitajurgens@hotmail.com
afvalbeheer:
wastecollector: ACV
resources:
- restafval
- gft
- papier
- pmd
postcode: 6707JB
streetnumber: 43
suffix: D # (optional)
upcomingsensor: 1 # (optional)
dateformat: '%d-%m-%Y' # (optional)
dateonly: 0 # (optional)
name: "" # (optional)
nameprefix: 1 # (optional)
builtiniconsnew: 1 # (optional)
dutch: 1
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
trusted_proxies:
- 10.0.0.0/8
- 192.168.86.0/24
base_url: https://home.geesink.org
use_x_forwarded_for: true
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
logger:
default: error
logs:
rflink: debug
homeassistant.components.rflink: debug
mqtt:
light:
- schema: json
name: Keuken spotjes
command_topic: "zigbee2mqtt/keuken_leds/set"
state_topic: "zigbee2mqtt/keuken_leds"
color_temp: true
brightness: true
- schema: json
name: Woonkamer spotjes
command_topic: "zigbee2mqtt/woonkamer_plafond/set"
state_topic: "zigbee2mqtt/woonkamer_plafond"
color_temp: true
brightness: true
sensor:
- name: "Shelly sensor state"
state_topic: "shellies/shellydw-FABA15/sensor/state"
- name: "Lux"
state_topic: "shellies/shellydw-FABA15/sensor/lux"
- name: "Shelly sensor battery"
state_topic: "shellies/shellydw-FABA15/sensor/battery"
unit_of_measurement: "%"
recorder:
purge_keep_days: 5
zone:
- name: Home
latitude: 51.972899
longitude: 5.671515
radius: 150
vacuum:
- platform: roomba
host: 192.168.86.104
username: 69F7410851041790
password: ':1:1578481444:ZUR9Ill9x9bqsY5e'
google_assistant:
project_id: thuis-assistant
shopping_list:
#binary_sensor:
# - platform: rflink
# devices:
# eurodomest_0556f1_06:
# name: Afstandsbediening A
# off_delay: 5
# force_update: true
# ev1527_0aa90e_08:
# name: Afstandsbediening B
# off_delay: 5
# force_update: true
#
#media_player:
# - platform: samsungtv_tizen
# host: 192.168.86.116
# port: 8002
# mac: 44:5C:E9:7B:F5:4A
nibe:
systems:
- system: "87950"
units:
- unit: 0
categories: True
- unit: 1
categories: True
sensors:
- indoor_temperature
- hot_water_temperature
webhook:
my:

70
hass/configuration.yml Normal file
View File

@ -0,0 +1,70 @@
default_config:
http:
trusted_proxies:
- "10.233.0.0/16"
use_x_forwarded_for: true
frontend:
themes: !include_dir_merge_named themes
tts:
- platform: google_translate
recorder:
db_url: mysql://hass:Ier9Xi6toaquah1ohto3@galera-mariadb-galera/hass?charset=utf8mb4
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rflink:
host: 192.168.86.128
port: 20000
#
light:
- platform: rflink
automatic_add: true
device_defaults:
fire_event: true
signal_repetitions: 5
devices:
newkaku_01a3770e_1:
name: schemerlamp
type: switchable
ansluta_6cf2_0:
name: boekenkast
type: hybrid
sensor:
- platform: rflink
automatic_add: true
- platform: saj
name: inverter
host: 10.111.222.145
mqtt:
light:
- schema: json
name: Keuken spotjes
command_topic: "zigbee2mqtt/keuken_leds/set"
state_topic: "zigbee2mqtt/keuken_leds"
color_temp: true
brightness: true
- schema: json
name: Woonkamer spotjes
command_topic: "zigbee2mqtt/woonkamer_plafond/set"
state_topic: "zigbee2mqtt/woonkamer_plafond"
color_temp: true
brightness: true
sensor:
- name: "Shelly sensor state"
state_topic: "shellies/shellydw-FABA15/sensor/state"
- name: "Lux"
state_topic: "shellies/shellydw-FABA15/sensor/lux"
- name: "Shelly sensor battery"
state_topic: "shellies/shellydw-FABA15/sensor/battery"
unit_of_measurement: "%"

25
hass/hassingress.yaml Normal file
View File

@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hassingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
haproxy.org/whitelist: "192.168.86.0/24,10.233.71.0/24"
spec:
ingressClassName: haproxy
rules:
- host: "home.geesink.org"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hasssvc
port:
number: 8123
tls:
-
secretName: hass-cert-prod
hosts:
- home.geesink.org

20
hass/hassingress2.yaml Normal file
View File

@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
haproxy.org/whitelist: "192.168.86.0/24,10.233.71.0/24"
spec:
ingressClassName: haproxy
rules:
- host: "test.geesink.org"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hasssvc
port:
number: 8123

28
hass/homeass.yml Normal file
View File

@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hass
labels:
app: hass
spec:
replicas: 1
selector:
matchLabels:
app: hass
template:
metadata:
labels:
app: hass
spec:
containers:
- name: hass
image: homeassistant/home-assistant:stable
ports:
- containerPort: 8123
volumeMounts:
- name: datadiskhass
mountPath: "/config"
volumes:
- name: datadiskhass
persistentVolumeClaim:
claimName: poddata

13
hass/old/hassingress.yaml Normal file
View File

@ -0,0 +1,13 @@
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: ingress-hass80
spec:
rules:
- host: home.geesink.org
http:
paths:
- path: /
backend:
serviceName: hass
servicePort: 8123

View File

@ -0,0 +1,14 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: hassingress80
spec:
entryPoints:
- web
routes:
- match: Host(`home.geesink.org`)
kind: Rule
services:
- name: hass
port: 8123

View File

@ -0,0 +1,15 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: hassingress443
spec:
entryPoints:
- websecure
routes:
- match: Host(`home.geesink.org`)
kind: Rule
services:
- name: hass
port: 8123
tls: # This route uses TLS
certResolver: myresolver

12
hass/old/pv.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs
spec:
capacity:
storage: 1Mi
accessModes:
- ReadWriteMany
nfs:
server: 192.168.86.86
path: "/volume1/nfs_k3s/hass/"

11
hass/old/pvc.yaml Normal file
View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1Mi

13
hass/old/servicehass.yml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: hass
spec:
selector:
app: hass
ports:
- name: hass
port: 8123
- name: udpnibe
port: 10090
protocol: UDP

10
hass/servicehass.yml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: hasssvc
spec:
selector:
app: hass
ports:
- name: hass
port: 8123

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: hasssvcudptraffic
spec:
type: LoadBalancer
loadBalancerIP: 10.86.0.108
selector:
app: hass
ports:
- name: udpnibe
port: 10090
protocol: UDP