Connect a small ESP32 module wirelessly to your smart meter via the HomeWizard P1 meter (and optionally control Energy Sockets) — no cloud, no subscription.
Your smart meter records everything, but shows nothing. The HomeWizard P1 meter translates that data onto your WiFi network. This module reads it and displays live on a compact screen: how much power you're consuming, how much your solar panels are producing, and what the monthly peak is.
Just knowing what's going on. How much does the washing machine or dryer use? When and how much are the solar panels injecting? This €13 display shows it, live, no subscription. Optionally, up to three sockets can be switched automatically based on your power surplus.
▸ How do I flash this onto the board? (step-by-step)
You need no software — this is done directly from your browser (Chrome, Edge or Opera).
Open the flash tool in your browser
Go to espflash.app, connect your board via the USB data cable and click "Connect Device". Select the correct port in the pop-up.
Choose the firmware file
Click "Click to upload firmware" and select the .bin file you downloaded above.
Start flashing
Click "Start Flashing" and wait patiently. Do not disconnect the USB cable during this process (takes a few minutes).
Done!
You will see "Done!" or "Flash successful". Unplug and reconnect the cable — the board starts up with the new firmware.
⚠ Troubleshooting
No COM port visible? Install the USB driver (CP210x or CH340).
Process stalls? Hold the BOOT button while clicking "Program".
Still not working? Try a different USB cable or USB port.
🔧 Advanced users: source code and Arduino IDE
Want to modify or compile the code yourself? Request the source code at johanok@gmail.com. This approach only makes sense if you are familiar with Arduino and library management.
Step 5
First-time configuration
Power on the board by connecting it to a power source. If it cannot connect to WiFi, it opens its own wireless access point (Lily, no password required).
Turn off mobile data on your smartphone and connect to the Lily network.
Open your browser at 192.168.4.1.
Enter only your WiFi credentials (SSID and password) — the board will then automatically scan your network for HomeWizard devices, save them, and restart.
✅ Automatic detection
If no P1 meter has been configured yet, the board scans the network automatically and stores found devices.
Configuration page at 192.168.4.1
💡
The board saves by name automatically when it scans. E.g. p1meter-123abc.local instead of 192.168.1.x. If the IP address ever changes, you won't need to update anything.
⚡ Faster than the HomeWizard app
The app switches sockets with a minimum delay of 1 minute. This module works per second — useful on cloudy days when sun and cloud alternate rapidly.
Changing settings later
Press the top button for 5 seconds. Turn off mobile data, reconnect to Lily (no password) and open 192.168.4.1. You can then:
Set the switch-off delay per socket and enter the name of the connected device.
Set the switch-off threshold (value 0 = requires zero consumption; or higher if e.g. 100W base consumption is acceptable to you).
Set the switch-on threshold (recommended starting value: 150W — the module adjusts this automatically, but only upward). If you connect a device with a lower power rating than the previous one to the socket, press and hold the bottom button for 5 seconds to reset the thresholds.
SSID and password of your WiFi, name or IP of the P1 meter and sockets, and update intervals (in milliseconds).
Lilygo T-Display S3 — display layout (all values in Watts)Lilygo T-Display: At the top: sockets. Below the sockets: on the left the projected quarter‑hour peak in progress, in the middle the time HH:MM, on the right (white text) the highest monthly peak for the current month. At the bottom: consumption or production.
Controls
Button overview
Button
Action
Function
▲ Top
Short
Toggle monthly peak display on/off
▲ Top
Long (5 sec)
Clear WiFi credentials + open settings page
▼ Bottom
Short
Toggle automatic socket control on/off (only if switching was enabled in setup)
▼ Bottom
Long (5 sec)
Reset intervals and switching thresholds to default (150W)
⏻ PWR(Waveshare only)
Short
Power graph (no graph - 2 - 4 - 8 - 24 hours)
Technical
Built-in safety mechanisms
📡No connection to the P1 meter? All sockets switch off automatically.
⚠️Invalid sensor data? Socket stays off until valid data is available again.
🔋Consumption too high? Lowest-priority sockets are switched off first.
☁️Not enough solar? Sockets stay off until the surplus rises above the threshold again.
📡Please note: if your local Wi-Fi suddenly goes down completely, sockets that are currently on cannot be turned off by the device. Be aware that such outages may occur; the author of this page is not responsible for unexpected power consumption in this case.
⚙️ Technical
LilyGO modules run on the powerful ESP32 chip and operate on standard 5V via USB‑C.
No computer required after flashing — they work fully stand‑alone.
Thanks to FreeRTOS, network scanning and socket polling run in parallel, delivering fast and rock‑solid performance.
🖥 Bigger screen?
Need better visibility from across the room?
With a small code adjustment, the same firmware also runs on the ESP32‑3248S035 — a bright 3.5" touchscreen that instantly gives your project a more professional look.
Available on AliExpress.
🤓 Nerd stuff:
Written in modern C++ and optimized with FreeRTOS tasks for maximum speed and responsiveness.
The priority‑driven switching logic ensures smart, predictable and stable control.
When solar production increases gradually (sunrise, cloud moves away), the lowest‑power consumer switches on first.
When there’s a sudden surplus, the socket with the longest off‑delay gets priority.
Manual control via the HomeWizard app, curl or the physical button is always possible — the board detects the real state and continues without any hiccups.
If you manually turn on a socket while there isn’t enough surplus, the board will automatically switch it off again.
Want to avoid that? Press the bottom button briefly to temporarily pause automatic control.