🇩🇪 · C3D2 · max
Datum Ort bis Dienstag, 30. Juni 2026 um 19:00 Uhr 21:00 Uhr , /proc, Zentralwerk, Riesaer Straße 32, 01127 Dresden HQ Wir wollen uns Treffen und über Home-Assistant, ESPHome, Zigbee, ESP32, MQTT, Thread, Matter etc. und deren Integration miteinander, aber auch Home Automation im allgemeinen sprechen und uns über verschiedene Lösungen, Produkte und Automatisierungen austauschen. Zwischen den Treffen chatten wir oft in einen Matrix-Raum: #home-automation:c3d2.de
🇩🇪 · AFRA · afra_rootcat (afra_rootcat@undisclosed.example.com)
@@ -70,28 +70,28 @@ ^ Test Point ^ Function ^ | TP2 | GND | | TP3 | 5V | | TP4 | Button Input | - | TP7 | LED / PWM Sense | + | PWM | FAN PWM Sense | | TP6 | Optional LED Signal | ===== GPIO Mapping ===== i added a Transistor - + <code> BC547C ┌─────┐ │ │ └─────┘ | | | C B E - + </code> ^ UPPÅTVIND ^ ESP32-C3 ^ Function ^ | TP2 | GND | Ground | | TP3 | 5V | Power | | TP4 | GPIO10 | Button Simulation | - | TP7 | GPIO4 | PWM / LED Detection | + | PWM | GPIO4 | PWM Detection | Do Not USE TP7 or TP 9 ! (in Off State it still have the last pwm value) | TP6 (optional) | GPIO5 | Additional LED State | ===== Wiring ===== @@ -99,9 +99,9 @@ ==== Basic Wiring ==== <code> UPPÅTVIND - TP7 ---10kΩ ---+--- GPIO0 - yellow + PWM ---10kΩ ---+--- GPIO0 - yellow | 20kΩ +-------- GND black @@ -138,9 +138,178 @@ * Fan entity * API integration * WiFi fallback AP + <code> + # ------------------------------ + # Sensors Configuration + # ------------------------------ + # ------------------------------ + # Sensors & Status + # ------------------------------ + binary_sensor: + - platform: status + name: "${devicename} Status" + + # TP6 -> GPIO1 (Filter LED) + - platform: gpio + pin: + number: GPIO1 + mode: + input: true + pullup: true + name: "UPPATVIND Filter Warning" + id: filter_led + + # ------------------------------ + # Information Sensors + # ------------------------------ + + + - platform: pulse_counter + pin: + number: GPIO0 + mode: + input: true + pullup: true + name: "UPPATVIND Motor Pulses" + id: uppatvind_rpm + update_interval: 1s + internal: true + + # ------------------------------ + # Text Sensors (Diagnostics) + # ------------------------------ + text_sensor: + - platform: wifi_info + ip_address: + name: "${devicename} IP Address" + ssid: + name: "${devicename} Connected SSID" + bssid: + name: "${devicename} BSSID" + mac_address: + name: "${devicename} MAC Address" + + - platform: template + name: UPPATVIND Mode + id: uppatvind_mode + lambda: |- + float rpm = id(uppatvind_rpm).state; + if (rpm < 1000) + return {"Off"}; + if (rpm < 9500) + return {"Low"}; + if (rpm < 13500) + return {"Medium"}; + return {"High"}; + update_interval: 1s + + # ------------------------------ + # Restart Switch Configuration + # ------------------------------ + switch: + - platform: restart + name: ESP-UPPATVIND restart + + # ------------------------------ + # TP4 -> GPIO04 (Button) + # ------------------------------ + output: + - platform: gpio + pin: + number: GPIO4 + inverted: false + id: fan_button + + select: + - platform: template + name: "UPPATVIND Speed" + id: uppatvind_speed + optimistic: false + options: ["Off", "Low", "Medium", "High"] + lambda: |- + return id(uppatvind_mode).state; + set_action: + - if: + condition: + lambda: |- + return x == "Off"; + then: + - button.press: uppatvind_off + - delay: 6s + - if: + condition: + lambda: |- + return x != "Off"; + then: + - script.execute: + id: goto_speed + target: !lambda 'return x;' + + script: + - id: goto_speed + mode: queued + parameters: + target: string + then: + - repeat: + count: !lambda |- + int current = 0; + int desired = 0; + auto state = id(uppatvind_mode).state; + if (state == "Low") + current = 1; + else if (state == "Medium") + current = 2; + else if (state == "High") + current = 3; + + if (target == "Low") + desired = 1; + else if (target == "Medium") + desired = 2; + else if (target == "High") + desired = 3; + if (current == desired) + { + ESP_LOGI("uppatvind", "Already at target"); + return 0; + } + int steps = (desired - current + 4) % 4; + ESP_LOGI( + "uppatvind", + "Current=%d Desired=%d Steps=%d", + current, + desired, + steps + ); + return steps; + then: + - button.press: uppatvind_button + - delay: 1500ms + + button: + - platform: template + name: "UPPATVIND Next" + id: uppatvind_button + on_press: + then: + - output.turn_on: fan_button + - delay: 250ms + - output.turn_off: fan_button + + - platform: template + name: "UPPATVIND OFF" + id: uppatvind_off + on_press: + then: + - output.turn_on: fan_button + - delay: 4000ms + - output.turn_off: fan_button + + </code> ===== Home Assistant Integration ===== Possible automations: @@ -152,8 +321,77 @@ * Combine with air quality sensors * Dashboard integration + <code> + type: custom:stack-in-card + cards: + - type: custom:mushroom-template-card + primary: UPPATVIND I + secondary: > + {% if is_state('binary_sensor.uppatvind_filter_warning','on') + %} + ⚠ Filter Warning + {% else %} + Filter OK + {% endif %} + icon: mdi:air-purifier + - type: custom:mushroom-chips-card + chips: + - type: template + icon: mdi:fan-off + entity: select.uppatvind_speed + icon_color: > + {% if is_state('select.uppatvind_speed','Off') %} red {% + endif %} + tap_action: + action: perform-action + perform_action: select.select_option + target: + entity_id: select.uppatvind_speed + data: + option: "Off" + - type: template + icon: mdi:fan-speed-1 + entity: select.uppatvind_speed + icon_color: > + {% if is_state('select.uppatvind_speed','Low') %} green {% + endif %} + tap_action: + action: perform-action + perform_action: select.select_option + target: + entity_id: select.uppatvind_speed + data: + option: Low + - type: template + icon: mdi:fan-speed-2 + entity: select.ppatvind_speed + icon_color: > + {% if is_state('select.uppatvind_speed','Medium') %} orange + {% endif %} + tap_action: + action: perform-action + perform_action: select.select_option + target: + entity_id: select.uppatvind_speed + data: + option: Medium + - type: template + icon: mdi:fan-speed-3 + entity: select.uppatvind_speed + icon_color: > + {% if is_state('select.uppatvind_speed','High') %} red {% + endif %} + tap_action: + action: perform-action + perform_action: select.select_option + target: + entity_id: select.uppatvind_speed + data: + option: High + + </code> ===== Calibration ===== The LED/PWM signal values may vary between purifier revisions.