0 ESP 01S relay V1.0 (ESP8266 5V WiFi relay module) plus Dallas DS18x20 1Wire Thermometer
Andrii Podanenko edited this page 2019-11-04 09:21:30 +02:00

!!! WARNING !!!

BEWARE OF MANY VISUALLY SIMILAR BOARDS TO THIS RELAY BOARD but different schematics (see photos below).

ESP 01S top

When I have received this module from Aliexpress (US $2.09 including ESP-01S), it was not working (I have found other people had the same issue) There are two culprits of this:

  • "CH_PD" is not set to HI (3.3V) as actually required. Usually this is done with a 10K resistor or directly to 3.3V, I have connected directly to the 3.3V
  • The resistor R2 (10k) which is connected between the terminal GPIO0 to ground. This ensures that the GPIO0 is always pulled to ground, which actually places the ESP-01 in program mode (flashing). To make the module working it is necessary to remove (solder out) the R2.

After soldering out (removing) R2, the module ran smoothly and flashing Tasmota firmware was easy:

esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 tasmota.bin

Connect DS18B20 to the GPIO2 (see diagram below - soldering not necessary, it is possible to put the wires and the resistor directly in to the female part of the connector together with ESP 01S module pins)

After flashing, set up Tasmota (see images below):

  • "Generic module"
  • GPIO0 as Relay1 (21)
  • GPIO2 as DS18x20(4)

Retrieving the temperature via HTTP

http://tasmota-ip/cm?user=<USER>&password=<PASS>&cmnd=status%2010

The temperature information will put published by MQTT to the tele//SENSOR in the format of:

"Time":"2018-06-14T07:56:34","DS18B20":{"Temperature":21.9},"TempUnit":"C"}

Setting interval at which the sonoff will report it's status: Display current interval: TelePeriod Set interval: TelePeriod You can change PulseTime by typing PulseTime 30 in the Console at the Tasmota Webinterface.