LoraTap SC500W Roller Shutter Switch

GPIO Functions

Source: ESPHome-Devices

GPIO Pin Function
3 LED indicator (low level trigger)
4 Switch S1 signal (low level trigger)
5 Switch S2 signal (low level trigger)
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:

pcb-1

back side:

pcb-2

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:

flashing-wiring-1

then short the IO0 pad to GND on the back side:

flashing-wiring-2

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

Working in HASS:

hass


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.