WASP is a Wemos D1 Mini time-programmable smart plug with a web-based control interface.
With WASP you'll be able to control remotely a 220v power plug and set time rules to switch ON/OFF your powerplug at a given time!
Everything is under your fingertips trough a web-based mobile-first interface:
Interface usage is quite intuitive; you have a switch to manually control the power activation and a small form you can use to insert a time and the wanted plug behaviour at that time.
The code is written in form of an Arduino sketch and can be edited/uploaded with the standard Arduino IDE (see this to setup the IDE for Wemos D1 Mini board).
WASP will connect to your home network with a fixed ip address. Everything you'll need to configure is at the top of the webserver.cpp file of the sketch:
If not already installed you'll need to install some libraries to get things work:
- FSBrowserNG
- Time
- ArduinoJson
- NTP Client
At this point upload the sketch data, the sketch itself and connect with a browser to http://wasp.local (or the name you choosed as host in the webserver.cpp file instead of "wasp") or type directly the ip address you set in the webserver.cpp file.
Wirings for this projects are quite simple and reported in the Schematic section...basically you just have to stack a relay shield on top of a wemos D1 mini and wire a plug as power supply for everything and a relay output to a socket).
Building Tip:To have better mechanical properties it's warmly recommended to enclose everything in a electrical box with cables gland:
First of all: the maximum output power load you can drive with the relay shield.
Take a look at the relay top for this:
The maximum number of rules you can set is 20...hack my code if you want more!
The time capabilities of WASP are based on NTP, so you need an internet connection to use them!
You can monitor the NTP server reachability from the control panel:
Using NTP server to switch ON/OFF the plug at a given time isn't a good choice if your internet connection isn't quite stable.
It would be much better to use an RTC module for this!
For this reason I started to develop the software to replace everything is done using NTP server with an RTC module like this one:
You can find the code in the rtc.h and rtc.cpp files.
Everything seems working and you can basically just replace all the functions with the "ntp_" prefix with the correspondent "rtc_ones"...the reason why I didn't do it is that I somehow broken my module some days ago!
In addition to this, take care at the wirings if you add the rtc module, since it require the usage of D1 pin, already used by the relay shield...so you must find a solution for this!
Happy hacking!
Comments