AZDelivery RFID Kit RC522 mit Reader, Chip und Card 13,56MHz SPI kompatibel mit Arduino und Raspberry Pi inklusive E-Book!
5,99 €
Hier findet Ihr ein Beispiel, wie der Sonoff Touch (2-Kanal Variante) zum steuern eurer elektrischen Jalousiemotoren verwendet werden kann.
Alle Details zur Pinbelegung oder wie man den Wandschalter als einfachen Lichtschalter nutzen kann, könnt Ihr unter folgendem Link nachlesen:
/wiki/esphome/sonoff-touch-2-kanal-wandschalter-t0eu2c/
esphome:
name: t0_schalter_Jalousie
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:
- lambda: |
if (id(my_cover).current_operation == COVER_OPERATION_IDLE) {
id(my_cover).open();
} else {
id(my_cover).stop();
}
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
inverted: True
id: button_2
on_press:
then:
- lambda: |
if (id(my_cover).current_operation == COVER_OPERATION_IDLE) {
id(my_cover).close();
} else {
id(my_cover).stop();
}
- platform: status
name: "Jalousie Status"
switch:
- platform: gpio
name: "Jalousie rauf"
pin: GPIO12
interlock: &interlock [open_cover, close_cover]
id: open_cover
on_turn_on:
- script.execute: switch_open_cover_off
- platform: gpio
name: "Jalousie runter"
pin: GPIO5
interlock: *interlock
id: close_cover
on_turn_on:
- script.execute: switch_close_cover_off
cover:
- platform: time_based
name: "Jalousie"
id: my_cover
open_action:
- switch.turn_on: open_cover
open_duration: 22s
close_action:
- switch.turn_on: close_cover
close_duration: 20s
stop_action:
- switch.turn_off: open_cover
- switch.turn_off: close_cover
status_led:
pin:
number: GPIO13
inverted: yes
script:
- id: switch_open_cover_off
mode: restart
then:
- delay: 1min
- switch.turn_off: open_cover
- id: switch_close_cover_off
mode: restart
then:
- delay: 1min
- switch.turn_off: close_cover