Skip to content

nopnop2002/esp-idf-web-rc-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-idf-web-rc-switch

315/433MHz RF ON/OFF Switch using esp32.
You can turn ON/OFF Wireless Smart Outlet using a browser.

web-rc-switch

rc_switch

I used this component.
This component can communicate directly with the browser.
There is an example of using the component here. It's a great job.

Software requirements

ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.

Hardware requirements

  • 315MHz/433MHz ASK Wireless transmitter like this.
    H34A-315/H34A-433
    SYN115
    STX882

I used this: H3V4F-2 H3V4F-3

  • Outlet that can be turned ON/OFF by RF.

SmartOutlet SmartSwitch SmartOutlet2

Installation

git clone https://github.com/nopnop2002/esp-idf-web-rc-switch
cd esp-idf-web-rc-switch
git clone https://github.com/Molorius/esp32-websocket components/websocket
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3/esp32c6}
idf.py menuconfig
idf.py flash

Configuration

config-main config-app

WiFi Setting

config-wifi-1

You can use Static IP.
config-wifi-2

You can connect using mDNS name.
config-wifi-3

Radio Setting

config-radio

Outlet Setting

  • With a 10 pole DIP switch.
    I used the photo here.
    rc_switch_typeA config-outlet-1

  • With two rotary (or sliding) switches with four setting possibilities each.
    I used the photo here.
    rc_switch_typeB
    config-outlet-2

  • Generic.
    Directly specify the ON and OFF codes.
    config-outlet-3

Wirering

RF Module ESP32
DATA -- GPIO4
GND -- GND
VCC -- 3.3V

You can change data pin to any pin using menuconfig.
However, changing to some pins does not work properly.

WEB Page

The WEB page is stored in the html folder.
You can change it as you like.

Task Structure Diagram

Task_structure_diagram

Reference

https://github.com/nopnop2002/esp-idf-rc-switch