ESP8266 relay module review – Yunshan WiFi relay – a new life

ESP8266 relay module review – Yunshan WiFi relay documented a review of a (at the time) cheap ESP8266 WiFi relay module.

Above, the basic module.

I have resurrected it to prototype some code (developed in Arduino), and this time used an ESP-Prog as a programming adapter. The ESP-Prog provides for auto programming (ie management of the reset and boot pins to invoke the bootloader automatically from the programming client software).

Above, the relay module and ESP-Prog connected. The relay module lacked an external connection to the reset line (EN), and the small blue wire and brown wire attached to the board are part of a modification to extend the reset line. The modification is described in full at ESP8266 relay module review – Yunshan WiFi relay.

This would not be a module of choice today, there are lots of modules with 1-4 relays of up to 30A rating with an onboard ESP8266, I have a couple on the way, but this allowed testing the application with a real relay board.

Above is a preview of the web browser interface, it is a bit trivial for a single channel board, but it is extensible to more channels based on a config file stored in the littleFS file system on the microcontroller.

{
"hostname": "Yunshan01",
"relays": [
["Relay",4,0]
]
}

Above is the example configuration, it specifies one relay channel called “Relay” (but you can be more imaginative and assign functional labels) on GPIO4 with initial state OFF.

Differently to most such controllers around, this does a syncronised update to all relay channels on a multi channel controller (well, within microseconds, so the individual relay operate time is the main variable).

The code uses a RESTFUL interface, and so it can be controlled from command line tools that could send http://yunshan01.lan/?n00=on&update= for example.