User avatar
By RichardS
#43114 User
Ananthan

Description
If you are a geek, then you definitely want to mess with everything to create something cool out of it. What about controlling all of your appliances from your computer or from your smart phone wirelessly? Set timer for light when you go to sleep; autonomously switch your fan on when temperature exceeds; and when you are too lazy to get up from your bed to switch fan/light off. All you need is an ESP8266 with a couple of other components that cost <10$.
Made ESP 8266 ES01 chip to act as a TCP server and also to control the Relay circuit. The module will try to connect with your home router automatically and will make itself available at your service. Control messages are interpreted and necessary signals were passed to the Relay circuit. AC to DC converter (from an old mobile charger) along with a regulator (LM2596 Module) was needed as the chip is 3.3V tolerant. Finally created a nice and tidy script (using Script Manager) in Mobile to control the appliances. Same script will works in a Linux/Windows Machine also.

Feature supported

Control the appliances with normal switch
Control the appliances wirelessly using smart phone
Control the appliances wirelessly using computer
Get temperature readings in both smart phone and computer
Set timer to switch your fan/light on/off
Automatic control of fan using temperature reading
A clean Linux conky-widget that shows the room temperature with graph

Parts
esp8266
old mobile charger
3.3 V regulator (LM2596)
relay (2 channel relay)
DS18B20 temperature sensor

Links
Sourcecode and hardware schematics
Blog

Video
Youtube video: https://www.youtube.com/watch?v=dcYt8nGvhVs

Images
Attachments
mobile_widget.png
IMG_20160308_230805610.jpg
IMG_20160308_231812485.jpg
KAVJLPXPt6.png
User avatar
By Ananthan
#43691
wakroach wrote:Does this give a web interface to any electric device in the room?

It does have an interface to control the appliances and a graphical plot of room temperature but is not running a dedicated web interface. But you can indeed switch ON & OFF the device and get temperature by following the URl

http://IP:PORT/1ON
http://IP:PORT/1OFF
http://IP:PORT/2ON
http://IP:PORT/2OFF
http://IP:PORT/T?

(eg: http://192.168.1.2:1002/1ON)