I've just got a relay module from Aliexpress which looks very useful. It is not only a relay module but has an ESP32 and also an isolated AC power supply providing 3v3 and 5v. The vendor page is: https://de.aliexpress.com/item/1005005983735481.html . This is very neat and compact especially if you are switching mains voltages with the relay then there is no need for an additional power supply. The size is only 80mm x 45mm
I am building a (another) time switch application and I'll need only a few extra mains side components to complete it.
There is very little documentation with it but a quick inspection of the circuit board tracks indicated that the relay is connected to GPIO16 and the onboard led is connected to GPIO23.
I've just created two test applications for it to demonstrate the basic functionality. One is just a simple program to switch the led and the relay just to check these work. The second application uses the ESPAsyncWebServer to control the device remotely. This latter application is based on a previously published example espasyncwebserver and here is a screen shot. The instructions are in the code.
.
Simple basic test application:
Relay_Power_V0_01.ino (822 Bytes)
Web server application to control the relay module via a browser client:
Relay_Power_V0_02P.ino (9.6 KB)
![]()
MAINS VOLTAGES DISCLAIMER: only people who know what they are doing should attempt to use this module. When programming the ESP32 part, disconnect the whole thing from the mains. Use a suitable enclosure to prevent accidental contact with live metal parts.

