diff --git a/filter_v2_fan.yaml b/filter_v2_fan.yaml index dd0e58d..850b7a2 100644 --- a/filter_v2_fan.yaml +++ b/filter_v2_fan.yaml @@ -5,7 +5,7 @@ esphome: esp32: board: esp32-s3-devkitc-1 framework: - type: esp-idf + type: arduino version: latest logger: @@ -21,14 +21,9 @@ ota: wifi: networks: - - ssid: !secret wifi_ssid - password: !secret wifi_password - manual_ip: - static_ip: 192.168.1.60 - gateway: 192.168.1.254 - subnet: 255.255.255.0 - dns1: 9.9.9.9 - dns2: 149.112.112.112 + - ssid: !secret wifi_ssid4 + password: !secret wifi_password4 + power_save_mode: none ap: ssid: "Esp32S3N16R8 Fallback Hotspot" @@ -79,18 +74,17 @@ i2c: scl: 20 sda: 21 scan: true + frequency: 200000 Hz + +bme68x_bsec2_i2c: + i2c_id: bus_i2c + address: 0x77 + model: bme688 + operating_age: 28d + sample_rate: LP + supply_voltage: 3.3V sensor: -# ===== SGP40 Indoor Air Quality (VOC) ===== - - platform: sgp4x - voc: - name: "VOC Index" - i2c_id: bus_i2c - address: 0x59 - update_interval: 30s - compensation: - temperature_source: aht10_temperature - humidity_source: aht10_humidity # ===== PMS5003 PM2.5 Sensor ===== - platform: pmsx003 type: PMSX003 @@ -102,70 +96,63 @@ sensor: name: "PM <10.0µm Concentration" uart_id: uart_pms update_interval: 30s -# ===== AHT10 Temperature & Humidity ===== - - platform: aht10 +# ===== BME688 Indoor Air Quality ===== + - platform: bme68x_bsec2 temperature: - name: "AHT10 Temperature" - id: aht10_temperature - humidity: - name: "AHT10 Humidity" - id: aht10_humidity - address: 0x38 - i2c_id: bus_i2c - update_interval: 30s -# ===== BME680 Indoor Air Quality ===== - - platform: bme680 - temperature: - name: "BME680 Temperature" - oversampling: 16x + name: "BME688 Temperature" pressure: - name: "BME680 Pressure" + name: "BME688 Pressure" + id: bme688_pressure humidity: - id: "humidity" - name: "BME680 Humidity" - gas_resistance: - id: "gas_resistance" - name: "BME680 Gas Resistance" - address: 0x77 - i2c_id: bus_i2c + name: "BME688 Humidity" + iaq: + name: "BME688 IAQ" + id: iaq + co2_equivalent: + name: "BME688 CO2 Equivalent" + breath_voc_equivalent: + name: "BME688 Breath VOC Equivalent" +# ===== SDC41 CO2 ===== + - platform: scd4x + id: scd41 + measurement_mode: periodic + automatic_self_calibration: true update_interval: 60s - - platform: template - name: "BME680 Indoor Air Quality" - id: iaq - icon: "mdi:gauge" - # calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh] - lambda: |- - return log(id(gas_resistance).state) + 0.04 * id(humidity).state; - state_class: "measurement" + co2: + name: "SDC41 CO2" + temperature: + name: "SDC41 Temperature" + humidity: + name: "SDC41 Humidity" + ambient_pressure_compensation_source: bme688_pressure text_sensor: - platform: template - name: "BME680 IAQ Classification" - icon: "mdi:checkbox-marked-circle-outline" + name: "BME688 IAQ Classification" lambda: |- - if (int(id(iaq).state) <= 50) { + if ( int(id(iaq).state) <= 50) { return {"Excellent"}; } - else if (int(id(iaq).state) <= 100) { + else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) { return {"Good"}; } - else if (int(id(iaq).state) <= 150) { + else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) { return {"Lightly polluted"}; } - else if (int(id(iaq).state) <= 200) { + else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) { return {"Moderately polluted"}; } - else if (int(id(iaq).state) <= 250) { + else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) { return {"Heavily polluted"}; } - else if (int(id(iaq).state) <= 350) { + else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) { return {"Severely polluted"}; } - else if (int(id(iaq).state) <= 500) { + else if (int(id(iaq).state) >= 351) { return {"Extremely polluted"}; } else { - return {"unknown"}; + return {"error"}; } diff --git a/shutter.yaml b/shutter.yaml index 93306b7..cc97d24 100644 --- a/shutter.yaml +++ b/shutter.yaml @@ -29,8 +29,10 @@ ota: wifi: networks: - - ssid: !secret wifi_ssid3 - password: !secret wifi_password3 + - ssid: !secret wifi_ssid5 + password: !secret wifi_password4 + - ssid: !secret wifi_ssid4 + password: !secret wifi_password4 # Enable fallback hotspot (captive portal) in case wifi connection fails ap: