Zum Hauptinhalt springenZur Hauptnavigation springen

Empfohlene Produkte

📦 Empfohlene Gadgets

Ausgewählte Empfehlungen für dein Smart Home Projekt

Lädt Produkte... (sensor → smartswitch → led → camera)

Hier ein Beispiel ESPHome-Programm für einen Sonoff Touch (2-Kanal Variante).
Dieser Wandschalter existiert als 1, 2 und 3-Weg Schalter.


Pinbelegung

Die Pinbelegungen der 3 Varianten (EU-Version) sehen wie folgt aus:

Sonoff Touch T1 (1 Gang)

Button – GPIO01
Relay and LED – GPIO12
LED – GPIO13

Sonoff Touch T1 (2 Gang)

Button 1 – GPIO01
Button 2 – GPIO09
Relay 1 and LED – GPIO12
Relay 2 and LED – GPIO05
LED – GPIO13

Sonoff Touch T1 (3 Gang)

Button 1 – GPIO01
Button 2 – GPIO09
Button 3 – GPIO10
Relay 1 and LED – GPIO12
Relay 2 and LED – GPIO05
Relay 3 and LED – GPIO04
LED – GPIO13


Programmcode

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 esphome: name: sonoff_t1_ch2 platform: ESP8266 board: esp01_1m wifi: ssid: !secret WLanSSID password: !secret WLanPassword ap: ssid: "Sonoff T1 Ch2 Fallback Hotspot" password: "123456789" captive_portal: logger: api: ota: binary_sensor: - platform: gpio pin: number: GPIO0 mode: INPUT_PULLUP inverted: True id: button_1 on_press: then: - light.toggle: light_1 - platform: gpio pin: number: GPIO9 mode: INPUT_PULLUP inverted: True id: button_2 on_press: then: - light.toggle: light_2 - platform: status name: "T1 Status" output: - platform: gpio pin: GPIO12 id: relay_1 - platform: gpio pin: GPIO5 id: relay_2 light: - platform: binary name: "T1 A" id: light_1 output: relay_1 - platform: binary name: "T1 B" id: light_2 output: relay_2 status_led: pin: number: GPIO13 inverted: yes

Shopping-Empfehlungen

Passende sensor-Produkte

Weitere empfohlene Produkte für dein Smart Home

Lädt Produkte... (sensor → smartswitch → led → camera)

Artikel teilen

Teilen: