From d299913a3cd8b0e4cb4c5df8a0fea73e97732ff4 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Sun, 9 Apr 2023 16:46:59 +0200 Subject: [PATCH] add esphome data --- esphome/.gitignore | 10 +++++ esphome/pvvx.yaml | 10 +++++ esphome/secrets.yaml.age | 11 +++++ esphome/werkkamer.yaml | 69 ++++++++++++++++++++++++++++++++ esphome/werkkamer/partitions.csv | 6 +++ 5 files changed, 106 insertions(+) create mode 100644 esphome/.gitignore create mode 100644 esphome/pvvx.yaml create mode 100644 esphome/secrets.yaml.age create mode 100644 esphome/werkkamer.yaml create mode 100644 esphome/werkkamer/partitions.csv diff --git a/esphome/.gitignore b/esphome/.gitignore new file mode 100644 index 0000000..0bbf89c --- /dev/null +++ b/esphome/.gitignore @@ -0,0 +1,10 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +**/.pioenvs/ +**/.piolibdeps/ +**/lib/ +**/src/ +**/platformio.ini +/secrets.yaml diff --git a/esphome/pvvx.yaml b/esphome/pvvx.yaml new file mode 100644 index 0000000..1758d9e --- /dev/null +++ b/esphome/pvvx.yaml @@ -0,0 +1,10 @@ +platform: pvvx_mithermometer +mac_address: ${mac} +temperature: + name: "${name} temperature" +humidity: + name: "${name} humidity" +battery_level: + name: "${name} Battery-Level" +battery_voltage: + name: "${name} Battery-Voltage" diff --git a/esphome/secrets.yaml.age b/esphome/secrets.yaml.age new file mode 100644 index 0000000..cb8c8cd --- /dev/null +++ b/esphome/secrets.yaml.age @@ -0,0 +1,11 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvMXJHdFNZNVpBbHo4c0J6 +cnlONGYyMlhLNG9yMTN4azgvWWFIQlJXMTJnCldmTlppNlY1KzVma2tLNS9XRW80 +a04zaStaODZhU1JNREtpTWJobC9iRGcKLS0tIGkreVJLOVY5Z01WOXRwc0hKZUFU +V3FFU0pSVE1VU2JBZ3RFcElUemFuS2MK3mAi5/6HU+TfA9vaTWpB5pZPGw+F5Enq +iuCQKK6I5SCjoFfjOglTwte/2CqbNwgECV+TsDiAZDqSVBohW9eyxe8m9g2ioYLw +4wfiGo3j99ITNss6bNeisdhV5qsZW3o7RDxeTv3U03Tj102Q9ciY31Q7hzvQmZ3Z +280GrkxUdrwGe7JlWRDvqlmKZdOmi2GRQJ7KTkNIJSSIvv1rzQ3sWTenvUJAljul +LtzTkxV8SCOfVWeqZMvi1aBrc2r2rkE/a/TRqVBb7wFrvN7Uh1ZTst71tLG7EsyQ +qrncLc63Y8XgHQ3kdNE= +-----END AGE ENCRYPTED FILE----- diff --git a/esphome/werkkamer.yaml b/esphome/werkkamer.yaml new file mode 100644 index 0000000..8dcdfba --- /dev/null +++ b/esphome/werkkamer.yaml @@ -0,0 +1,69 @@ +substitutions: + devicename: werkkamer + +esphome: + name: ${devicename} + platform: ESP32 + board: nodemcu-32s + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "${devicename} Fallback Hotspot" + password: !secret fallback_password + +captive_portal: +web_server: +prometheus: +esp32_ble_tracker: +uart: + - rx_pin: GPIO16 + tx_pin: GPIO17 + baud_rate: 9600 +sensor: + - <<: !include + file: pvvx.yaml + vars: + mac: "A4:C1:38:70:C4:53" + name: "werkkamer" + - <<: !include + file: pvvx.yaml + vars: + name: "larswerk" + mac: "A4:C1:38:89:D8:C2" + - <<: !include + file: pvvx.yaml + vars: + name: "zolder" + mac: "A4:C1:38:F6:5C:72" + - platform: ble_rssi + mac_address: "E4:A8:DB:C1:F5:B9" + name: "Yoricks watch" + - platform: mhz19 + co2: + name: "MH-Z19 CO2 Value" + temperature: + name: "MH-Z19 Temperature" + update_interval: 60s + automatic_baseline_calibration: false + id: mhz_19 + # woonkamer: A4:C1:38:2B:03:1F (not enough power) + +api: + services: + - service: mhz19_calibrate_zero + then: + - mhz19.calibrate_zero: mhz_19 +# Enable logging +logger: +# Enable Home Assistant API +# api: +mqtt: + broker: 192.168.2.127 + username: !secret mqtt_username + password: !secret mqtt_password + +ota: diff --git a/esphome/werkkamer/partitions.csv b/esphome/werkkamer/partitions.csv new file mode 100644 index 0000000..f846601 --- /dev/null +++ b/esphome/werkkamer/partitions.csv @@ -0,0 +1,6 @@ +nvs, data, nvs, 0x009000, 0x005000, +otadata, data, ota, 0x00e000, 0x002000, +app0, app, ota_0, 0x010000, 0x1C0000, +app1, app, ota_1, 0x1D0000, 0x1C0000, +eeprom, data, 0x99, 0x390000, 0x001000, +spiffs, data, spiffs, 0x391000, 0x00F000