The Power-Plug IoT (Internet of Things) Device driven by the Miniservice infrastructure

PowerPlug is an IoT (Internet of Things) Object driven using the IoT Miniservice by BVRobotics infrastructure and is used to activate and deactivate 220V power plugs directly from internet using the SDK or using the BVIoTManager web application.

If you need additional specific information about this topic or if you want to look it personally please write an email

PowerPlug is the evolution of a module I built different years ago named Mobile Power Activator. At that time the Miniservice infrastructure was not yet available and I was not perfectly aware of the NodeMCU controller and ESP8266 modules.

NodeMCU is one of the most important component of a Miniservice infrastructure (Miniservice firmware is available and ready for this controller. For any other controller you can always use the Miniservice infrastructure but developing the firmware on your own) and is the core also for this new device


NodeMCU module


8 analogic pins of the nodeMCU are used as driver for the controller, driving 8 relays. Each of this relay open and close a circuit where the potential difference is 220V. Obviously the 220V are obtained connecting PowerPlug directly to a house powerPlug.

a chip controller for 8 relays

The PowerPlug Firmware is the first firmware built 100% compatible with the Miniservice infrastructure and 100% ready to be autonomous, installed and controlled not by the code but by web interface.

I have prepeared the following Tutorial to show you how to, quickly, build a Miniservice IoT device without to write one single line of code. In this tutorial I will show you how to install the firmware on your own controller.


When the NodeMCU starts, the first thing it does is to open the internal EPROM to see if it has stored some wifi credentials. If yes, it tries immediately to connect to the Access Point. In case of failure or in case of no records present in the EPROM it becomes itself an access point so that you can access it using your smartphone or your computer selecting it as APN for your device.

When in AP mode it creates a virtual network and open a web server that you can access (when you are on its network) using the address http://192.168.4.1 in your browser.

In the web page displayed, you will be able to configure the APN and the password for the next connection and (at the end of the page) the Device name that you received from the Miniservice infrastructure during the registration of your device (You can do it accessing BV IoT Manager web application.).
Be careful to not use a Device name configured for a module different from a PowerPlug (BioMedical, Geo Coordinate or others). Otherwise at pool time it will receive an Access denied answer from the infrastructure and will not work at all.

Once configured the system will reset itself and will restart. This time it will find something in the EPROM and, if you entered all parameters correctly, it will connect to the infrastructure. The firmware will register itself to the infrastructure the first time he will write something in it. In fact every time it sends a write request, it send also its IP address and registration parameter (During any read activity the registration is not performed).

To verify if it is registered or not (currently I have not in plan to add to the firmware a display to validate the status) you have two options:

1) To see if the APN is still there in the list of available APNs. If yes, then there is a connection problem and the system is "again" in APN mode.
2) Open your router and see if you have a new device connected in the LAN client session.

Option number 2 is the most useful one because it allows you to capture the IP address of the device and to open the web console (This time everything will work from your home or office network and you will not need to use the NodeMCU as APN) to retrieve different information based on the device configuration.
In this case we are talking about a PowerPlug device so you will be able to display the status of your plugs and will be able to change some online parameters or to reset the device.


The interface when the firmware starts working properly


In the following video you will see the Powerplug in action connected to a simple fan and driven by the IoT Miniservice infrastructure



Leave a Comment