ESP8266 Socket relay switch
An IoT socket made with a WeMos D1 Mini Pro, an inductive touch sensor and a .96" OLED display. I made it, so I don't have to go in the evening all the way over to the nightstand to switch the light on, and go back to the desk and switch the light off. I know, I'm lazy, but it's a 15m annoying trip every evening :). The scope here was to do these projects on my own, more or less from scratch, not just take an already built (big) home automation system and buy stuff that connects to it.
The first version is installed in a 3-way extension socket. I was still waiting for the ordered socket cases to be shipped, but found out there is just enough space in this one. It also included a touch sensor, so it can be turned on and off locally.
I used tzapu's WiFiManager, so I don't have to hard-code the WiFi credentials or local IP (having to open it up every time, just to flash the WeMos on location or WiFi configuration change).
I've also used a simple relay, since I didn't find a double relay shield at the time (for safety reasons, it's better to switch both power lines off). It should be simple to change though. Take a look at the other project called 'thermostat'.
To switch it on or off from my mobile, I use an app called 'HTTP Shortcuts'. You could also put a shortcut/link on your homescreen and fire up a browser every time, but that's not the simplest way to turn on a light. I suppose it could be integrated into Home Assistant or anonther home automation system (the more fancy and expensive home spies you can talk to), with some (minor?) changes, but in my case those are overkill for the moment.
- WiFiManager
- Touch sensor
- OLED Display
- It Shows the socket status (On/Off), the IP of the own WiFi access point in config mode, and the LAN and internet IP after connecting to the local WiFi AP
- The display dimms down, one minute after using the touch sensor
- ESP8266WiFi
- ESP8266WebServer
- WiFiManager
- ESP8266mDNS
- SSD1306Wire
- DNSServer
- ESP8266HTTPClient
A bit hard, since it's already built
- Pretty much all done
- Change WAN to Inet in the display
16MB WeMos D1 Mini Pro # NodeMcu # ESP8266 ESP-8266EX CP2104 for Arduino NodeMCU
Relais Relay Shield für WeMos D1 mini Wifi ch340 IoT Lua Arduino kompatibel 397
Dual Relais Shield für WEMOS D1 Mini (ESP 8266) WIFI Modul Kit/Bausatz -Neu!
Details zu 0,96" OLED Display Weiß I2C SDD1306 128x64 Modul Arduino Raspberry Pi
- MIT license
- Copyright 2018 © netphantm.