From 4f6ee18495042553614529586a6829732ffd378c Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Sat, 29 Jul 2023 16:13:47 +0200 Subject: [PATCH] Hass: add config --- hass/configuration.yaml.backup | 154 +++++++++++++++++++++++++++++++ hass/configuration.yml | 70 ++++++++++++++ hass/hassingress.yaml | 25 +++++ hass/hassingress2.yaml | 20 ++++ hass/homeass.yml | 28 ++++++ hass/old/hassingress.yaml | 13 +++ hass/old/hassingressroute.yml | 14 +++ hass/old/hassingresssecure.yaml | 15 +++ hass/old/pv.yaml | 12 +++ hass/old/pvc.yaml | 11 +++ hass/old/servicehass.yml | 13 +++ hass/servicehass.yml | 10 ++ hass/servicehassloadbalancer.yml | 13 +++ 13 files changed, 398 insertions(+) create mode 100644 hass/configuration.yaml.backup create mode 100644 hass/configuration.yml create mode 100644 hass/hassingress.yaml create mode 100644 hass/hassingress2.yaml create mode 100644 hass/homeass.yml create mode 100644 hass/old/hassingress.yaml create mode 100644 hass/old/hassingressroute.yml create mode 100644 hass/old/hassingresssecure.yaml create mode 100644 hass/old/pv.yaml create mode 100644 hass/old/pvc.yaml create mode 100644 hass/old/servicehass.yml create mode 100644 hass/servicehass.yml create mode 100644 hass/servicehassloadbalancer.yml diff --git a/hass/configuration.yaml.backup b/hass/configuration.yaml.backup new file mode 100644 index 0000000..781f897 --- /dev/null +++ b/hass/configuration.yaml.backup @@ -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: diff --git a/hass/configuration.yml b/hass/configuration.yml new file mode 100644 index 0000000..ff33fd2 --- /dev/null +++ b/hass/configuration.yml @@ -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: "%" + diff --git a/hass/hassingress.yaml b/hass/hassingress.yaml new file mode 100644 index 0000000..299bd8e --- /dev/null +++ b/hass/hassingress.yaml @@ -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 diff --git a/hass/hassingress2.yaml b/hass/hassingress2.yaml new file mode 100644 index 0000000..c3c8e3b --- /dev/null +++ b/hass/hassingress2.yaml @@ -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 diff --git a/hass/homeass.yml b/hass/homeass.yml new file mode 100644 index 0000000..7b723b9 --- /dev/null +++ b/hass/homeass.yml @@ -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 diff --git a/hass/old/hassingress.yaml b/hass/old/hassingress.yaml new file mode 100644 index 0000000..73b0bb5 --- /dev/null +++ b/hass/old/hassingress.yaml @@ -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 diff --git a/hass/old/hassingressroute.yml b/hass/old/hassingressroute.yml new file mode 100644 index 0000000..b3a46bb --- /dev/null +++ b/hass/old/hassingressroute.yml @@ -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 diff --git a/hass/old/hassingresssecure.yaml b/hass/old/hassingresssecure.yaml new file mode 100644 index 0000000..9f952a1 --- /dev/null +++ b/hass/old/hassingresssecure.yaml @@ -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 diff --git a/hass/old/pv.yaml b/hass/old/pv.yaml new file mode 100644 index 0000000..4d56994 --- /dev/null +++ b/hass/old/pv.yaml @@ -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/" diff --git a/hass/old/pvc.yaml b/hass/old/pvc.yaml new file mode 100644 index 0000000..c81a82c --- /dev/null +++ b/hass/old/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: nfs +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 1Mi diff --git a/hass/old/servicehass.yml b/hass/old/servicehass.yml new file mode 100644 index 0000000..b3ac09a --- /dev/null +++ b/hass/old/servicehass.yml @@ -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 diff --git a/hass/servicehass.yml b/hass/servicehass.yml new file mode 100644 index 0000000..85102f2 --- /dev/null +++ b/hass/servicehass.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: hasssvc +spec: + selector: + app: hass + ports: + - name: hass + port: 8123 diff --git a/hass/servicehassloadbalancer.yml b/hass/servicehassloadbalancer.yml new file mode 100644 index 0000000..ead9d78 --- /dev/null +++ b/hass/servicehassloadbalancer.yml @@ -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