devices.esphome.io

Teckin SP22

Teckin SP22

Device Type: plug
Electrical Standard: eu
Board: esp8266

GPIO Pinout

Based on information from Tasmota.

PinFunction
GPIO01Button
GPIO03Status LED - Red
GPIO04cf_pin bl0937
GPIO05cf1_pin bl0937
GPIO12sel_pin bl0937
GPIO13Status LED - Blue
GPIO14Relay

Basic Configuration

The sample provided below is a minimal config which should get you up and running.

You will need to calibrate the power monitoring sensors in order to have accurate power monitoring.

esphome:
name: sp22
friendly_name: Teckin SP22
esp8266:
board: esp01_1m
# Enable logging
logger:
api:
encryption:
key: !secret api_encryption_key
web_server:
port: 80
ota:
password: !secret esp_ota_pass
wifi:
ssid: !secret wifissid
password: !secret wifipass
ap:
ssid: SP22_AP
password: "Hotspot password here"
captive_portal:
switch:
- id: relay
platform: gpio
name: "Relay"
pin: GPIO14
on_turn_on:
- output.turn_on: relay_status
on_turn_off:
- output.turn_off: relay_status
binary_sensor:
- platform: gpio
id: button
internal: true
pin:
number: GPIO01
on_press:
- switch.toggle: relay
filters:
- delayed_on: 10ms
- delayed_off: 10ms
status_led:
pin:
number: GPIO13
inverted: true
light:
- platform: binary
internal: true
name: "Relay Status"
output: relay_status
output:
- id: relay_status
platform: gpio
pin:
number: GPIO03
inverted: true
sensor:
- platform: hlw8012
model: BL0937
sel_pin:
number: GPIO12
inverted: true
cf_pin: GPIO04
cf1_pin: GPIO05
current:
name: "HLW8012 Current"
voltage:
name: "HLW8012 Voltage"
power:
name: "HLW8012 Power"
energy:
name: "HLW8012 Energy"
update_interval: 10s
change_mode_every: 3
Edit this page on GitHub