Make a WiFi Temperature Controller
I recently found a need to control the temperature of something in my house by switching on and off a heater.
So, this can be done with a simple thermostat, but I wanted more. I wanted to be able to remotely switch on the heater, and remotely monitor the temperature.
What I decided on was a Sonoff TH-16 which is a Sonoff switch with an analogue input. Along with this I used a temperature sensor and built the whole solution into a simple, multipurpose box.
Step 1
Start by preparing your box. I drilled holes for the indicator light, the sensor input, the supply cable and the outlet socket.
How you arrange this is up to you and your needs. I chose to include an indicator lamp so I could see when the Sonoff output was on, and opted to include a socket so I could easily remove and change whatever I choose to control.
Step 2
Next it time to start assembling and laying out your control box. I started by installing the power chord, the outlet socket, and the indicator light.
To power the indicator I wired it in parallel with the live and neutral of the outlet socket. This particularly light has a built in resistor, so the current limited to the required amount.
Step 3
The last connection you need to make is the actual wiring into the Sonoff. The TH-16 has spring connections, so all you need to do is push down the wire part on the terminal, then slide the wire in, and release. This will hold the cable securely in place.
Step 4
Next I wired up the plug that will connect to the socket I mounted on the box. I attached the heating pad to the other side of the cable.
Step 5
Lastly, you can secure your Sonoff in place (I used glue). Now, before you close up your box, you will need to power up your Sonoff and add it to your eWeLink app (you can see how to do this here: https://chrisdoesstuff.co.za/add-wifi-switch-to-anything/).
In the eWeLink app you can set up schedules and automatic temperature controls to suit your needs.
Then you can close up your box and you are done!
Materials
This recipe will feed around 8 people.
A Sonoff TH-16 (or TH-10, but then you current is limited to 10A).
A Sonoff temperature sensor (you get a temperature and a temperature/humidity combo, however only the dedicated temperature one is waterproof).
Something to control. In my case this was a reptile heating pad.
Optional:
A box to house your circuit in, with dedicated power cord.
A plug and socket for the output.
An indicator lamp.


