LoraTap SC500W Roller Shutter Switch
GPIO Functions
Source: ESPHome-Devices
GPIO Pin | Function |
---|---|
3 | LED indicator (inverted) |
4 | Switch S1 signal (inverted) |
5 | Switch S2 signal (inverted) |
12 | Relay L1 |
13 | Pairing button |
14 | Relay L2 |
flashing
The case has three snaps, it's very easy to dissasemble it, PCB front side:
back side:
Luckily, the module is an ESP8266-based TYWE2S, not a newer one based on the BK72XX family SoC.
Follow the datasheet, solder cables to the TX
, RX
, GND
, 3V3
pins respectively:
then short the IO0
pad to GND
on the back side:
Example ESPHome configuration:
esphome:
name: roller-shutter-1
comment: 'Roller shutter switch 1'
esp8266:
board: esp8285 # note the model
preferences:
flash_write_interval: 10min
logger:
level: WARN
# baud_rate: 115200
wifi:
fast_connect: true
networks:
- ssid: !secret wifi_ssid
bssid: !secret wifi_bssid
password: !secret wifi_password
api:
ota:
password: !secret ota_password
status_led:
pin:
number: 3
inverted: true
# for hard reset
button:
- platform: restart
id: restart_button
internal: true
binary_sensor:
- platform: gpio
name: 'Pairing button' # use it as a reset button
pin: 13
internal: true
on_release:
then:
- button.press: restart_button
- platform: gpio
name: 'S1 open switch'
pin: 4
id: switch_open
internal: true
filters:
- invert:
on_press:
then:
- cover.open: shutters
on_release:
then:
- cover.stop: shutters
- platform: gpio
name: 'S2 close switch'
pin: 5
id: switch_close
internal: true
filters:
- invert:
on_press:
then:
- cover.close: shutters
on_release:
then:
- cover.stop: shutters
# relays
output:
- platform: gpio
pin: 12
id: relay_open
- platform: gpio
pin: 14
id: relay_close
cover:
- platform: time_based
name: 'Roller Shutter 1'
id: shutters
device_class: shutter
open_action:
- output.turn_off: relay_close
- output.turn_on: relay_open
open_duration: 51s # adjust it to the actual fully open duration
close_action:
- output.turn_off: relay_open
- output.turn_on: relay_close
close_duration: 47s # adjust it to the actual fully close duration
stop_action:
- output.turn_off: relay_open
- output.turn_off: relay_close
0 Comments