devices.esphome.io

AGL Switch 2, 3 gang variants

AGL Switch 2, 3 gang variants

Device Type: switch
Electrical Standard: br
Board: esp8266
Difficulty: Disassembly required, 3/5

The AGL Switch is available in Brazil. AGL

General Notes

This config was created based on the 2 gang switch that I had.

Product Images

Front of 2 gang switch alt text

Back of 2 gang switch alt text

GPIO Pinout

2-Gang Version

PCB alt text

PinFunction
GPIO2Status LED
GPIO16Button 1 (HIGH = off, LOW = on)
GPIO5Button 2 (HIGH = off, LOW = on)
GPIO13Relay 1
GPIO12Relay 2

3-Gang Version

PinFunction
GPIO2Status LED
GPIO16Button 1 (HIGH = off, LOW = on)
GPIO5Button 2 (HIGH = off, LOW = on)
GPIO4Button 3 (HIGH = off, LOW = on)
GPIO13Relay 1
GPIO12Relay 2
GPIO14Relay 3

Basic Configuration (2-Gang)

esphome:
name: agl-2-gang-switch
friendly_name: AGL 2 Gang Switch
esp8266:
board: esp01_1m
# Enable logging
logger:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "ESPHOME"
password: "12345678"
api:
reboot_timeout: 15min
encryption:
key: !secret api_encryption_key
ota:
password: !secret ota_password
sensor:
- platform: uptime
name: AGL 2 Gang Uptime
update_interval: 60s
text_sensor:
- platform: version
name: AGL 2 Gang Version
binary_sensor:
- platform: status
name: AGL 2 Gang Status
- platform: gpio
pin:
number: GPIO16
inverted: True
name: AGL 2 Gang Button 1
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO5
mode: INPUT_PULLUP
inverted: True
name: "AGL 2 Gang Button 2"
on_press:
- switch.toggle: relay_2
switch:
- platform: restart
name: AGL 2 Gang Restart
- platform: gpio
name: "AGL 2 Gang Switch 1"
pin: GPIO13
id: relay_1
- platform: gpio
name: "AGL 2 Gang Switch 2"
pin: GPIO12
id: relay_2
light:
- platform: status_led
id: blue_led
restore_mode: ALWAYS_ON
pin:
number: GPIO2
inverted: true
internal: true
Edit this page on GitHub