The Sonoff S20 has only a 4 pin header (GND, TX, RX, VCC).
To use this pins (TX=GPIO1, RX=GPIO3) for sensors, the serial interface has to be disabled:
Tools – Advanced – Enable Serial port: uncheck
This is the first test on a breadboard with DHT11
I don’t think that a humidity sensor makes any sense inside the socket. Therefore, I think I will use DS12B20 soldered on a female pin header in the final version.
The values are also published via mqtt:
# mosquitto_sub -h 192.168.234.100 -t "#" -v /sonoff-s20/DHT11/Temperature 24.00 /sonoff-s20/DHT11/Humidity 33.00