Smart Plug/Outlet is used for turning on/off electric current and for measuring electricity usage. It uses the solid state relay module connected to NodeMCU ESP8266. The output is displayed using justgate on HTML5. Data exchange between the relay and the HTML5 is performed over the Microgear Library. We need to install one Microgear on ESP8266 and another Microgear on HTML5.
NodeMCU pin diagram
ESP8266 NodeMCU Development Kit
Download Microgear library for esp8266 arduino here
Download Microgear library for html5 here
Download Smart Plug’s source code here
Don’t forget to change your ssid, password, APPID, APPKEY and APPSECRET otherwise you may not connect to NETPIE.