From cac69d59798414887bceb72f9aeaab02ea4c916f Mon Sep 17 00:00:00 2001 From: nold Date: Thu, 1 Jun 2023 08:15:28 +0200 Subject: [PATCH] change(mqtt): add zigbee2mqtt & disable ZHA --- .../homeassistant/values/homeassistant.yaml | 2 +- projects/mqtt/project.yml | 7 +- projects/mqtt/values/zigbee2mqtt.yaml | 92 +++++++++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 projects/mqtt/values/zigbee2mqtt.yaml diff --git a/projects/homeassistant/values/homeassistant.yaml b/projects/homeassistant/values/homeassistant.yaml index 76ac5ef8..883e7ebb 100644 --- a/projects/homeassistant/values/homeassistant.yaml +++ b/projects/homeassistant/values/homeassistant.yaml @@ -80,7 +80,7 @@ persistence: hostPath: /dev/ttyUSB0 type: hostPath zigbee: - enabled: true + enabled: false hostPath: /dev/ttyUSB1 type: hostPath homegear-config: diff --git a/projects/mqtt/project.yml b/projects/mqtt/project.yml index da0dacaf..6ae8678a 100644 --- a/projects/mqtt/project.yml +++ b/projects/mqtt/project.yml @@ -1,8 +1,13 @@ config: - description: MQTT Broker + description: MQTT Broker & Zigbee Bridge apps: - name: mosquitto repo: bjw-s chart: app-template targetRevision: 1.5.0 + +- name: zigbee2mqtt + repo: bjw-s + chart: app-template + targetRevision: 1.5.0 diff --git a/projects/mqtt/values/zigbee2mqtt.yaml b/projects/mqtt/values/zigbee2mqtt.yaml new file mode 100644 index 00000000..f2b34eaa --- /dev/null +++ b/projects/mqtt/values/zigbee2mqtt.yaml @@ -0,0 +1,92 @@ +image: + repository: koenkk/zigbee2mqtt + tag: 1.30.4 + +service: + main: + type: ClusterIP + ports: + http: + enabled: true + port: 8080 + +ingress: + main: + enabled: true + annotations: + cert-manager.io/cluster-issuer: vault-issuer + hosts: + - host: zigbee.dc + paths: + - path: / + pathType: Prefix + tls: + - secretName: zigbee-tls + hosts: + - zigbee.dc + +env: + ZIGBEE2MQTT_DATA: /data + +configMaps: + config: + enabled: false + data: + configuration.yaml: | + permit_join: true + + mqtt: + base_topic: zigbee2mqtt + server: mqtt://mosquitto.mqtt.svc.cluster.local:1883 + include_device_information: true + + serial: + port: /dev/ttyUSB1 + + frontend: true + homeassistant: true + advanced: + network_key: GENERATE + log_output: + - console + log_level: info + homeassistant_discovery_topic: 'homeassistant' + homeassistant_status_topic: 'homeassistant/status' + +persistence: + data: + enabled: true + type: pvc + mountPath: /data + accessMode: ReadWriteOnce + readOnly: false + size: 10Gi + + config: + enabled: false + type: configMap + name: zigbee2mqtt-config + mountPath: /data/configuration.yaml + subPath: configuration.yaml + + usb: + enabled: true + type: hostPath + hostPath: /dev/ttyUSB1 + + runudev: + enabled: true + readOnly: true + type: hostPath + hostPath: /run/udev + +resources: + # limits: + # cpu: 100m + # memory: 64Mi + requests: + cpu: 10m + memory: 32Mi + +securityContext: + privileged: true