Table of contents:

2Smart is a Ukrainian team, and the russian invasion of our country affects our work every day. Not the biggest problem for Ukrainians today, but a tangible inconvenience is that we often don’t know if electricity is available at our homes or work. There are not always ways to check this remotely. However, our QA Engineer Ivan came up with a very simple solution, accessible even to those who have never dealt with device development and programming. Below, Vanya tells how to assemble a simple device that will allow you to know at any time whether electricity is available at your home or office.

How to assemble a primitive device for remotely checking the availability of electricity

The essence of the idea

The idea of how to remotely check the availability of electricity is elementary. It consists of the fact that you need to connect an IoT device over the internet, and it will be constantly connected to the network and transmits info about its state (on or off) to the MQTT broker. The user can see this state in real-time using a mobile application on their smartphone or tablet.

Perhaps you already have a device with similar functionality in your home. For example, today’s Wi-Fi routers may have a mobile application where you can set up notifications about the Internet turning on and off. Also, if you have any smart home device, such as a light bulb or socket, you can try turning it on remotely. If it responds, everything is OK, and there is electricity at home. It’s obvious.

If none of the devices in your home can do this, it’s okay. We will help you assemble the simplest device to solve this problem perfectly. The total budget you will need is only $5-7.

What you need to assemble a device for electricity monitoring

The only component you need is the ESP32 DevKit. It is a small board with an ESP32 microcontroller that usually is the “brain” of smart devices. But in itself, it can be a separate independent device, and it will suffice for our task. The usual price of this board in online stores is about $5-6.

How to Remotely Check if Electricity is Available at Home or Office

You will also need a USB / micro-USB cable to flash the microcontroller and connect the board to power. If you don’t have such a cable, that’s about another $1.50 in expenses.

How to Remotely Check if Electricity is Available at Home or Office

You won’t have to pay for anything else. Creating and using a device described below is completely free for private users.

Step-by-step instructions on how to assemble the device

Follow the instructions below to get a smart electricity monitoring device for your home or office. In most steps, you will just need to click Next.

If something doesn’t work out, feel free to ask questions in our Telegram chat for platform users.

  1. Go to https://cloud.2smart.com/register.
  2. Create a new account or sign in with your Google, Facebook, or Apple account.
    How to Remotely Check if Electricity is Available at Home or Office
  3. On the Dashboard page, click the “Create Product” button.
    How to Remotely Check if Electricity is Available at Home or Office
  4. Choose ESP32 and click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  5. Specify a name for the device – for example, Electricity Monitor. Click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  6. Choose ESPHome and click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  7. Do not change anything in the proposed code, and click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  8. Click the “Build firmware” button.
    How to Remotely Check if Electricity is Available at Home or Office
  9. Enter the credentials for your home or office Wi-Fi network. The device will use them to access the Internet. Click Save.
    How to Remotely Check if Electricity is Available at Home or Office
  10. Wait while the firmware builds.
    How to Remotely Check if Electricity is Available at Home or Office
  11. Connect the ESP32 DevKit to your computer using a USB / micro USB cable. Then click the Install button.
    How to Remotely Check if Electricity is Available at Home or Office
  12. In the window that appears, click Connect.
    How to Remotely Check if Electricity is Available at Home or Office
  13. Select the serial port of the computer your device is connected to and click the Connect button.
    How to Remotely Check if Electricity is Available at Home or Office
  14. Wait for the firmware to be installed on your device. Click the Close button.
    How to Remotely Check if Electricity is Available at Home or Office How to Remotely Check if Electricity is Available at Home or Office
  15. Click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  16. In the new window, also click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  17. Optionally, customize the interface of the mobile app for managing the device. However, in this case, it is not necessary. Click Next when finished.
    How to Remotely Check if Electricity is Available at Home or Office
  18. Use the QR code or app store banners to install the 2Smart Cloud mobile app on your smartphone. Click Next.
    How to Remotely Check if Electricity is Available at Home or Office
  19. Click the “Build firmware” button to build the production firmware. When finished, install the firmware on the microcontroller the same way you installed the test firmware before (steps 10-14). Click Next when finished.
    How to Remotely Check if Electricity is Available at Home or Office
  20. Click the “Publish a product” button.
    How to Remotely Check if Electricity is Available at Home or Office
  21. Launch the 2Smart Cloud mobile application. Log in with the same credentials you used to register on the platform or create a new account. Afterward, pair your device with the mobile application according to the instructions.

After successful pairing, the device control interface will appear in the mobile app. If you didn’t change anything in the firmware code, you’ve got a Blinker. You can control the blue LED on the ESP32 DevKit board via smartphone. In practice, this is useless, but you will not need even this functionality.
How to Remotely Check if Electricity is Available at Home or Office How to Remotely Check if Electricity is Available at Home or Office

How to track the availability of electricity with the assembled device

  1. Connect the device you have made to a power source.
  2. Go to the Notifications section of the 2Smart Cloud mobile app.
    How to Remotely Check if Electricity is Available at Home or Office
  3. Tap on the settings icon.
    How to Remotely Check if Electricity is Available at Home or Office
  4. Ensure toggles “Push notifications” and “Connecting/disconnecting devices” are enabled.
    How to Remotely Check if Electricity is Available at Home or Office

You will receive notifications every time your device turns on and off. Based on the latest notification, you can always know if electricity is available in your device’s location.

How to Remotely Check if Electricity is Available at Home or Office

The device status is also visible in the mobile app. The green caption Online indicates that electricity and the Internet are available and the device is turned on. The red caption Offline suggests the opposite.

How to Remotely Check if Electricity is Available at Home or Office How to Remotely Check if Electricity is Available at Home or Office

Notifications in messengers about the availability of electricity

You can set up sending notifications about your device status to Slack, Telegram, and WhatsApp messengers. The benefit of this integration is that notifications will be available to any number of users. You need to create a channel in one of the messengers where you can invite relatives, co-workers, etc.

How to Remotely Check if Electricity is Available at Home or Office

You can find instructions for integrating with Slack messenger at this link. Telegram integration instructions are here, and WhatsApp instructions are here.

Sharing with others

We have already described one of the ways of sharing above – setting up a Slack or Telegram channel, where notifications about turning the device on and off will come. You can also set up device sharing in the 2Smart Cloud mobile app. Read more in this instruction.

As a reminder, our platform is free for non-commercial use. If you like our electricity tracking idea, please don’t forget to share this guide with your friends!

Rate this article:

5 / 5. 10

( 10 votes )

Don't forget to share this post!

Let’s dive into your case

Share with us your business idea and expectations about the software or additional services.

    Thanks for contacting us!

    We will get in touch soon.

    This site is protected by Google reCAPTCHA and the following Privacy policy and Terms of use apply

    Send us a message

    This site is protected by Google reCAPTCHA and the following Privacy policy and Terms of use apply