Switch MQTT



//
Posted on November 17, 2022 at 3:57 PM

//

Device Smart Wall Switch DIY MQTT Protocol




# Smart Switch Momentary

DIY Smart Switch momentary 2 Gang and 2 Channel Relay SPDT

List Item

- Esp8266 (Wemos D1 Mini) / Chip SoC Esp8266
- Relay 5VDC SPDT Songle (Max Current 10A)
- Power Module Hi-Link 220VAC to 5VDC
- Resistor 1k, 10K (SMD 0805)
- Diode 1N4007 SMD
- Transistor 2n2222a
- Terminal Screw 6 Pin Hole
- Push Button (schneider momentary switch) Datasheet: https://download.schneider-electric.com/files?p_enDocType=Instruction+sheet&p_File_Name=MS18524.pdf&p_Doc_Ref=MS18524

# Schematic


# Layout 
### Top View 

### Bottom View


# Home Assistant

Under covers in HA, use this config

```
mqtt:
  broker: "Your IP Broker/server"
  port: Your port MQTT
  username: "Your username"
  password: Your password

switch:
  - platform: mqtt
    name: "General Lamp"
    state_topic: "switch/bedroom1/1/state"
    command_topic: "switch/1/command"
    payload_on: "1"
    payload_off: "0"

 switch:
  - platform: mqtt
    name: "Cove Lighting"
    state_topic: "switch/bedroom1/2/state"
    command_topic: "switch/2/command"
    payload_on: "1"
    payload_off: "0"
```

# Reference

- WiFi Manager (https://github.com/tzapu/WiFiManager)
- MQTT (https://github.com/knolleary/pubsubclient)

# Download Source Code & PCB Design

- https://github.com/eunbiline98/Smart-Switch-Momentary-

# Dimension

- L = 69,84 mm
- W = 70,87 mm


Leave a Comment:

Please Sign in First